Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create DevForgeAI-aware Claude Code subagents with structural anti-skip enforcement (Execute-Verify-Record pattern) across all 6 phases. Prevents token optimization bias through lean orchestration, per-phase reference loading, checkpoint persistence, and artifact verification. Use when user runs /create-agent command, requests custom subagent creation with framework integration, or says "create a subagent" or "generate an agent". Supports guided, template, domain, and custom spec modes. Do NOT u
.claude/skills/majiayu000-spec-driven-agents/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 191% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 34% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 218% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 29% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 156% | 0% |
Create DevForgeAI-aware Claude Code subagents through guided specification with framework compliance validation.
Output: .claude/agents/{name}.md (subagent file) + optional reference file Invoked by: /create-agent command Delegates to: agent-generator subagent v2.0
This skill expands inline. After invocation, execute Phase 00 Initialization immediately. Do not wait passively, ask permission, or offer execution options.
Self-Check (if ANY box is true = VIOLATION):
IF any box checked: EXECUTION MODEL VIOLATION. Go directly to Phase 00 Initialization now.
This skill enforces 4 independent anti-skip layers. ALL FOUR must fail for a step to be skipped:
Read(). NOT consolidated. Prevents "already covered" rationalization.current_phase field.Glob(), generated files verified on disk.Execute-Verify-Record Pattern: Every mandatory step in every phase file has three parts:
Token Optimization Bias is PROHIBITED. Do not skip, compress, or shortcut any step. Every phase step exists because a previous failure proved it necessary.
Extract from conversation context:
| Parameter | Source | Default | |-----------|--------|---------| | $NAME | First argument after /create-agent | null (will ask in Phase 02) | | $MODE | --template=, --domain=, --spec=, or guided | "guided" | | $TEMPLATE | Value from --template= flag | null | | $DOMAIN | Value from --domain= flag | null | | $SPEC_FILE | Value from --spec= flag | null | | $RESUME_ID | --resume AGENT-NNN argument | null (new session) |
This phase runs inline because it creates the state that all other phases depend on.
IF conversation contains "--resume AGENT-":
Extract AGENT_ID from argument
MODE = "resume"
ELSE:
MODE = "new"
Extract $NAME, $MODE, $TEMPLATE, $DOMAIN, $SPEC_FILE from conversation markersIF MODE == "resume":
checkpoint_path = "devforgeai/workflows/agent-creation/${AGENT_ID}.checkpoint.json"
Glob(pattern=checkpoint_path)
IF found:
Read(file_path=checkpoint_path)
Restore session state from checkpoint
CURRENT_PHASE = checkpoint.progress.current_phase
Display: "Resuming ${AGENT_ID} from Phase ${CURRENT_PHASE}"
GOTO Phase Orchestration Loop at CURRENT_PHASE
ELSE:
Display: "No checkpoint found for ${AGENT_ID}."
AskUserQuestion:
Question: "No checkpoint found. What would you like to do?"
Header: "Resume"
Options:
- label: "Start a new agent creation"
description: "Begin fresh session"
- label: "Cancel"
description: "Exit without action"
IF "Start new": MODE = "new", continue below
IF "Cancel": EXIT skillIF MODE == "new":
# Scan for highest existing ID
Glob(pattern="devforgeai/workflows/agent-creation/AGENT-*.checkpoint.json")
# Extract highest NNN, increment
AGENT_ID = "AGENT-{NNN+1}" (zero-padded to 3 digits minimum)
# Ensure output directory exists
Glob(pattern="devforgeai/workflows/agent-creation/.gitkeep")
IF not found: Create directory structurecheckpoint = {
"checkpoint_version": "1.0",
"session_id": AGENT_ID,
"created_at": "current timestamp",
"status": "in_progress",
"progress": {
"current_phase": 0,
"phases_completed": [],
"completion_percentage": 0
},
"parameters": {
"agent_name": $NAME,
"creation_mode": $MODE,
"domain": $DOMAIN,
"template_name": $TEMPLATE,
"spec_file": $SPEC_FILE
},
"framework_context": {
"references_loaded": [],
"context_files_required": []
},
"specification": {
"name": null,
"purpose": null,
"domain": null,
"tools": [],
"model": null,
"responsibilities": [],
"integration_skills": [],
"context_files": []
},
"generation": {
"generated_files": {},
"validation_results": null,
"reference_file_needed": false
},
"phases": {
"01": { "status": "pending", "steps_completed": [] },
"02": { "status": "pending", "steps_completed": [], "questions_answered": 0 },
"03": { "status": "pending", "steps_completed": [] },
"04": { "status": "pending", "steps_completed": [] },
"05": { "status": "pending", "steps_completed": [] },
"06": { "status": "pending", "steps_completed": [] }
}
}
Write(file_path="devforgeai/workflows/agent-creation/${AGENT_ID}.checkpoint.json", content=checkpoint)VERIFY: Glob(pattern="devforgeai/workflows/agent-creation/${AGENT_ID}.checkpoint.json") IF not found: HALT -- "Initial checkpoint was NOT created."
Display:
"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DevForgeAI Agent Creation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Session: ${AGENT_ID}
Mode: ${MODE}
Agent Name: ${NAME || 'To be determined in Phase 2'}
Phases: 6 (Context > Requirements > Specification > Generation > Validation > Handoff)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"Set CURRENT_PHASE = 1.
FOR phase_num in range(CURRENT_PHASE, 7): # Phases 01-06
1. LOAD: Read(file_path="src/claude/skills/spec-driven-agents/phases/{phase_files[phase_num]}")
Load the phase file FRESH. Do NOT rely on memory of previous reads.
2. REFERENCE: Read the phase's reference file as specified in the phase Contract section.
Each phase references a file in src/claude/skills/spec-driven-agents/references/.
3. EXECUTE: Follow EVERY step in the phase file using EXECUTE-VERIFY-RECORD triplets.
- Each step's EXECUTE tells you exactly what action to perform
- Each step's VERIFY tells you how to confirm the action happened
- Each step's RECORD tells you how to update the checkpoint
4. EXIT CRITERIA: Verify ALL phase exit criteria are met before proceeding.
IF any required data key is null or empty: HALT.
5. CHECKPOINT: Update checkpoint JSON with phase completion.
Write updated checkpoint to disk.
6. CONTEXT CHECK: If estimated context > 70%, offer save-and-resume via AskUserQuestion.
IF user chooses "Save and resume later":
Write final checkpoint, display resume command, EXIT skill.| Phase | Name | File | Min Steps | Required Data | |-------|------|------|-----------|---------------| | 00 | Initialization | (inline above) | 5 | session_id, checkpoint on disk | | 01 | Framework Context Loading | phases/phase-01-framework-context.md | 3 | references_loaded>=3] | | 02 | Requirements Gathering | phases/phase-02-requirements-gathering.md | 5 | agent_name, purpose, domain, tools, model | | 03 | Specification Assembly | phases/phase-03-specification-assembly.md | 3 | spec_file on disk | | 04 | Agent Generation | phases/phase-04-agent-generation.md | 2 | generated_file on disk | | 05 | Validation | phases/phase-05-validation.md | 3 | validation_status, 12-point results | | 06 | Result Processing | phases/phase-06-result-handoff.md | 3 | output displayed, checkpoint deleted |
| Phase | Subagent | Enforcement | |-------|----------|-------------| | 04 | agent-generator | BLOCKING (must invoke via Task, cannot generate inline) |
devforgeai/workflows/agent-creation/${AGENT_ID}.checkpoint.json.claude/agents/{name}.md (generated subagent).claude/agents/{name}/references/{name}-patterns.mdsrc/claude/skills/spec-driven-agents/assets/templates/ (loaded via Read, not duplicated)IF phases_completed < 6: HALT "WORKFLOW INCOMPLETE - {completed_count}/6 phases"
IF generated_file not on disk (Glob returns empty): HALT "Subagent file not generated"
IF validation_status != "PASS" and validation_status != "PASS WITH WARNINGS": HALT "Validation not passed"
IF checkpoint still exists: Delete checkpoint (session complete)Load error recovery patterns from: src/claude/skills/spec-driven-agents/references/error-handling.md
Graceful Degradation Priority:
Available in src/claude/skills/spec-driven-agents/assets/templates/:
| Template | Domain | Purpose | |----------|--------|---------| | code-reviewer-template.md | QA | Code quality, security, best practices review | | test-automator-template.md | QA | TDD test generation (unit, integration, E2E) | | documentation-writer-template.md | Documentation | Technical docs, API specs, user guides | | deployment-coordinator-template.md | Deployment | Infrastructure, CI/CD, release management | | requirements-analyst-template.md | Architecture | User story creation, acceptance criteria | | skill-template.md | Meta | Skill creation template | | command-template-lean-orchestration.md | Meta | Command refactoring subagents |
This skill is invoked by:
/create-agent command (primary entry point)Skill(command="spec-driven-agents")This skill invokes:
agent-generator subagent v2.0 (Phase 04, for actual generation)Created subagents work with:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 15,814 | 25,019 | +58% | 1 | 1 | 0% | 2,861 | 3,518 | +23% | 0 | 0 | — |
case-07 | pass→pass | 7,100 | 3,408 | -52% | 1 | 1 | 0% | 1,181 | 3,620 | +207% | 0 | 0 | — |
case-02 | fail→fail | 9,240 | 9,462 | +2% | 1 | 1 | 0% | 309 | 3,534 | +1044% | 0 | 0 | — |
case-03 | pass→fail | 15,748 | 12,819 | -19% | 1 | 1 | 0% | 2,529 | 3,375 | +33% | 0 | 0 | — |
case-04 | fail→fail | 12,701 | 17,750 | +40% | 1 | 1 | 0% | 2,425 | 3,864 | +59% | 0 | 0 | — |
case-05 | fail→fail | 16,191 | 16,321 | +1% | 1 | 1 | 0% | 1,839 | 3,585 | +95% | 0 | 0 | — |
case-06 | pass→pass | 7,728 | 7,874 | +2% | 1 | 1 | 0% | 1,241 | 3,462 | +179% | 0 | 0 | — |
case-08 | fail→pass | 11,964 | 7,990 | -33% | 1 | 1 | 0% | 1,191 | 3,467 | +191% | 0 | 0 | — |
case-09 | fail→pass | 15,661 | 2,529 | -84% | 1 | 1 | 0% | 2,572 | 3,458 | +34% | 0 | 0 | — |
case-10 | fail→pass | 13,997 | 2,672 | -81% | 1 | 1 | 0% | 1,067 | 3,396 | +218% | 0 | 0 | — |
case-11 | pass→pass | 4,838 | 3,045 | -37% | 1 | 1 | 0% | 647 | 3,574 | +452% | 0 | 0 | — |
case-12 | fail→pass | 15,130 | 7,672 | -49% | 1 | 1 | 0% | 2,697 | 3,482 | +29% | 0 | 0 | — |
case-13 | fail→fail | 12,066 | 6,826 | -43% | 1 | 1 | 0% | 1,757 | 3,240 | +84% | 0 | 0 | — |
case-14 | fail→pass | 13,139 | 7,983 | -39% | 1 | 1 | 0% | 1,364 | 3,486 | +156% | 0 | 0 | — |
case-15 | fail→fail | 14,258 | 7,386 | -48% | 1 | 1 | 0% | 1,526 | 3,361 | +120% | 0 | 0 | — |
case-16 | pass→pass | 3,402 | 3,393 | -0% | 1 | 1 | 0% | 557 | 3,549 | +537% | 0 | 0 | — |
case-17 | fail→pass | 9,652 | 9,091 | -6% | 1 | 1 | 0% | 1,487 | 3,600 | +142% | 0 | 0 | — |
case-18 | fail→pass | 13,498 | 7,639 | -43% | 1 | 1 | 0% | 2,076 | 3,468 | +67% | 0 | 0 | — |
case-19 | fail→pass | 13,970 | 8,127 | -42% | 1 | 1 | 0% | 1,547 | 3,582 | +132% | 0 | 0 | — |
case-20 | pass→pass | 30,136 | 30,201 | +0% | 1 | 1 | 0% | 5,062 | 9,298 | +84% | 0 | 0 | — |
case-21 | pass→pass | 10,392 | 12,135 | +17% | 1 | 1 | 0% | 1,923 | 4,233 | +120% | 0 | 0 | — |
case-22 | pass→fail | 13,559 | 40,392 | +198% | 1 | 1 | 0% | 2,026 | 9,813 | +384% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 17 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +27 percentage points is the difference between those two pass rates over the 17 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.