Pipeline Phase Creator

VerifiedSafe

Guides creation of a new pipeline phase with strict order: contract, deterministic logic, script, domain expertise, and skill.

Sby Skills Guide Bot
DevelopmentAdvanced
7/22/2026
Claude Code
#skill-authoring#pipeline-scaffolding#pydantic-contracts#llm-workflow#code-generation

Recommended for

Automated summary

Guides creation of a new modernizer pipeline phase, from the Pydantic contract through skill documentation and orchestrator integration.

Strengths

  • Enforces a strict phase order with stop points and verification commands at each step.
  • Clearly separates the contract, deterministic logic, and LLM handling.
  • Requires handler tests and validates the script in deterministic mode.
  • Provides a precise SKILL.md template for the new phase.

Limitations

  • Tightly coupled to a specific repository layout and conventions (src/contracts, scripts, .artifacts).
  • Assumes a Python stack using uv and Pydantic.
  • Does not cover creating standalone skills outside the modernizer pipeline.
When to use it

Use when adding a new phase to the modernizer pipeline while following its existing conventions.

When not to use it

Avoid when building an independent skill outside this repository or for a pipeline that does not use Python/Pydantic.

Security analysis

Safe
Quality score84/100

This is a scaffolding/meta-skill that instructs the agent to create Pydantic contracts, handler modules, test files, a CLI script, and SKILL.md documentation for a new pipeline phase. The only commands are local `uv run python`/`uv run pytest` invocations of the project's own tooling and a validator script; there are no destructive operations (no rm -rf, no overwrites of system paths), no network calls, no `curl | sh`, no credential/secret handling, no obfuscated payloads, and no attempts to disable safety controls. The generated templates reference `.artifacts/` paths and local script execution, which is ordinary developer-workflow behavior with no meaningful execution risk of its own.

No concerns found

How this analysis is made

Examples

Add a deterministic DDL phase
Create a new pipeline phase called migrate-ddl that reads the schema contract from the previous phase and emits DDL migration steps. It does not need LLM judgment.
Add an LLM-backed cost phase
Add a cost-estimate phase to the modernizer pipeline. It should read the inventory output and use LLM judgment to estimate migration cost, with a separate LLM output model and domain expertise file.
Scaffold a validation phase end-to-end
I need a validate-schema phase scaffolded following the add-modernizer-skill workflow, including the Pydantic contract, deterministic handler, tests, script, expertise file, and SKILL.md.

/add-modernizer-skill

Guides creation of a new pipeline phase. Follows strict priority order — each step must be complete before the next begins.

Required Input

Ask the user for:

  • Phase name: e.g. migrate-ddl, validate-schema, cost-estimate
  • Purpose: What this phase does in one sentence
  • Needs LLM?: Whether this phase requires LLM judgment (yes/no)
  • Input: What artifacts from previous phases it reads
  • Output: What it produces

Phase 1: Contract (MUST complete first)

  1. Create src/contracts/{phase_name}_output.py

  2. Define the output Pydantic model with:

    • Clear field descriptions
    • Appropriate types and constraints
    • Validators where needed
  3. If LLM is needed, define the LLM output model separately (keep it minimal — only what requires judgment)

  4. Verify:

    uv run python -c "from src.contracts.{phase_name}_output import *; print('OK')"
    

STOP: Do not proceed until the contract compiles and the user approves the field design.

Phase 2: Deterministic Logic

  1. Create src/agents/{phase_name}/handler.py

  2. Implement run_{phase_name}_deterministic(input) -> contract

  3. If LLM is needed, implement:

    • prepare_{phase_name}_llm_input(contract, input) -> dict
    • apply_{phase_name}_llm_output(contract, llm_typed) -> updated_contract
  4. Write tests in tests/agents/test_{phase_name}.py

  5. Verify:

    uv run pytest tests/agents/test_{phase_name}.py -v
    

STOP: Do not proceed until tests pass.

Phase 3: Script

  1. Create scripts/run_{phase_name}.py

  2. Must support: --job-id, --db, --llm-mode (none/external/bedrock), --finalize, --artifact-root

  3. In external mode, inject output_schema:

    llm_request["output_schema"] = LlmModel.model_json_schema()
    
  4. In finalize mode, deserialize through Pydantic:

    llm_typed = LlmModel.model_validate(llm_response)
    updated = apply_llm_output(contract, llm_typed)
    
  5. Output JSON to stdout: {"status": "complete"} or {"status": "awaiting_llm", "llm_request": "..."} or {"status": "validation_failed", "errors": [...]}

  6. Verify deterministic mode works:

    uv run python scripts/run_{phase_name}.py --job-id test --db test --llm-mode none
    

STOP: Do not proceed until the script runs successfully.

Phase 4: Domain Expertise (if LLM phase exists)

  1. Create src/skills/{phase_name}-expertise.md
  2. Write the domain knowledge the LLM needs to make good decisions
  3. Keep it focused — principles and anti-patterns, not implementation details

Phase 5: Skill

  1. Create .claude/skills/{phase_name}/SKILL.md
  2. Follow this exact template:
---
name: {phase_name}
description: {one-line purpose}
---

# /{phase_name}

{Brief description.}

## Prerequisites

- {What must be true}

## Steps

1. **Run phase**

   ```bash
   uv run python scripts/run_{phase_name}.py --job-id {job_id} --db {database_name} --llm-mode external
  1. If status is awaiting_llm: a. Read: .artifacts/{database_name}/{job_id}/llm_requests/{phase_name}.json

    • Contains context data and output_schema b. Read: src/skills/{phase_name}-expertise.md c. Produce JSON conforming to output_schema d. Write to: .artifacts/{database_name}/{job_id}/llm_responses/{phase_name}.json e. Finalize:
    uv run python scripts/run_{phase_name}.py --job-id {job_id} --db {database_name} --finalize
    

    If validation fails, fix errors and retry up to 3 times.

  2. Update state Set phase_status.{phase_name} = "complete"


3. Validate:

   ```bash
   uv run python scripts/validate_skills.py

Phase 6: Integration

  1. Add the new phase to the /modernize orchestrator skill if it belongs in the main pipeline

  2. Update .claude/skills/modernize/SKILL.md with the new step in the correct position

  3. Run the pre-commit hook to verify everything links up:

    uv run python scripts/validate_skills.py
    

Rules

  • NEVER skip a phase. Each phase depends on the previous.
  • NEVER put contract details in the skill. The script injects output_schema.
  • NEVER reference Python source files from skills.
  • Keep LLM output contracts minimal. If logic can be deterministic, it MUST be.
  • The script is the source of truth for validation — the skill just runs it.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/pipeline-phase-creator-mrwakdwo/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/pipeline-phase-creator-mrwakdwo' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pipeline-phase-creator-mrwakdwo/download' --output '.skill-downloads/pipeline-phase-creator-mrwakdwo/SKILL.md.part' && mv '.skill-downloads/pipeline-phase-creator-mrwakdwo/SKILL.md.part' '.skill-downloads/pipeline-phase-creator-mrwakdwo/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

This file does not provide a usable name/description header for this native procedure. It remains available to download and inspect; use the manual method below.

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/pipeline-phase-creator-mrwakdwo/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills