Building a Skill-Based Content Pipeline for AI Coding Tools

    This article explains how to turn AI coding tools into a repeatable content production pipeline by breaking writing into engineering stages and packaging reusable logic as Skills. It covers a five-layer architecture, Skill structure with acceptance criteria, corpus retrieval and structured seed generation, parallel writing with context isolation, multi-dimensional scoring with hard rules, platform adaptation and archiving, observability and cost control, plus common pitfalls. Readers will learn how to make batch content generation stable, traceable, and verifiable.

    1. The Problem: From “Can Write” to “Delivers Reliably”

    Many teams hit the same wall after adopting AI coding tools: a single conversation produces good output, but batch, continuous, reproducible production quickly becomes unstable. The reason is straightforward. A single interaction depends on the model’s immediate performance, while a production system depends on process constraints, state management, and quality gates.

    My goal was never “have the tool write a short essay about the seasons.” It was to build a complete content pipeline: given a topic, the system retrieves corpus material, generates seeds, writes in parallel, scores automatically, adapts to multiple platforms, and finally produces several scored drafts in the browser, all within roughly a dozen minutes. After two months of running, the pipeline had accumulated more than eighty stored articles and nearly three hundred scoring records, with over seventy published to a Q&A community and eighty to an image-and-text platform.

    The core of this pipeline is not the model itself. It is decomposing “writing,” a vague task, into engineering stages with clear boundaries that can be verified independently.

    2. Overall Architecture: Five Layers

    I split the system into five layers. Layers communicate only through files and structured data, avoiding implicit state coupling.

    1. Corpus layer: collects, cleans, and chunks topic-related material, producing a source-tagged asset library.
    2. Seed layer: expands a topic into a topic matrix and outputs structured seeds (title direction, core thesis, target audience, structural skeleton).
    3. Generation layer: writes in parallel per seed, each with an isolated context so outputs do not contaminate one another.
    4. Evaluation layer: multi-dimensional scoring plus hard rule checks; low-scoring drafts are sent back automatically.
    5. Publishing layer: adapts formatting to platform specifications, generates covers and summaries, then archives everything.

    The direct benefit of layering is that any failing layer can be isolated. If generation quality is poor, check whether the seeds were vague first. If scores are broadly low, check whether the evaluation dimensions are misaligned.

    3. Skill-Based Design: Turning Process into Callable Capability

    The Skill mechanism in AI coding tools essentially registers a “reusable operating instruction + constraints + validation method” as a capability that the model invokes at the right moment. It is not a simple prompt template; it is closer to a module with a contract.

    A usable Skill typically has four parts: applicable scenario, input contract, execution steps, and acceptance criteria. Example:

    1. skill: prose_seed_builder
    2. when: user provides a topic and needs multiple topic directions
    3. input:
    4. topic: string
    5. audience: string
    6. count: integer
    7. steps:
    8. - retrieve and chunk topic-related material
    9. - generate count distinct topic directions
    10. - fill in thesis, structure, and material references for each direction
    11. acceptance:
    12. - semantic overlap between topics below threshold
    13. - each topic references at least two material items
    14. output: seeds.json

    The key is the acceptance section. Without acceptance criteria, output quality depends entirely on the model’s “feel” that day. With acceptance criteria, the model self-checks, and the pipeline can run a second validation on the program side.

    For directory organization, I use “one capability per directory”:

    1. skills/
    2. corpus_fetch/
    3. seed_builder/
    4. parallel_writer/
    5. scorer/
    6. platform_adapter/
    7. pipeline/
    8. runs/2026-08-26T09:00Z/
    9. seeds.json
    10. drafts/
    11. scores.json
    12. published/

    Each run gets its own directory, equivalent to a replayable build record. When a quality issue appears, you can precisely reproduce the inputs and intermediate artifacts from that time.

    4. Corpus Retrieval and Seed Generation

    The most common mistake in the corpus stage is “collecting a lot but using little.” My approach has three stages: expand search terms by topic, deduplicate and filter low-quality material, then chunk semantically and tag each chunk with source and credibility. Chunk granularity is “one complete argument.” Too fine and citations lose context; too coarse and relevance is diluted.

    The goal of seed generation is to expand one topic into a non-overlapping topic matrix. I explicitly require the model to output structured fields rather than free text:

    1. {
    2. "topic": "cities and seasons",
    3. "seeds": [
    4. {"angle": "sensory memory", "thesis": "a season is first a bodily experience", "structure": ["scene", "turn", "closing"]},
    5. {"angle": "time scale", "thesis": "cities compress seasons into schedules", "structure": ["contrast", "argument", "loop back"]}
    6. ]
    7. }

    The value of structured output is verifiability: missing fields, vague theses, and incomplete structures can be intercepted by the program directly, instead of discovering a drifted direction only after a full draft exists.

    5. Parallel Writing and Context Isolation

    The hidden cost of serial writing is context contamination: the wording habits and sentence rhythm of the previous piece seep into the next, making batch output highly homogeneous. My solution is one independent session per seed, sharing only a scoped material pack and a style constraint file.

    Style constraints are written not as adjectives but as executable rules, for example: paragraph length range, maximum words per sentence, banned word list, upper limit on metaphor density, and the ending must be a concrete scene rather than a summary statement. The benefit of rules is that the scoring stage can validate them by machine, forming a closed loop.

    Higher parallelism is not always better. In practice, three to five parallel workers are stable: too high triggers rate limits and retry failures, which lengthens total time; too low loses the parallel benefit. Failed tasks use exponential backoff retries, and failure reasons are written to the run log for later stability statistics.

    6. Automatic Scoring: Multi-Dimensional Scores Plus Hard Rules

    I divide scoring into two groups. The hard rule group is judged by the program, and failure sends the draft back immediately. It includes word count range, banned word hits, structural field completeness, and whether citations actually exist in the corpus. The soft scoring group is scored by the model across dimensions: thesis clarity, structural completeness, language quality, originality, and topic relevance.

    1. final = 0.30 * thesis + 0.25 * structure + 0.20 * language + 0.15 * originality + 0.10 * relevance
    2. hard_rules_passed == true # otherwise force rewrite

    Two practical points. First, scoring must be explainable: each dimension requires a reason for deduction, otherwise the score cannot guide rewriting. Second, rewriting must carry “targeted instructions” that modify only the low-scoring dimensions, avoiding quality drift from regenerating the whole piece. Among nearly three hundred scoring records over two months, most drafts crossed the threshold after one or two rounds of targeted rewriting.

    7. Publishing Adaptation and Archiving

    Platforms differ clearly in their preferences for title length, summary, paragraph density, and image ratio. So the publishing layer does not do “one-click mass posting”; it does specification adaptation: generate multiple sets of titles and summaries from the same body, trim paragraphs by platform rules, and keep version numbers.

    Archiving is often overlooked, yet it determines whether the system can run long term. For each article I record the seed, material references, scores from each round, the final version, and the publishing result, forming a traceable chain. Later, when doing quality analysis, you can directly count which topic types score highest and which dimension most often drags things down, then optimize seed strategy and style constraints in reverse.

    8. Observability and Cost Control

    A pipeline that runs long enough must answer three questions: where is it stuck, why is it stuck, and how much did it cost. My approach is structured logging plus per-stage timing: each stage outputs start and end time, input and output counts, and failure reason categories; model call counts and corpus fetch volume are aggregated daily.

    For cost control, the most effective measure is early interception: filtering out low-value directions at the seed stage is far cheaper than repeated rewriting after generation. The second is tiered model usage: work with clear rules and simple judgments goes to lighter capabilities, while scoring and rewriting that need aesthetic judgment use stronger capabilities.

    9. Common Pitfalls and Improvements

    First, misaligned evaluation dimensions: applying an “information density” standard to lyrical content results in uniformly low scores; the fix is switching scoring weights by genre. Second, disconnection between material and final draft, where citations do not exist, solved by hard rule checks on material fingerprints. Third, homogeneity, mitigated by context isolation and banned word lists. Fourth, process rigidity; the improvement direction is returning some judgment to the model, for example letting a Skill decide whether additional retrieval is needed.

    10. Summary

    Using AI coding tools for content production, the real dividing line is whether engineering is complete: whether tasks are decomposed, whether contracts are clear, whether state is replayable, whether quality has gates, and whether cost is observable. The Skill mechanism provides a vehicle for capability accumulation, while pipeline stability comes from these engineering constraints themselves. If you are building a similar batch generation system, start from a minimal closed loop: get two or three stages working from seed to scoring, establish logging and validation, then gradually add retrieval and publishing, avoiding an overly large structure that is hard to debug from the start.