From co2-skills
Context artifacts preparation orchestrator — generates all context artifacts (module models, HTML mockups, technical specifications, test specifications) by invoking the appropriate sub-skills. Takes an application name (mandatory), with optional version and module filters. Version supports single version, comma-separated list, "all", or omit for all versions. When multiple versions are resolved, they are processed SEQUENTIALLY in ascending semver order — all artifacts for version N are fully generated before version N+1 begins. Use this skill when the user asks to "prepare artifacts", "generate context", "prepare for development", "generate models and specs", "create mockups and specs", or any request to systematically generate all context artifacts from user stories before implementation begins. Also trigger when user says "resume preparation" to continue from where a previous session left off.
How this skill is triggered — by the user, by Claude, or both
Slash command
/co2-skills:conductor-feature-prepareclaude-sonnet-4-6The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Context artifacts preparation orchestrator — generates all context artifacts (module models,
Context artifacts preparation orchestrator — generates all context artifacts (module models, HTML mockups, technical specifications, test specifications) needed before code implementation can begin.
This skill AUTOMATICALLY starts a Ralph Loop to ensure complete artifact generation across all steps. Without Ralph Loop, the preparation may stop prematurely due to context window limits, API usage limits, or the agent incorrectly concluding work is "done enough". Ralph Loop ensures the same prompt is re-fed after each session exit, and the agent picks up where it left off.
BEFORE doing anything else (before Phase 0, before reading any files), you MUST invoke the Ralph Loop skill using the Skill tool. This is a blocking requirement — do NOT proceed with any work until Ralph Loop is active.
Invoke this immediately:
Skill(skill: "ralph-loop:ralph-loop", args: "/conductor-feature-prepare <application> [version:<version>] [module:<module>] --completion-promise \"ALL ARTIFACTS GENERATED\" --max-iterations 20")
Replace <application> and optional arguments with the actual arguments provided by the user.
Example: If the user invokes:
/conductor-feature-prepare mainapp
Then invoke:
Skill(skill: "ralph-loop:ralph-loop", args: "/conductor-feature-prepare mainapp --completion-promise \"ALL ARTIFACTS GENERATED\" --max-iterations 20")
If the user provides optional arguments:
/conductor-feature-prepare mainapp version:v2 module:user
Then invoke:
Skill(skill: "ralph-loop:ralph-loop", args: "/conductor-feature-prepare mainapp version:v2 module:user --completion-promise \"ALL ARTIFACTS GENERATED\" --max-iterations 20")
After Ralph Loop is active, proceed with Phase 0 (Resume Check) and continue normally.
When ALL artifacts have been generated (or confirmed to already exist), output the following promise tag to signal the Ralph Loop that preparation is finished:
<promise>ALL ARTIFACTS GENERATED</promise>
CRITICAL: Only output this promise when EVERY artifact step has completed:
Do NOT output the promise prematurely. Do NOT output it to escape the loop.
At the START of every iteration (including the first), the agent MUST:
.claude/ralph-loop.local.md exists, skip re-invoking)<app_folder>/context/ subfoldersThe skill expects these arguments:
/conductor-feature-prepare <application> [version:<version>] [module:<module>]
| Argument | Required | Example | Description |
|---|---|---|---|
<application> | Yes | mainapp | Application name to locate the context folder |
version:<version> | No | version:v2 or version:v1,v2 or version:all | Filter user stories and artifacts by version. Supports single version, comma-separated list, all, or omit for all versions. Multiple versions are processed sequentially in ascending semver order |
module:<module> | No | module:user | If provided, process only this module. If omitted, process all modules |
The application name is matched against root-level application folders:
<number>_ prefix from folder names (e.g., 1_hub_middleware → hub_middleware)| File | Resolved Path |
|---|---|
| PRD.md | <app_folder>/context/PRD.md |
| Module Models | <app_folder>/context/model/ |
| HTML Mockups | <app_folder>/context/mockup/ |
| Specifications | <app_folder>/context/specification/ |
| Test Specs | <app_folder>/context/test/ |
| References | <app_folder>/context/reference/ |
The version: argument supports four forms:
| Form | Example | Behavior |
|---|---|---|
| Single version | version:v2 | Process only v2 |
| Comma-separated list | version:v1,v2,v3 | Process each version sequentially in ascending semver order |
| Explicit all | version:all | Discover all versions from PRD.md, process sequentially in ascending semver order |
| Omitted | (no version arg) | Same as version:all |
When version:all or omitted:
[vX.Y.Z] version tags across all module sectionsVersions are ALWAYS processed one at a time, in ascending semver order. All artifacts for version N must be fully generated (or confirmed to already exist) before version N+1 begins. This ensures:
CLAUDE.md is automatically loaded into context at the start of every session. It contains project details, infrastructure paths, credentials, and configuration. You do NOT need to read it manually — the information is already available in your context.
This guard prevents accidental re-execution of already-completed work while allowing incremental processing of new versions. It uses a partition and filter approach.
Read <app_folder>/CHANGELOG.md (the application folder's changelog). If it does not exist, skip this check.
Resolve the version list (see Version Resolution).
Partition the resolved versions into two groups:
completed_versions — versions that have a matching conductor-feature-prepare entry
in <app_folder>/CHANGELOG.mdnew_versions — versions with NO matching entryDecision:
new_versions | completed_versions | Artifacts exist? | Action |
|---|---|---|---|
| Not empty | Any (including empty) | Yes (expected — prior versions built them) | Proceed with new_versions only — filter out completed versions from the processing list. Existing artifacts are the base for version increment. |
| Not empty | Any | No | Proceed with all resolved versions — no prior artifacts, start from scratch. |
| Empty | Not empty | Yes | STOP. Print: "All requested versions ({list}) for {application} already have context artifacts (recorded in <app_folder>/CHANGELOG.md) and they still exist. To redo, first delete the existing context artifact folders (model/, mockup/, specification/, test/), then re-run this skill." |
| Empty | Not empty | No | Proceed with all resolved versions — artifacts were cleaned up, this is a legitimate redo. |
Update the resolved version list to contain only the versions that will be processed
(either new_versions or all versions for redo). This filtered list is what the Sequential
Version Loop in Phase 1 will iterate over.
This phase runs at the START of every iteration, including the first. In a Ralph Loop, each iteration begins fresh with the same prompt, so the agent MUST check existing artifacts to understand what has already been completed.
Auto-Start Ralph Loop — Check if .claude/ralph-loop.local.md exists. If it does NOT
exist, Ralph Loop is not yet active. Invoke it NOW using the Skill tool:
Skill(skill: "ralph-loop:ralph-loop", args: "<the full /conductor-feature-prepare invocation with args> --completion-promise \"ALL ARTIFACTS GENERATED\" --max-iterations 20")
If .claude/ralph-loop.local.md already exists, Ralph Loop is active — skip this step.
Use project information from CLAUDE.md (already in context) — extract database type, design system, technology stack, and all infrastructure details.
Resolve the version list using the Version Resolution rules:
[v2][v1, v2, v3]all or omitted → scan PRD.md for ALL [vX.Y.Z] tags, deduplicate, sort ascendingCheck which artifacts already exist:
<app_folder>/context/model/ for module model files<app_folder>/context/mockup/ for HTML mockup files<app_folder>/context/specification/ for spec files<app_folder>/context/test/ for test spec filesIf ALL artifacts exist AND only a single version was resolved AND this is NOT a version increment:
<promise>ALL ARTIFACTS GENERATED</promise> and stopIf multiple versions were resolved, proceed to Phase 1 — the version loop will determine which versions still need processing (see Phase 1 Sequential Version Loop)
Otherwise, proceed to Phase 1, starting from the first step with missing artifacts
This phase generates all required context artifacts before code implementation begins. Each step checks if the artifact already exists — if it does, the step is skipped. This ensures the phase is idempotent and can be resumed safely.
IMPORTANT: If module argument was provided, pass it through to each sub-skill invocation
so that only the relevant subset of artifacts is generated.
When multiple versions are resolved (list, all, or omitted), Phase 1 wraps Steps 1.1–1.9 in
a version loop:
resolved_versions = [v1.0.0, v1.0.1, v1.0.2] # ascending semver order
For each version in resolved_versions:
1. Run Steps 1.1–1.9 with this single version as the version argument
2. For the FIRST version: artifacts are generated from scratch (Steps 1.2–1.9)
3. For SUBSEQUENT versions: artifacts already exist from the prior version — operate in
Version Increment Mode (update, not skip)
4. All artifacts for this version must be complete before moving to the next version
When only a single version is resolved, the loop runs once — no behavioral difference from the original single-version flow.
When artifacts exist from a previous version but the current version in the loop has new/changed user stories, Steps 1.4–1.9 operate in update mode:
version
AND module arguments so they can update the existing artifacts incrementally.[v<version>] sections in PRD.md and
updating their output files accordingly (appending new fields, modifying existing diagrams,
updating specs and test scenarios).PRD.md modules may contain a ### Bug section listing previously fixed bugs (e.g.,
[BUG-024] Fixed Message ID link...). These entries represent validated fixes from prior
development cycles. When generating or updating artifacts, sub-skills MUST treat bug fix
entries as supplementary requirements:
This ensures that when an application is redeveloped from scratch, previously reported bugs do not reappear in the new implementation.
PRD.md may contain three extended sections that influence how downstream skills are invoked and what context they receive. Detect each section's presence at the start of Phase 1 and record the result for use throughout the version loop:
# Design System — Already consumed by Step 1.5 (Infer Design System) for routing
decisions and resolved-file-path propagation to mockgen-* and specgen-*. No additional action
needed; Step 1.5 is the canonical handler.# Architecture Principle — Already consumed by Step 1.3 (Infer Database Type) and
Step 1.7 (Infer Technology Stack) as the primary signal for routing decisions. Sub-skills
(modelgen-, specgen-) read it directly from PRD.md.# High Level Process Flow — Detect presence here so all downstream skills are aware:
# High Level Process Flow section. If present, record:
[FLOW_DIAGRAM.md](reference/FLOW_DIAGRAM.md))Record the detection result (Design System: yes/no, Architecture Principle: yes/no, Process Flow: yes/no + flow names) in your working memory for the duration of the run. This awareness does NOT replace each sub-skill's own reading of PRD.md — every sub-skill reads PRD.md directly, but knowing which sections are present helps the orchestrator detect missing pre-requisites early and surface them to the user.
<application> argument against root-level folders (same logic as Input Resolution)<app_folder> is the root for all context artifacts<app_folder>/context/PRD.md exists — if not, stop with errorTag all untagged items in PRD.md with unique ID codes before any artifact generation begins. This ensures all user stories, NFRs, constraints, and references have stable IDs that downstream artifacts (module models, specs, tests) can reference for traceability.
This step runs ONCE before the version loop starts (not per-version), because tagging applies to all items regardless of version.
v2)version argument (all) → use v1 as the defaultSkill(skill: "util-ustagger", args: "<application> <version>")Skill(skill: "util-ustagger", args: "mainapp v1")# Architecture Principle section first (primary signal):
<app_folder>/context/model/
.md or .json files already exist AND this is NOT a version increment → SKIP this stepSkill(skill: "modelgen-relational", args: "<app_folder> [version:<version>] [module:<module>]")Skill(skill: "modelgen-nosql", args: "<app_folder> [version:<version>] [module:<module>]")<app_folder>/context/model/# Design System section first (primary signal):
DESIGN_SYSTEM.md file (e.g., [DESIGN_SYSTEM.md](reference/DESIGN_SYSTEM.md)), resolve the file path relative to PRD.md<app_folder>/context/mockup/
.html files already exist AND this is NOT a version increment → SKIP this stepmockgen-* patternSkill(skill: "mockgen-tailwind", args: "<app_folder> [version:<version>] [module:<module>]")mockgen-tailwind if no specific generator matches the design system<app_folder>/context/mockup/# Architecture Principle section first (primary signal):
<app_folder>/context/specification/
.md files already exist AND this is NOT a version increment → SKIP this stepspecgen-* patternSkill(skill: "specgen-laravel-eloquent-bladehtmx", args: "<app_folder> [version:<version>] [module:<module>]")Skill(skill: "specgen-spring-jpa-jtehtmx", args: "<app_folder> [version:<version>] [module:<module>]")<app_folder>/context/specification/<app_folder>/context/test/
.md files already exist AND this is NOT a version increment → SKIP this stepSkill(skill: "testgen-functional", args: "<app_folder> [version:<version>] [module:<module>]")<app_folder>/context/test/After all artifacts for ALL versions in the resolved version list are generated (or confirmed to already exist):
<promise>ALL ARTIFACTS GENERATED</promise> to signal Ralph Loop completionIMPORTANT — Version loop completion: The completion promise is ONLY output after the LAST version in the resolved list has been fully processed. Do NOT output it after completing an intermediate version — proceed to the next version immediately.
CLAUDE.md is the source of truth — CLAUDE.md is automatically loaded into context. Use it for all project details, database types, technology stacks, and infrastructure configuration.
Idempotent execution — Each step checks if artifacts already exist before generating. This ensures the skill can be safely re-run or resumed without duplicating work.
Version increment awareness — When processing multiple versions sequentially, artifacts from the prior version already exist when the next version begins. ALL sub-skills must be re-invoked in update mode for each subsequent version.
Pass through filters — The current version from the version loop AND the module
argument (if provided) MUST be passed to every sub-skill invocation. Each sub-skill
receives a SINGLE version at a time, never a list.
Sequential version order — When multiple versions are resolved, they are processed in ascending semver order. All artifacts for version N must complete before version N+1 begins. Never process versions in parallel or merge them into a single invocation.
Context window awareness (Ralph Loop handles recovery) — If approaching context limits, the Ralph Loop will automatically re-feed the prompt, and the next iteration will resume from the first step with missing artifacts.
Auto-start Ralph Loop — When this skill is triggered, the FIRST action (Phase 0, Step 0)
MUST be to check if Ralph Loop is active (.claude/ralph-loop.local.md exists). If not active,
invoke the Ralph Loop skill. Do NOT proceed with any work until Ralph Loop is confirmed active.
AUTONOMOUS CONTINUATION — NEVER STOP BETWEEN STEPS OR VERSIONS. This is an orchestrator
skill that runs a multi-step pipeline (Steps 1.1 through 1.9) across potentially multiple
versions. When a sub-skill (e.g., util-ustagger, modelgen-relational, mockgen-tailwind,
specgen-*, testgen-functional) completes and returns control, you MUST immediately proceed
to the NEXT step in the pipeline. When all steps for the current version are done, you MUST
immediately proceed to the NEXT version. Do NOT stop, do NOT wait for user input, do NOT
treat a sub-skill or version completion as the end of your task. The task is only complete
when ALL steps for ALL versions have been executed and the completion promise
<promise>ALL ARTIFACTS GENERATED</promise> has been output. Stopping after any
intermediate step or version is a bug in execution.
npx claudepluginhub rashidee/co2-skills --plugin co2-skillsProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.