| Unified voice content generation pipeline with mandatory validation and HOOK-GATE, VALIDATE, REFINE, VARIETY-GATE, JOY-CHECK, ANTI-AI, CLOSE-GATE, OUTPUT, CLEANUP. Use when writing articles, blog posts, or any content that uses a voice profile. Use for "write article", "blog post", "write in voice", "generate content", "draft article", "write about".
5k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
413
stars on the repo
on the repository, not the skill itself
Install
one command, takes just this skill from the repository
Execution Model (MANDATORY — DO NOT COLLAPSE PHASES)
Each phase runs as a SEPARATE agent dispatch. The orchestrator (parent session) dispatches one agent per phase sequentially. Each agent:
Reads the input artifact from the previous phase
Loads the selected voice profile and any phase-specific references
Executes the phase steps
Writes its output artifact to disk
Reports pass/fail on the phase gate
No single agent runs multiple phases. This ensures each phase gets a fresh context window with the full voice profile loaded, preventing context drift and ensuring the voice is the primary authority at every step. An orchestrator that attempts to combine phases or skip agent dispatches is violating this rule.
Phase artifacts are files on disk, not context passed between agents. Each phase reads and writes to well-known paths:
The orchestrator creates .voice-phase/ directory at the start and each agent writes its artifact there. Phase N agent MUST verify Phase N-1 artifact exists before starting.
Every phase agent prompt MUST include:
"Read the selected voice profile's SKILL.md at /home/feedgen/.claude/skills/{voice_profile}/skill/SKILL.md"
"Read the writing samples at /home/feedgen/.claude/skills/{voice_profile}/references/samples/"
"Read profile.json at /home/feedgen/.claude/skills/{voice_profile}/profile.json"
The specific phase instructions from this skill file
"Write your output artifact to .voice-phase/NN-name.ext"
Where {voice_profile} is the voice skill selected in Phase 1 (e.g., voice-myprofile, voice-myvoice).
Environment: The orchestrator sets VOICE_WRITER_ACTIVE=1 before dispatching any phase agent. This allows the pipeline-phase-gate hook to permit writes to content/posts/.
Phase 1: LOAD
Goal: Load the correct voice profile and all reference materials.
Steps:
Set environment: export VOICE_WRITER_ACTIVE=1 (allows pipeline-phase-gate to permit writes during pipeline execution)
Determine target voice from user context or explicit request. Available voice profiles:
Any voice-* skill in ~/.claude/skills/ — run ls ~/.claude/skills/ | grep voice- to see available profiles
Read the voice profile's profile.json and all files under references/
Read the target site's CLAUDE.md for structural conventions (front matter template, slug rules, tags)
If a topic-brainstormer outline exists, load it as structural input
Gate: Voice profile loaded and confirmed. Profile name echoed back. Proceed.
Phase 2: GROUND
Goal: Anchor the article in lived experience, not abstraction.
Steps:
Identify the core problem or frustration the article solves
Find the specific personal experience: what happened, when, what went wrong
Extract the "vex" (frustration) and the "joy" (resolution) — these frame the narrative arc
List 3-5 concrete details from the experience (error messages, tool names, timestamps, measurements)
Determine the single insight the reader should carry away
Gate: Grounding document exists with: problem statement, personal experience, concrete details, single insight. All must be specific, not abstract.
Phase 3: STATS-CHECKPOINT
Goal: Establish baseline metrics for the voice profile to validate against later.
Steps:
From the loaded voice profile, extract target ranges for:
Sentence length distribution
Paragraph length distribution
First-person pronoun density
Technical term density
Contraction rate
Record these as the validation targets for Phases 6 and 8
Note any voice-specific banned patterns (AI cliches, forbidden phrases)
Verify all code examples still compile/run after edits
Check that section transitions feel natural, not mechanical
Re-run validation on changed sections
Gate: All previously failed metrics now pass. Prose reads naturally. Proceed.
Phase 8: VARIETY-GATE
Goal: Ensure sentence and paragraph rhythm creates natural reading texture.
Steps:
Measure sentence length distribution by word count per sentence:
Short (1-7 words): target 30-45%
Medium (8-20 words): target 35-50%
Long (21+ words): target 10-25%
Verify all three clusters appear at least 15% of the time
If any cluster is below 15%: rewrite sentences in the dominant cluster to redistribute
Check paragraph length (hard ceiling, enforces short paragraphs with spacing between thoughts):
Every paragraph holds 3 sentences or fewer. Count sentences per paragraph (split on blank lines).
Any paragraph of 4+ sentences fails the gate: split it at the thought boundary and insert a blank line.
At least 1 single-sentence paragraph per 500 words (single-sentence paragraphs are welcome whenever a thought stands alone).
This applies to ALL voices and modes. Walls of text read as AI output; short paragraphs with spacing read as a person thinking.
Calculate variety score: standard deviation of sentence word counts
If variety score < 8.0 words:
Inject longer exploratory sentences (complex thoughts, compound structures) while keeping each paragraph at 3 sentences or fewer
Inject shorter fragment punches (declarations, observations, reactions)
Recalculate until stddev >= 8.0
Gate: All three sentence clusters >= 15%. Every paragraph is 3 sentences or fewer (no walls of text), with at least 1 single-sentence paragraph per 500 words. Variety score (stddev of sentence lengths) >= 8.0. If any check fails, rewrite and re-measure. Max 3 attempts.
Phase 9: JOY-CHECK
Goal: Verify the article frames its content on the joy side, not the grievance side.
Steps:
Invoke joy-check skill
Score the article on the joy-grievance spectrum
Ensure the article:
Celebrates problem-solving, not complaining about problems
Frames difficulties as interesting challenges, not injustices
Ends with satisfaction or forward motion, not bitterness
If the article scores too far toward grievance, reframe the problematic sections
Gate: Joy-check passes. Article is on the joy side of the spectrum.
Phase 10: ANTI-AI
Goal: Strip all AI-sounding patterns from the content.
Steps:
Invoke the private de-AI editor skill (deployed to ~/.claude/skills/ from ~/private-skills when installed)
Goal: Ensure the closing avoids formulaic patterns and uses an authentic voice-profiled ending.
Steps:
Identify which closing pattern the article currently uses. The 5 closing modes (from the voice profile's closing patterns):
Honest Uncertainty: "I don't know if this generalizes", "But we'll see"
Practical Trailing Observation: "Save the work. Read the work."
Self-Deprecating Admission: "I may never be an influencer"
Specific Next Step: "I'm going to try X next week"
Just Stops: the last technical point IS the ending — no wrap-up at all
If the closing matches pattern #1 (Honest Uncertainty) AND it is the ONLY pattern considered:
Force a rewrite using pattern #2 (Practical Trailing Observation), #4 (Specific Next Step), or #5 (Just Stops)
Verify the close does NOT:
Summarize the article
Callback to the opening
Use "In conclusion", "To sum up", "At the end of the day", or equivalent
End with a grand statement or inspirational flourish
Score the closing 1-10 on authenticity and fit
Gate: Closing uses a pattern other than the lazy uncertainty default. Closing score >= 7. No summary, no callback, no grand statement. If < 7, rewrite using a different closing mode and re-score. Max 3 attempts.
Phase 12: OUTPUT
Goal: Produce the final deliverable.
Steps:
Apply final formatting:
Correct front matter (title, date, draft status, tags, summary)
Proper Hugo markdown conventions
File named per convention: YYYY-MM-DD-slug.md
Write the file to content/posts/
Display the complete article to the user
Report all gate scores:
Hook score (Phase 5)
Validation pass/fail (Phase 6)
Variety score and cluster percentages (Phase 8)
Joy-check result (Phase 9)
Anti-AI result (Phase 10)
Close score (Phase 11)
Write pipeline completion marker:
Write .voice-pipeline-complete in the project root with JSON: