# Chapter Lead Writer

Write H2 chapter lead blocks (`sections/S<sec_id>_lead.md`) that preview the chapter's...

- Repository: https://github.com/WILLOSCAR/research-units-pipeline-skills (517 stars)
- Category: Writing
- License: see repository
- Last updated: 2026-10-05
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill chapter-lead-writer -g -a claude-code -y`
Codex: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill chapter-lead-writer -g -a codex -y`
Cursor: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill chapter-lead-writer -g -a cursor -y`
Gemini CLI: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill chapter-lead-writer -g -a gemini-cli -y`

## Description

Write H2 chapter lead blocks (`sections/S<sec_id>_lead.md`) that preview the chapter's comparison lens and connect its H3 subsections, without adding new facts.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Chapter Lead Writer

## Triggers & routing

- **Trigger**: chapter lead writer, section lead writer, H2 lead, lead paragraph, 章节导读, 章节导语.
- **Use when**: you have H2 chapters with multiple H3 subsections and the draft reads like paragraph islands across subsections.


## Purpose

This skill writes the body-only lead block that sits under an H2 heading and makes a chapter with multiple H3 subsections read like one argument.

This `SKILL.md` is now the **package router**, not the full method manual.

## Migration status

This package is in **P0 compatibility-preserving migration**:
- `references/` and `assets/` now hold the intended knowledge and contract layers.
- `scripts/run.py` remains in **compatibility mode** for active generation.
- a later script-thinning pass should move more judgment and exemplars out of Python and leave the script with deterministic execution and validation only.

For now, preserve the existing output contract and treat `scripts/run.py` as the execution source of truth.

## Inputs

Required:
- `outline/outline.yml`
- `outline/chapter_briefs.jsonl`
- `citations/ref.bib`

Optional:
- `outline/writer_context_packs.jsonl`

## Outputs

For each H2 section with H3 subsections:
- `sections/S<sec_id>_lead.md`

## Output contract

Keep these file-shape rules stable:
- each lead file is body-only and contains no headings
- each lead file previews the chapter lens and connects multiple H3s as one argument
- each lead file stays within the chapter's existing citation scope
- each lead file adds no new facts that are not supported later in the chapter

## Load Order

Always read:
- `references/overview.md`
- `references/lead_block_archetypes.md`

The rest: https://github.com/WILLOSCAR/research-units-pipeline-skills/blob/HEAD/.codex/skills/chapter-lead-writer/SKILL.md
