xhs-claude-opus-refine
Use this skill to run deterministic copy refinement through local Claude CLI (Opus) before rendering.
Inputs
- Source markdown path (10-card XHS markdown)
- Output root directory
- Pass sequence (default: red -> blue -> layout)
- Max line chars (default: 14-16)
- Claude proxy (default local 7897)
Workflow
- Red pass (
--pass red): amplify hook and urgency. - Blue pass (
--pass blue): improve actionability and compliance. - Layout pass (
--pass layout): shorten lines and reduce overlap risk. - Optional cover pass (
--pass cover) for first-card only punch. - Validate output:
- frontmatter present
- card count = 10
- Render with
xhs-direct-renderskill.
Primary script
python3 scripts/refine_markdown_with_claude.py --input <in.md> --output <out.md> --pass <red|blue|layout|cover> --model opus --effort high --max-line-chars 14
Quality gates
- Card1 must contain sharp pain hook.
- Card9 must be checklist (
- [ ] ...). - Card10 must include quote/closing CTA and no truncation.
- No forbidden absolute terms.
Mandatory memory update
- Append each run summary to
../state/YYYY-MM-DD-<topic>.md. - Promote stable defaults into
../LEARNINGS.md. - Commit + push to
main.