skill-forge
Purpose
The skill that builds skills. Applies Test-Driven Development to skill authoring: write a pressure test first, watch agents fail without the skill, write the skill to fix those failures, then close loopholes until bulletproof. Ensures every Rune skill is battle-tested before it enters the mesh.
Triggers
/rune skill-forge— manual invocation to create or edit a skill- Auto-trigger: when user says "create a skill", "new skill", "add skill to rune"
- Auto-trigger: when editing any
skills/*/SKILL.mdfile
Calls (outbound)
scout(L3): scan existing skills for patterns and naming conventionsplan(L2): structure complex skills with multiple phaseshallucination-guard(L3): verify referenced skills/tools actually existverification(L3): validate SKILL.md format compliancejournal(L3): record skill creation decisions in ADR
Called By (inbound)
cook(L1): when the feature being built IS a new skillscaffold(L1): when scaffolded project includes custom skills
References
references/claude-skill-reference.md— Claude Code skill system: frontmatter fields, variables, shell injection, invocation control matrix, skill type patterns (task/research/knowledge/dynamic), file structure, and quality checklist. Load when creating or editing any skill.
Workflow
Phase 1 — DISCOVER
Before writing anything, understand the landscape:
- Scan existing skills via
scout— is this already covered? - Check for overlap — will this duplicate or conflict with existing skills?
- Identify layer — L1 (orchestrator), L2 (workflow hub), L3 (utility)?
- Identify mesh connections — what calls this? What does this call?
<HARD-GATE>
If a skill with >70% overlap already exists → extend it, don't create new.
The mesh grows stronger by deepening connections, not by adding nodes.
</HARD-GATE>
Phase 2 — RED (Baseline Test)
Write the test BEFORE writing the skill.
Create a pressure scenario that exposes the problem the skill solves:
## Pressure Scenario: [skill-name]
### Setup
[Describe the situation an agent faces]
### Pressures (combine 2-3)
- Time pressure: "This is urgent, just do it"
- Sunk cost: "I already wrote 200 lines, can't restart"
- Complexity: "Too many moving parts to follow process"
- Authority: "Senior dev says skip testing"
- Exhaustion: "We're 50 tool calls deep"
### Expected Failure (without skill)
[What the agent will probably do wrong]
### Success Criteria (with skill)
[What the agent should do instead]
Run the scenario with a subagent WITHOUT the skill. Document:
- Exact behavior — what did the agent do?
- Rationalizations — verbatim excuses for skipping discipline
- Failure point — where exactly did it go wrong?
<HARD-GATE>
You MUST observe at least one failure before writing the skill.
No failure observed = you don't understand the problem well enough to write the solution.
</HARD-GATE>
Phase 3 — GREEN (Write Minimal Skill)
Write the SKILL.md addressing ONLY the failures observed in Phase 2.
Follow docs/SKILL-TEMPLATE.md format. Required sections:
| Section | Required | Purpose |
|---|---|---|
| Frontmatter | YES | Name, description, metadata |
| Purpose | YES | One paragraph, ecosystem role |
| Triggers | YES | When to invoke |
| Calls / Called By | YES | Mesh connections (control flow) |
| Data Flow | YES | Feeds Into / Fed By / Feedback Loops (data flow) |
| Workflow | YES | Step-by-step execution |
| Output Format | YES | Structured, parseable output |
| Constraints | YES | 3-7 MUST/MUST NOT rules |
| Sharp Edges | YES | Known failure modes |
| Self-Validation | YES | Domain-specific QA checklist (per-skill, not centralized) |
| Done When | YES | Verifiable completion criteria |
| Cost Profile | YES | Token estimate |
| Mesh Gates | L1/L2 only | Progression guards |