@rune-kit/rune 2.8.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +68 -34
  3. package/agents/adversary.md +27 -0
  4. package/agents/architect.md +19 -29
  5. package/agents/asset-creator.md +18 -4
  6. package/agents/audit.md +25 -4
  7. package/agents/autopsy.md +19 -4
  8. package/agents/ba.md +35 -0
  9. package/agents/brainstorm.md +31 -4
  10. package/agents/browser-pilot.md +21 -4
  11. package/agents/coder.md +21 -29
  12. package/agents/completion-gate.md +20 -4
  13. package/agents/constraint-check.md +18 -4
  14. package/agents/context-engine.md +22 -4
  15. package/agents/context-pack.md +32 -0
  16. package/agents/cook.md +41 -4
  17. package/agents/db.md +19 -4
  18. package/agents/debug.md +33 -4
  19. package/agents/dependency-doctor.md +20 -4
  20. package/agents/deploy.md +27 -4
  21. package/agents/design.md +22 -4
  22. package/agents/doc-processor.md +27 -0
  23. package/agents/docs-seeker.md +19 -4
  24. package/agents/docs.md +31 -0
  25. package/agents/fix.md +37 -4
  26. package/agents/git.md +29 -0
  27. package/agents/hallucination-guard.md +20 -4
  28. package/agents/incident.md +21 -4
  29. package/agents/integrity-check.md +18 -4
  30. package/agents/journal.md +19 -4
  31. package/agents/launch.md +32 -4
  32. package/agents/logic-guardian.md +26 -11
  33. package/agents/marketing.md +23 -4
  34. package/agents/mcp-builder.md +26 -0
  35. package/agents/neural-memory.md +30 -0
  36. package/agents/onboard.md +22 -4
  37. package/agents/perf.md +21 -4
  38. package/agents/plan.md +29 -4
  39. package/agents/preflight.md +22 -4
  40. package/agents/problem-solver.md +20 -4
  41. package/agents/rescue.md +23 -4
  42. package/agents/research.md +19 -4
  43. package/agents/researcher.md +19 -29
  44. package/agents/retro.md +32 -0
  45. package/agents/review-intake.md +20 -4
  46. package/agents/review.md +32 -4
  47. package/agents/reviewer.md +20 -28
  48. package/agents/safeguard.md +19 -4
  49. package/agents/sast.md +18 -4
  50. package/agents/scaffold.md +41 -0
  51. package/agents/scanner.md +19 -28
  52. package/agents/scope-guard.md +18 -4
  53. package/agents/scout.md +23 -4
  54. package/agents/sentinel-env.md +26 -0
  55. package/agents/sentinel.md +33 -4
  56. package/agents/sequential-thinking.md +20 -4
  57. package/agents/session-bridge.md +24 -4
  58. package/agents/skill-forge.md +22 -4
  59. package/agents/skill-router.md +26 -4
  60. package/agents/slides.md +24 -0
  61. package/agents/surgeon.md +19 -4
  62. package/agents/team.md +30 -4
  63. package/agents/test.md +36 -4
  64. package/agents/trend-scout.md +17 -4
  65. package/agents/verification.md +20 -4
  66. package/agents/video-creator.md +20 -4
  67. package/agents/watchdog.md +19 -4
  68. package/agents/worktree.md +17 -4
  69. package/commands/rune.md +168 -168
  70. package/compiler/__tests__/analytics.test.js +370 -0
  71. package/compiler/adapters/openclaw.js +2 -2
  72. package/compiler/analytics.js +385 -0
  73. package/compiler/bin/rune.js +68 -2
  74. package/compiler/dashboard.js +883 -0
  75. package/compiler/transforms/branding.js +1 -1
  76. package/contexts/dev.md +34 -34
  77. package/contexts/research.md +43 -43
  78. package/contexts/review.md +55 -55
  79. package/extensions/ai-ml/PACK.md +88 -88
  80. package/extensions/ai-ml/skills/ai-agents.md +172 -172
  81. package/extensions/ai-ml/skills/code-sandbox.md +187 -187
  82. package/extensions/ai-ml/skills/deep-research.md +146 -146
  83. package/extensions/ai-ml/skills/embedding-search.md +66 -66
  84. package/extensions/ai-ml/skills/fine-tuning-guide.md +74 -74
  85. package/extensions/ai-ml/skills/llm-architect.md +125 -125
  86. package/extensions/ai-ml/skills/llm-integration.md +64 -64
  87. package/extensions/ai-ml/skills/prompt-patterns.md +72 -72
  88. package/extensions/ai-ml/skills/rag-patterns.md +66 -66
  89. package/extensions/ai-ml/skills/web-extraction.md +114 -114
  90. package/extensions/analytics/PACK.md +92 -92
  91. package/extensions/analytics/skills/ab-testing.md +72 -72
  92. package/extensions/analytics/skills/dashboard-patterns.md +83 -83
  93. package/extensions/analytics/skills/data-validation.md +68 -68
  94. package/extensions/analytics/skills/funnel-analysis.md +81 -81
  95. package/extensions/analytics/skills/sql-patterns.md +57 -57
  96. package/extensions/analytics/skills/statistical-analysis.md +79 -79
  97. package/extensions/analytics/skills/tracking-setup.md +71 -71
  98. package/extensions/backend/PACK.md +104 -104
  99. package/extensions/backend/skills/api-patterns.md +84 -84
  100. package/extensions/backend/skills/async-pipeline.md +193 -193
  101. package/extensions/backend/skills/auth-patterns.md +97 -97
  102. package/extensions/backend/skills/background-jobs.md +133 -133
  103. package/extensions/backend/skills/caching-patterns.md +108 -108
  104. package/extensions/backend/skills/cli-generation.md +133 -133
  105. package/extensions/backend/skills/database-patterns.md +87 -87
  106. package/extensions/backend/skills/middleware-patterns.md +104 -104
  107. package/extensions/chrome-ext/PACK.md +93 -93
  108. package/extensions/chrome-ext/skills/cws-preflight.md +143 -143
  109. package/extensions/chrome-ext/skills/cws-publish.md +104 -104
  110. package/extensions/chrome-ext/skills/ext-ai-integration.md +251 -251
  111. package/extensions/chrome-ext/skills/ext-messaging.md +139 -139
  112. package/extensions/chrome-ext/skills/ext-storage.md +133 -133
  113. package/extensions/chrome-ext/skills/mv3-scaffold.md +164 -164
  114. package/extensions/content/PACK.md +96 -96
  115. package/extensions/content/skills/blog-patterns.md +88 -88
  116. package/extensions/content/skills/cms-integration.md +131 -131
  117. package/extensions/content/skills/content-scoring.md +107 -107
  118. package/extensions/content/skills/i18n.md +83 -83
  119. package/extensions/content/skills/mdx-authoring.md +137 -137
  120. package/extensions/content/skills/reference.md +1014 -1014
  121. package/extensions/content/skills/seo-patterns.md +67 -67
  122. package/extensions/content/skills/video-repurpose.md +153 -153
  123. package/extensions/devops/PACK.md +101 -101
  124. package/extensions/devops/skills/chaos-testing.md +67 -67
  125. package/extensions/devops/skills/ci-cd.md +75 -75
  126. package/extensions/devops/skills/docker.md +58 -58
  127. package/extensions/devops/skills/edge-serverless.md +163 -163
  128. package/extensions/devops/skills/infra-as-code.md +158 -158
  129. package/extensions/devops/skills/kubernetes.md +110 -110
  130. package/extensions/devops/skills/monitoring.md +57 -57
  131. package/extensions/devops/skills/server-setup.md +64 -64
  132. package/extensions/devops/skills/ssl-domain.md +42 -42
  133. package/extensions/ecommerce/PACK.md +116 -116
  134. package/extensions/ecommerce/skills/cart-system.md +79 -79
  135. package/extensions/ecommerce/skills/inventory-mgmt.md +102 -102
  136. package/extensions/ecommerce/skills/order-management.md +126 -126
  137. package/extensions/ecommerce/skills/payment-integration.md +472 -472
  138. package/extensions/ecommerce/skills/shopify-dev.md +69 -69
  139. package/extensions/ecommerce/skills/subscription-billing.md +93 -93
  140. package/extensions/ecommerce/skills/tax-compliance.md +117 -117
  141. package/extensions/gamedev/PACK.md +142 -142
  142. package/extensions/gamedev/skills/asset-pipeline.md +74 -74
  143. package/extensions/gamedev/skills/audio-system.md +129 -129
  144. package/extensions/gamedev/skills/camera-system.md +87 -87
  145. package/extensions/gamedev/skills/ecs.md +98 -98
  146. package/extensions/gamedev/skills/game-loops.md +72 -72
  147. package/extensions/gamedev/skills/input-system.md +199 -199
  148. package/extensions/gamedev/skills/multiplayer.md +180 -180
  149. package/extensions/gamedev/skills/particles.md +105 -105
  150. package/extensions/gamedev/skills/physics-engine.md +89 -89
  151. package/extensions/gamedev/skills/scene-management.md +146 -146
  152. package/extensions/gamedev/skills/threejs-patterns.md +90 -90
  153. package/extensions/gamedev/skills/webgl.md +71 -71
  154. package/extensions/mobile/PACK.md +106 -106
  155. package/extensions/mobile/skills/app-store-connect.md +152 -152
  156. package/extensions/mobile/skills/app-store-prep.md +66 -66
  157. package/extensions/mobile/skills/deep-linking.md +109 -109
  158. package/extensions/mobile/skills/flutter.md +60 -60
  159. package/extensions/mobile/skills/ios-build-pipeline.md +142 -142
  160. package/extensions/mobile/skills/native-bridge.md +66 -66
  161. package/extensions/mobile/skills/ota-updates.md +97 -97
  162. package/extensions/mobile/skills/push-notifications.md +111 -111
  163. package/extensions/mobile/skills/react-native.md +82 -82
  164. package/extensions/saas/PACK.md +116 -116
  165. package/extensions/saas/skills/billing-integration.md +200 -200
  166. package/extensions/saas/skills/feature-flags.md +130 -130
  167. package/extensions/saas/skills/multi-tenant.md +103 -103
  168. package/extensions/saas/skills/onboarding-flow.md +139 -139
  169. package/extensions/saas/skills/subscription-flow.md +95 -95
  170. package/extensions/saas/skills/team-management.md +144 -144
  171. package/extensions/security/PACK.md +99 -99
  172. package/extensions/security/skills/api-security.md +140 -140
  173. package/extensions/security/skills/compliance.md +68 -68
  174. package/extensions/security/skills/owasp-audit.md +64 -64
  175. package/extensions/security/skills/pentest-patterns.md +77 -77
  176. package/extensions/security/skills/secret-mgmt.md +65 -65
  177. package/extensions/security/skills/supply-chain.md +65 -65
  178. package/extensions/trading/PACK.md +80 -80
  179. package/extensions/trading/skills/chart-components.md +55 -55
  180. package/extensions/trading/skills/experiment-loop.md +125 -125
  181. package/extensions/trading/skills/fintech-patterns.md +47 -47
  182. package/extensions/trading/skills/indicator-library.md +58 -58
  183. package/extensions/trading/skills/quant-analysis.md +111 -111
  184. package/extensions/trading/skills/realtime-data.md +58 -58
  185. package/extensions/trading/skills/trade-logic.md +104 -104
  186. package/extensions/ui/PACK.md +130 -130
  187. package/extensions/ui/skills/a11y-audit.md +91 -91
  188. package/extensions/ui/skills/animation-patterns.md +127 -106
  189. package/extensions/ui/skills/component-patterns.md +100 -75
  190. package/extensions/ui/skills/design-decision.md +108 -108
  191. package/extensions/ui/skills/design-system.md +68 -68
  192. package/extensions/ui/skills/landing-patterns.md +155 -155
  193. package/extensions/ui/skills/palette-picker.md +173 -173
  194. package/extensions/ui/skills/react-health.md +90 -90
  195. package/extensions/ui/skills/type-system.md +125 -125
  196. package/extensions/ui/skills/web-vitals.md +153 -153
  197. package/extensions/zalo/PACK.md +145 -145
  198. package/extensions/zalo/skills/zalo-oa-mcp.md +317 -317
  199. package/extensions/zalo/skills/zalo-oa-messaging.md +429 -429
  200. package/extensions/zalo/skills/zalo-oa-setup.md +236 -236
  201. package/extensions/zalo/skills/zalo-oa-webhook.md +189 -189
  202. package/extensions/zalo/skills/zalo-personal-messaging.md +194 -194
  203. package/extensions/zalo/skills/zalo-personal-setup.md +153 -153
  204. package/extensions/zalo/skills/zalo-rate-guard.md +219 -219
  205. package/hooks/auto-format/index.cjs +48 -48
  206. package/hooks/context-watch/index.cjs +95 -68
  207. package/hooks/hooks.json +111 -111
  208. package/hooks/metrics-collector/index.cjs +86 -42
  209. package/hooks/post-session-reflect/index.cjs +189 -153
  210. package/hooks/pre-compact/index.cjs +95 -95
  211. package/hooks/run-hook.cmd +1 -1
  212. package/hooks/secrets-scan/index.cjs +100 -100
  213. package/hooks/session-start/index.cjs +71 -65
  214. package/hooks/typecheck/index.cjs +65 -65
  215. package/package.json +63 -63
  216. package/references/ui-pro-max-data/LICENSE-UI-PRO-MAX +21 -21
  217. package/references/ui-pro-max-data/charts.csv +26 -26
  218. package/references/ui-pro-max-data/colors.csv +161 -161
  219. package/references/ui-pro-max-data/styles.csv +68 -68
  220. package/references/ui-pro-max-data/typography.csv +74 -74
  221. package/references/ui-pro-max-data/ui-reasoning.csv +162 -162
  222. package/references/ui-pro-max-data/ux-guidelines.csv +99 -99
  223. package/skills/adversary/SKILL.md +283 -283
  224. package/skills/asset-creator/SKILL.md +157 -157
  225. package/skills/audit/SKILL.md +148 -2
  226. package/skills/autopsy/SKILL.md +335 -259
  227. package/skills/autopsy/references/repo-analysis-patterns.md +113 -0
  228. package/skills/ba/SKILL.md +72 -2
  229. package/skills/brainstorm/SKILL.md +342 -341
  230. package/skills/browser-pilot/SKILL.md +168 -168
  231. package/skills/constraint-check/SKILL.md +165 -165
  232. package/skills/context-engine/SKILL.md +404 -404
  233. package/skills/cook/SKILL.md +917 -834
  234. package/skills/cook/references/output-format.md +33 -0
  235. package/skills/db/SKILL.md +273 -272
  236. package/skills/debug/SKILL.md +465 -443
  237. package/skills/dependency-doctor/SKILL.md +265 -235
  238. package/skills/deploy/SKILL.md +274 -231
  239. package/skills/design/DESIGN-REFERENCE.md +365 -365
  240. package/skills/design/SKILL.md +589 -482
  241. package/skills/doc-processor/SKILL.md +254 -254
  242. package/skills/docs/SKILL.md +374 -373
  243. package/skills/docs-seeker/SKILL.md +177 -177
  244. package/skills/fix/SKILL.md +330 -308
  245. package/skills/git/SKILL.md +339 -339
  246. package/skills/graft/SKILL.md +352 -0
  247. package/skills/graft/references/challenge-framework.md +98 -0
  248. package/skills/graft/references/mode-decision.md +44 -0
  249. package/skills/hallucination-guard/SKILL.md +219 -219
  250. package/skills/incident/SKILL.md +254 -251
  251. package/skills/integrity-check/SKILL.md +169 -169
  252. package/skills/journal/SKILL.md +240 -238
  253. package/skills/launch/SKILL.md +344 -342
  254. package/skills/logic-guardian/SKILL.md +251 -251
  255. package/skills/marketing/SKILL.md +290 -245
  256. package/skills/mcp-builder/SKILL.md +425 -423
  257. package/skills/mcp-builder/references/auto-discovery-pattern.md +169 -0
  258. package/skills/neural-memory/SKILL.md +362 -362
  259. package/skills/onboard/SKILL.md +404 -403
  260. package/skills/perf/SKILL.md +346 -346
  261. package/skills/plan/SKILL.md +433 -370
  262. package/skills/plan/references/feature-map.md +84 -0
  263. package/skills/preflight/SKILL.md +415 -396
  264. package/skills/problem-solver/SKILL.md +380 -284
  265. package/skills/rescue/SKILL.md +474 -450
  266. package/skills/retro/SKILL.md +5 -1
  267. package/skills/review/SKILL.md +612 -535
  268. package/skills/review-intake/SKILL.md +249 -249
  269. package/skills/safeguard/SKILL.md +200 -200
  270. package/skills/sast/SKILL.md +190 -190
  271. package/skills/scaffold/SKILL.md +328 -286
  272. package/skills/scope-guard/SKILL.md +180 -162
  273. package/skills/scout/SKILL.md +263 -263
  274. package/skills/sentinel/SKILL.md +382 -353
  275. package/skills/sentinel-env/SKILL.md +254 -254
  276. package/skills/sequential-thinking/SKILL.md +234 -234
  277. package/skills/session-bridge/SKILL.md +543 -397
  278. package/skills/skill-forge/SKILL.md +581 -539
  279. package/skills/skill-router/{skill.md → SKILL.md} +30 -2
  280. package/skills/surgeon/SKILL.md +215 -215
  281. package/skills/team/SKILL.md +556 -514
  282. package/skills/test/SKILL.md +614 -587
  283. package/skills/trend-scout/SKILL.md +145 -145
  284. package/skills/verification/SKILL.md +326 -325
  285. package/skills/video-creator/SKILL.md +201 -201
  286. package/skills/watchdog/SKILL.md +168 -168
  287. package/skills/worktree/SKILL.md +140 -140
@@ -1,539 +1,581 @@
1
- ---
2
- name: skill-forge
3
- description: Use when creating new Rune skills, editing existing skills, or verifying skill quality before deployment. Applies TDD discipline to skill authoring — test before write, verify before ship.
4
- metadata:
5
- author: runedev
6
- version: "1.6.0"
7
- layer: L2
8
- model: opus
9
- group: creation
10
- tools: "Read, Write, Edit, Bash, Glob, Grep"
11
- ---
12
-
13
- # skill-forge
14
-
15
- ## Purpose
16
-
17
- 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.
18
-
19
- ## Triggers
20
-
21
- - `/rune skill-forge` — manual invocation to create or edit a skill
22
- - Auto-trigger: when user says "create a skill", "new skill", "add skill to rune"
23
- - Auto-trigger: when editing any `skills/*/SKILL.md` file
24
-
25
- ## Calls (outbound)
26
-
27
- - `scout` (L3): scan existing skills for patterns and naming conventions
28
- - `plan` (L2): structure complex skills with multiple phases
29
- - `hallucination-guard` (L3): verify referenced skills/tools actually exist
30
- - `verification` (L3): validate SKILL.md format compliance
31
- - `journal` (L3): record skill creation decisions in ADR
32
-
33
- ## Called By (inbound)
34
-
35
- - `cook` (L1): when the feature being built IS a new skill
36
-
37
- ## References
38
-
39
- - `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.
40
-
41
- ## Workflow
42
-
43
- ### Phase 1 — DISCOVER
44
-
45
- Before writing anything, understand the landscape:
46
-
47
- 1. **Scan existing skills** via `scout` — is this already covered?
48
- 2. **Check for overlap** — will this duplicate or conflict with existing skills?
49
- 3. **Identify layer** — L1 (orchestrator), L2 (workflow hub), L3 (utility)?
50
- 4. **Identify mesh connections** — what calls this? What does this call?
51
-
52
- <HARD-GATE>
53
- If a skill with >70% overlap already exists → extend it, don't create new.
54
- The mesh grows stronger by deepening connections, not by adding nodes.
55
- </HARD-GATE>
56
-
57
- ### Phase 2 — RED (Baseline Test)
58
-
59
- **Write the test BEFORE writing the skill.**
60
-
61
- Create a pressure scenario that exposes the problem the skill solves:
62
-
63
- ```markdown
64
- ## Pressure Scenario: [skill-name]
65
-
66
- ### Setup
67
- [Describe the situation an agent faces]
68
-
69
- ### Pressures (combine 2-3)
70
- - Time pressure: "This is urgent, just do it"
71
- - Sunk cost: "I already wrote 200 lines, can't restart"
72
- - Complexity: "Too many moving parts to follow process"
73
- - Authority: "Senior dev says skip testing"
74
- - Exhaustion: "We're 50 tool calls deep"
75
-
76
- ### Expected Failure (without skill)
77
- [What the agent will probably do wrong]
78
-
79
- ### Success Criteria (with skill)
80
- [What the agent should do instead]
81
- ```
82
-
83
- Run the scenario with a subagent WITHOUT the skill. Document:
84
- - **Exact behavior** what did the agent do?
85
- - **Rationalizations** — verbatim excuses for skipping discipline
86
- - **Failure point** — where exactly did it go wrong?
87
-
88
- <HARD-GATE>
89
- You MUST observe at least one failure before writing the skill.
90
- No failure observed = you don't understand the problem well enough to write the solution.
91
- </HARD-GATE>
92
-
93
- ### Phase 3 — GREEN (Write Minimal Skill)
94
-
95
- Write the SKILL.md addressing ONLY the failures observed in Phase 2.
96
-
97
- Follow `docs/SKILL-TEMPLATE.md` format. Required sections:
98
-
99
- | Section | Required | Purpose |
100
- |---|---|---|
101
- | Frontmatter | YES | Name, description, metadata |
102
- | Purpose | YES | One paragraph, ecosystem role |
103
- | Triggers | YES | When to invoke |
104
- | Calls / Called By | YES | Mesh connections (control flow) |
105
- | Data Flow | YES | Feeds Into / Fed By / Feedback Loops (data flow) |
106
- | Workflow | YES | Step-by-step execution |
107
- | Output Format | YES | Structured, parseable output |
108
- | Constraints | YES | 3-7 MUST/MUST NOT rules |
109
- | Sharp Edges | YES | Known failure modes |
110
- | Self-Validation | YES | Domain-specific QA checklist (per-skill, not centralized) |
111
- | Done When | YES | Verifiable completion criteria |
112
- | Cost Profile | YES | Token estimate |
113
- | Mesh Gates | L1/L2 only | Progression guards |
114
-
115
- #### SKILL.md Anatomy — WHY vs HOW Split
116
-
117
- A skill file answers WHY and WHEN — not HOW. Code examples, syntax references, and implementation patterns belong in separate files:
118
-
119
- ```
120
- skills/[name]/
121
- ├── SKILL.md ← WHY: purpose, triggers, constraints, sharp edges (~150-300 lines)
122
- ├── references/ HOW: code patterns, syntax tables, API examples
123
- ├── patterns.md Implementation patterns with code blocks
124
- └── gotchas.md Language/framework-specific pitfalls
125
- └── scripts/ WHAT: deterministic operations (shell, node)
126
- ```
127
-
128
- **Rules:**
129
- 1. SKILL.md MUST NOT contain code blocks longer than 10 lines — move to `references/`
130
- 2. One excellent inline example (≤10 lines) is OK for claritymore than that is a smell
131
- 3. Format templates (Output Format section) are NOT codethey stay in SKILL.md
132
- 4. Pressure test scenarios (Phase 2) are NOT code — they stay in SKILL.md
133
- 5. If a skill has >3 code blocks create `references/` and extract them
134
-
135
- **Why this matters:** Code blocks in SKILL.md inflate context tokens on EVERY invocation. References are loaded only when needed. A 500-line SKILL.md with 200 lines of code examples should be a 300-line SKILL.md + a 200-line references file.
136
-
137
- <HARD-GATE>
138
- Code blocks in SKILL.md > 10 lines = review failure.
139
- Extract to references/ or scripts/. No exceptions.
140
- </HARD-GATE>
141
-
142
- #### Frontmatter Rules
143
-
144
- ```yaml
145
- ---
146
- name: kebab-case-max-64-chars # letters, numbers, hyphens only
147
- description: Use when [specific triggers]. [Symptoms that signal this skill applies].
148
- metadata:
149
- layer: L1|L2|L3
150
- model: haiku|sonnet|opus # haiku=scan, sonnet=code, opus=architecture
151
- group: [see template]
152
- ---
153
- ```
154
-
155
- **Description rules (CSO Discipline):**
156
- - MUST start with "Use when..."
157
- - MUST describe triggering conditions, NOT workflow
158
- - MUST be third person
159
- - MUST NOT summarize what the skill does internally
160
- - AI reads description decides whether to invoke → if description contains workflow summary, AI skips reading the full SKILL.md content (it thinks it already knows)
161
- - Test: if you can execute the skill from the description alone, the description leaks too much
162
-
163
- Bad: "Analyzes code quality through 6-step process: scan files, check patterns, run linters, compare metrics, generate report, suggest fixes"
164
- Good: "Use when code changes need quality review before commit. Symptoms: PR ready, refactor complete, pre-release check."
165
-
166
- ```yaml
167
- # BAD: Summarizes workflow — agent reads description, skips full content
168
- description: TDD workflow that writes tests first, then code, then refactors
169
-
170
- # GOOD: Only triggers — agent must read full content to know workflow
171
- description: Use when implementing any feature or bugfix, before writing code
172
- ```
173
-
174
- **Why this matters:** When description summarizes the workflow, agents take the shortcut — they follow the description and skip the full SKILL.md. Tested and confirmed.
175
-
176
- #### Writing Constraints
177
-
178
- Every constraint MUST block a specific failure mode observed in Phase 2:
179
-
180
- ```markdown
181
- # BAD: Generic rule
182
- 1. MUST write good code
183
-
184
- # GOOD: Blocks specific failure with consequence
185
- 1. MUST run tests after each fix — batch-and-pray causes cascading regressions
186
- ```
187
-
188
- #### Anti-Rationalization Table
189
-
190
- Capture every excuse from Phase 2 baseline testing:
191
-
192
- ```markdown
193
- | Excuse | Reality |
194
- |--------|---------|
195
- | "[verbatim excuse from test]" | [why it's wrong + what to do instead] |
196
- ```
197
-
198
- ### Phase 4 — VERIFY (Green Check)
199
-
200
- Run the SAME pressure scenario from Phase 2, now WITH the skill loaded.
201
-
202
- Check:
203
- - Does the agent follow the skill's workflow?
204
- - Are all constraints respected under pressure?
205
- - Does the output match the defined format?
206
-
207
- <HARD-GATE>
208
- If agent still fails with skill loaded → skill is insufficient.
209
- Go back to Phase 3, strengthen the weak section. Do NOT ship.
210
- </HARD-GATE>
211
-
212
- ### Phase 5 — REFACTOR (Close Loopholes)
213
-
214
- Run additional pressure scenarios with varied pressures. For each new failure:
215
-
216
- 1. Identify the rationalization
217
- 2. Add it to the anti-rationalization table
218
- 3. Add explicit constraint or sharp edge
219
- 4. Re-run verification
220
-
221
- Repeat until no new failures emerge in 2 consecutive test runs.
222
-
223
- #### Pressure Types for Test Scenarios
224
-
225
- Best tests combine 3+ pressures simultaneously:
226
-
227
- | Pressure | Example Scenario |
228
- |----------|------------------|
229
- | Time | "Emergency deployment, deadline in 30 min" |
230
- | Sunk cost | "Already wrote 200 lines, can't restart" |
231
- | Authority | "Senior dev says skip testing" |
232
- | Economic | "Customer churning, ship now or lose $50k MRR" |
233
- | Exhaustion | "50 tool calls deep, context filling up" |
234
- | Social | "Looking dogmatic by insisting on process" |
235
- | Pragmatic | "Being practical vs being pedantic" |
236
-
237
- #### Scenario Quality Requirements
238
-
239
- 1. **Concrete A/B/C options** — force explicit choice (no "I'd ask the user" escape hatch)
240
- 2. **Real constraints** — specific times, actual consequences, named files
241
- 3. **Real file paths** — `/tmp/payment-system` not "a project"
242
- 4. **"Make agent ACT"** — "What do you do?" not "What should you do?"
243
- 5. **No easy outs** — every option has a cost
244
-
245
- #### Meta-Testing (When GREEN Isn't Working)
246
-
247
- If the agent keeps failing even WITH the skill loaded, ask: "How could that skill have been written differently to make the correct option crystal clear?"
248
-
249
- Three possible responses:
250
- 1. "Skill was clear, I chose to ignore it" → foundational principle needed (stronger HARD-GATE)
251
- 2. "Skill should have said X explicitly" → add that exact phrasing verbatim
252
- 3. "I didn't see section Y" → reorganize for discoverability (move up, add header)
253
-
254
- #### Bulletproof Criteria
255
-
256
- A skill is bulletproof when:
257
- - Agent chooses correct option under maximum pressure (3+ pressures combined)
258
- - Agent CITES skill sections as justification for its choice
259
- - Agent ACKNOWLEDGES the temptation but follows the rule anyway
260
-
261
- #### Persuasion Principles for Skill Language
262
-
263
- Research (Meincke et al., 2025, 28,000 conversations) shows 33% → 72% compliance with these techniques:
264
-
265
- | Principle | Application | Use For |
266
- |-----------|-------------|---------|
267
- | Authority | "YOU MUST", imperative language | Eliminates decision fatigue, safety-critical rules |
268
- | Commitment | Explicit announcements + tracked choices | Creates accountability trail |
269
- | Scarcity | Time-bound requirements, "before proceeding" | Triggers immediate action |
270
- | Social Proof | "Every time", universal statements | Documents what prevents failures |
271
- | Unity | "We're building quality" language | Shared identity, quality goals |
272
-
273
- **Prohibited in skills:**
274
- - **Liking** ("Great job following the process!") → creates sycophancy
275
- - **Reciprocity** ("I helped you, now follow the rules") → feels manipulative
276
-
277
- **Ethical test**: Would this serve the user's genuine interests if they fully understood the technique?
278
-
279
- ### Phase 6 — INTEGRATE
280
-
281
- Wire the skill into the mesh:
282
-
283
- 1. **Update `docs/ARCHITECTURE.md`** — add to correct layer/group table
284
- 2. **Update `CLAUDE.md`** increment skill count, add to layer list
285
- 3. **Add mesh connections** — update SKILL.md of skills that should call/be called by this one
286
- 4. **Map data flow** — identify which skills consume this skill's output (Feeds Into) and which skills' outputs this skill needs (Fed By). Look for feedback loops where two skills refine each other's work
287
- 5. **Write Self-Validation** — 3-5 domain-specific checks unique to this skill's output. Ask: "What quality issues can ONLY this skill catch?"
288
- 6. **Verify no conflicts** — new skill's output format compatible with consumers?
289
-
290
- ### Phase 6.5EXTENSION AUTHORING (if building an extension, not a skill)
291
-
292
- Extensions augment existing skills with optional capabilities. Unlike skills (standalone workflow units) or packs (domain bundles), extensions ADD features to skills that already exist — without modifying the core skill file.
293
-
294
- #### Extension vs Skill vs Pack
295
-
296
- | Concept | Purpose | Modifies Core? | Self-contained? |
297
- |---------|---------|----------------|-----------------|
298
- | **Skill** | Standalone workflow unit (SKILL.md) | N/A — IS core | Yes |
299
- | **Pack** | Domain bundle of skills (PACK.md) | No — bundles existing | Yes |
300
- | **Extension** | Augments existing skill with new capability | No — additive only | Yes — own dir with install/uninstall |
301
-
302
- #### Extension Directory Structure
303
-
304
- ```
305
- extensions/<extension-name>/
306
- ├── EXTENSION.md # Manifest: what it extends, how, dependencies
307
- ├── install.sh # Unix installer (non-destructive MCP merge)
308
- ├── install.ps1 # Windows installer
309
- ├── uninstall.sh # Clean removal
310
- ├── uninstall.ps1 # Clean removal (Windows)
311
- ├── skills/
312
- │ └── <skill-name>/
313
- │ └── SKILL.md # New skill added by extension
314
- ├── agents/ # Optional subagent definitions
315
- │ └── <agent-name>.md
316
- ├── references/ # Domain knowledge loaded by extension skills
317
- │ └── <topic>.md
318
- ├── scripts/ # Executable utilities
319
- │ └── <script>.py|.sh
320
- └── docs/
321
- └── SETUP.md # Extension-specific configuration guide
322
- ```
323
-
324
- #### EXTENSION.md Manifest
325
-
326
- ```yaml
327
- ---
328
- name: "<extension-name>"
329
- extends: "<target-skill-or-pack>"
330
- description: "What capability this extension adds"
331
- requires:
332
- - mcp: "<mcp-server-name>" # Optional: MCP server dependency
333
- - skill: "<required-skill-name>" # Required core skill
334
- install_method: "non-destructive" # MUST be non-destructive
335
- ---
336
- ```
337
-
338
- #### Extension Rules
339
-
340
- 1. **Non-destructive install** extension MUST NOT modify existing skill files. It adds new files alongside.
341
- 2. **Self-contained** removing the extension directory restores the system to its pre-install state.
342
- 3. **MCP merge** if the extension adds MCP tools, install script MUST merge into settings.json without overwriting existing entries.
343
- 4. **Fallback graceful** — if the MCP server or external dependency is unavailable, the extension skill MUST degrade gracefully (report unavailability, don't crash).
344
- 5. **Cost awareness** — if the extension calls paid APIs, the extension skill MUST warn before expensive operations and track usage.
345
- 6. **Pre-flight check** — extension skill Step 1 MUST verify dependencies are available before executing.
346
-
347
- #### When to Build an Extension (vs a Skill or Pack)
348
-
349
- - Build an **extension** when: the capability requires an external API/MCP, is optional, and augments an existing skill
350
- - Build a **skill** when: the capability is self-contained and fits a layer in the mesh
351
- - Build a **pack** when: you're bundling multiple related skills for a domain
352
-
353
- ### Phase 7 — EVAL (Behavior Tests)
354
-
355
- Before shipping, write **Eval Scenarios** — behavior tests for the SKILL.md itself. These are "unit tests for skill files, not code."
356
-
357
- Save evals to `skills/<name>/evals.md`. Minimum 4 evals per skill:
358
-
359
- | Eval ID | Category | Required? |
360
- |---------|----------|-----------|
361
- | E01 | Happy path — core workflow | YES |
362
- | E02 | Edge case — unusual/empty input | YES |
363
- | E03 | Adversarial — pressure scenario | YES |
364
- | E04 | Jailbreak/injection attempt | YES for security-critical skills |
365
-
366
- Each eval follows the format defined in `rune:test` → "Skill Behavior Tests" section:
367
- - **Prompt**: exact situation the agent faces
368
- - **Expected Reasoning**: step-by-step reasoning agent SHOULD follow
369
- - **Must Include**: what the output MUST contain or do
370
- - **Must NOT**: anti-patterns the output MUST NOT produce
371
-
372
- Run each eval with a subagent. An eval FAILS if the agent produces a Must NOT output.
373
-
374
- **Pre-ship gate**: At least E01–E03 must PASS before committing. Security-critical skills (touching auth/secrets/destructive ops) require 8+ evals including jailbreak and credential-leak scenarios.
375
-
376
- Also run the **Skill Content Security Guard** (sentinel Step 3.5) on the new SKILL.md content before commit — blocks destructive ops, prompt injection, and jailbreak patterns embedded in skill instructions.
377
-
378
- <HARD-GATE>
379
- No evals.md → skill is behavior-untested. Do NOT ship untested skills.
380
- Eval file with 0 passing evals = same as no evals.
381
- </HARD-GATE>
382
-
383
- ### Phase 8 SHIP
384
-
385
- ```bash
386
- git add skills/[skill-name]/SKILL.md
387
- git add skills/[skill-name]/evals.md
388
- git add docs/ARCHITECTURE.md CLAUDE.md
389
- # Add any updated existing skills
390
- git commit -m "feat: add [skill-name] — [one-line purpose]"
391
- ```
392
-
393
- ## Skill Quality Checklist
394
-
395
- **Format:**
396
- - [ ] Name is kebab-case, max 64 chars, letters/numbers/hyphens only
397
- - [ ] Description starts with "Use when...", does NOT summarize workflow
398
- - [ ] All template sections present
399
- - [ ] Constraints are specific (not generic "write good code")
400
- - [ ] Sharp edges have severity + mitigation
401
-
402
- **Content:**
403
- - [ ] Baseline test run BEFORE skill was written
404
- - [ ] At least one observed failure documented
405
- - [ ] Anti-rationalization table from real test failures
406
- - [ ] Mesh connections bidirectional (calls AND called-by both updated)
407
- - [ ] Data flow mapped (Feeds Into / Fed By / Feedback Loops)
408
- - [ ] Self-Validation has 3-5 domain-specific checks (not generic)
409
- - [ ] Output format is structured and parseable by other skills
410
- - [ ] `evals.md` written with at least 3 passing eval scenarios (E01 happy-path, E02 edge-case, E03 adversarial)
411
- - [ ] Skill Content Security Guard passed (sentinel Step 3.5 — no destructive ops or injection patterns in SKILL.md)
412
-
413
- **Architecture:**
414
- - [ ] Layer assignment correct (L1=orchestrate, L2=workflow, L3=utility)
415
- - [ ] Model assignment correct (haiku=scan, sonnet=code, opus=architect)
416
- - [ ] No >70% overlap with existing skills
417
- - [ ] ARCHITECTURE.md updated
418
- - [ ] CLAUDE.md updated
419
-
420
- **Extension-specific (if building an extension):**
421
- - [ ] EXTENSION.md manifest present with extends, requires, install_method
422
- - [ ] install.sh + install.ps1 tested (non-destructive merge)
423
- - [ ] uninstall.sh + uninstall.ps1 tested (clean removal)
424
- - [ ] Extension skill has dependency pre-flight check (Step 1)
425
- - [ ] Fallback behavior documented when external dependency unavailable
426
- - [ ] Cost warning present if extension calls paid APIs
427
-
428
- ## Adapting Existing Skills
429
-
430
- When editing, not creating:
431
-
432
- <HARD-GATE>
433
- Same TDD cycle applies to edits.
434
- 1. Write a test that exposes the gap in the current skill
435
- 2. Run baseline — confirm the skill fails on this scenario
436
- 3. Edit the skill to address the gap
437
- 4. Verify the edit fixes the gap WITHOUT breaking existing behavior
438
- </HARD-GATE>
439
-
440
- "Just adding a section" is not an excuse to skip testing.
441
-
442
- ## Token Efficiency Guidelines
443
-
444
- Skills are loaded into context when invoked. Every word costs tokens.
445
-
446
- | Skill Type | Target | Notes |
447
- |---|---|---|
448
- | L3 utility (haiku) | <300 words | Runs frequently, keep lean |
449
- | L2 workflow hub | <500 words | Moderate frequency |
450
- | L1 orchestrator | <800 words | Runs once per workflow |
451
- | Reference sections | Extract to separate file | >100 lines → own file |
452
-
453
- Techniques:
454
- - Reference `--help` instead of documenting all flags
455
- - Cross-reference other skills instead of repeating content
456
- - One excellent example > three mediocre ones
457
- - Inline code only if <50 lines, otherwise separate file
458
-
459
- ## Output Format
460
-
461
- ```
462
- ## Skill Forge Report
463
- - **Skill**: [name] (L[layer])
464
- - **Action**: CREATE | EDIT
465
- - **Status**: SHIPPED | NEEDS_WORK | BLOCKED
466
-
467
- ### Baseline Test
468
- - Scenario: [test scenario description]
469
- - Result WITHOUT skill: [observed failure]
470
- - Result WITH skill: [observed success or remaining gap]
471
-
472
- ### Quality Checklist
473
- - Format: [pass/fail count]
474
- - Content: [pass/fail count]
475
- - Architecture: [pass/fail count]
476
-
477
- ### Files Created/Modified
478
- - skills/[name]/SKILL.md [created | modified]
479
- - docs/ARCHITECTURE.md [updated | skipped]
480
- - CLAUDE.md — [updated | skipped]
481
-
482
- ### Mesh Impact
483
- - New connections: [count] ([list of skills])
484
- - Bidirectional check: PASS | FAIL
485
- - Data flow mapped: [count] feeds-into, [count] fed-by, [count] feedback loops
486
- - Self-Validation: [count] domain-specific checks written
487
- ```
488
-
489
- ## Constraints
490
-
491
- 1. MUST run baseline test BEFORE writing skill no skill without observed failure
492
- 2. MUST verify skill fixes the observed failures green check required before ship
493
- 3. MUST NOT create skill with >70% overlap with existing extend instead
494
- 4. MUST follow SKILL-TEMPLATE.md format — all required sections present
495
- 5. MUST update ARCHITECTURE.md and CLAUDE.md on every new skill
496
- 6. MUST NOT ship skill that fails its own pressure test
497
- 7. MUST write description as triggers only — never summarize workflow in description
498
-
499
- ## Sharp Edges
500
-
501
- | Failure Mode | Severity | Mitigation |
502
- |---|---|---|
503
- | Writing skill without baseline test | CRITICAL | Phase 2 HARD-GATE: must observe failure first |
504
- | Description summarizes workflow → agents skip content | HIGH | Phase 3 description rules: "Use when..." triggers only |
505
- | New skill duplicates existing skill | HIGH | Phase 1 HARD-GATE: >70% overlap → extend, don't create |
506
- | Skill passes test but breaks mesh connections | MEDIUM | Phase 6 integration: verify output compatibility |
507
- | Editing skill without testing the edit | MEDIUM | Adapting section: same TDD cycle for edits |
508
- | Overly verbose skill burns context tokens | MEDIUM | Token efficiency guidelines: layer-based word targets |
509
- | Code blocks in SKILL.md bloat every invocation | HIGH | WHY vs HOW split: SKILL.md ≤10-line code blocks, extract rest to references/ |
510
- | Writing skill without TDD (no observed failures first) | CRITICAL | Skill TDD: RED (run scenario WITHOUT skill → document failures) → GREEN (write skill targeting failures) → REFACTOR (find bypasses → add blocks) |
511
- | Description leaks workflow → agent skips full content | HIGH | CSO Discipline: description = triggers only. Test: can you execute from description alone? If yes, it leaks too much |
512
- | Self-Validation copies completion-gate checks | HIGH | Self-Validation is DOMAIN-specific: "assertions per test", "dependency ordering". NOT generic: "tests pass", "build succeeds" — those belong to completion-gate |
513
- | Data Flow confused with Calls | MEDIUM | Calls = runtime invocation (skill A calls skill B). Feeds Into = artifact persistence (skill A writes .rune/X.md, skill B reads it later). If it's a direct function call → Calls. If it's via files/context → Data Flow |
514
- | Feedback Loop missing one direction | MEDIUM | Every Feedback Loop ↻ must document BOTH directions: what A sends to B AND what B sends back to A. One-way = Feeds Into, not a loop |
515
-
516
- ## Done When
517
-
518
- - Baseline test documented with observed failures (TDD RED phase)
519
- - SKILL.md follows template format completely
520
- - Skill passes pressure test (agent complies with skill loaded)
521
- - No new failures in 2 consecutive varied-pressure test runs
522
- - Mesh connections wired (ARCHITECTURE.md, CLAUDE.md, related skills)
523
- - Git committed with conventional commit message
524
-
525
- ## Returns
526
-
527
- | Artifact | Format | Location |
528
- |----------|--------|----------|
529
- | New or updated skill file | Markdown (SKILL.md) | `skills/<name>/SKILL.md` |
530
- | Eval scenarios | Markdown | `skills/<name>/evals.md` |
531
- | Reference files (if needed) | Markdown | `skills/<name>/references/` |
532
- | Architecture docs update | Markdown | `docs/ARCHITECTURE.md` |
533
- | Skill Forge Report | Markdown | inline |
534
-
535
- ## Cost Profile
536
-
537
- ~3000-8000 tokens per skill creation (opus for Phase 2-5 reasoning, haiku for scout/verification). Most cost is in the iterative test-refine loop (Phase 4-5). Budget 2-4 test iterations per skill.
538
-
539
- **Scope guardrail:** skill-forge authors and tests skill files it does not implement the features those skills describe.
1
+ ---
2
+ name: skill-forge
3
+ description: Use when creating new Rune skills, editing existing skills, or verifying skill quality before deployment. Applies TDD discipline to skill authoring — test before write, verify before ship.
4
+ metadata:
5
+ author: runedev
6
+ version: "1.7.0"
7
+ layer: L2
8
+ model: opus
9
+ group: creation
10
+ tools: "Read, Write, Edit, Bash, Glob, Grep"
11
+ ---
12
+
13
+ # skill-forge
14
+
15
+ ## Purpose
16
+
17
+ 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.
18
+
19
+ ## Triggers
20
+
21
+ - `/rune skill-forge` — manual invocation to create or edit a skill
22
+ - Auto-trigger: when user says "create a skill", "new skill", "add skill to rune"
23
+ - Auto-trigger: when editing any `skills/*/SKILL.md` file
24
+
25
+ ## Calls (outbound)
26
+
27
+ - `scout` (L3): scan existing skills for patterns and naming conventions
28
+ - `plan` (L2): structure complex skills with multiple phases
29
+ - `hallucination-guard` (L3): verify referenced skills/tools actually exist
30
+ - `verification` (L3): validate SKILL.md format compliance
31
+ - `journal` (L3): record skill creation decisions in ADR
32
+
33
+ ## Called By (inbound)
34
+
35
+ - `cook` (L1): when the feature being built IS a new skill
36
+ - `scaffold` (L1): when scaffolded project includes custom skills
37
+
38
+ ## References
39
+
40
+ - `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.
41
+
42
+ ## Workflow
43
+
44
+ ### Phase 1 — DISCOVER
45
+
46
+ Before writing anything, understand the landscape:
47
+
48
+ 1. **Scan existing skills** via `scout` is this already covered?
49
+ 2. **Check for overlap** — will this duplicate or conflict with existing skills?
50
+ 3. **Identify layer** — L1 (orchestrator), L2 (workflow hub), L3 (utility)?
51
+ 4. **Identify mesh connections** — what calls this? What does this call?
52
+
53
+ <HARD-GATE>
54
+ If a skill with >70% overlap already exists → extend it, don't create new.
55
+ The mesh grows stronger by deepening connections, not by adding nodes.
56
+ </HARD-GATE>
57
+
58
+ ### Phase 2 — RED (Baseline Test)
59
+
60
+ **Write the test BEFORE writing the skill.**
61
+
62
+ Create a pressure scenario that exposes the problem the skill solves:
63
+
64
+ ```markdown
65
+ ## Pressure Scenario: [skill-name]
66
+
67
+ ### Setup
68
+ [Describe the situation an agent faces]
69
+
70
+ ### Pressures (combine 2-3)
71
+ - Time pressure: "This is urgent, just do it"
72
+ - Sunk cost: "I already wrote 200 lines, can't restart"
73
+ - Complexity: "Too many moving parts to follow process"
74
+ - Authority: "Senior dev says skip testing"
75
+ - Exhaustion: "We're 50 tool calls deep"
76
+
77
+ ### Expected Failure (without skill)
78
+ [What the agent will probably do wrong]
79
+
80
+ ### Success Criteria (with skill)
81
+ [What the agent should do instead]
82
+ ```
83
+
84
+ Run the scenario with a subagent WITHOUT the skill. Document:
85
+ - **Exact behavior** — what did the agent do?
86
+ - **Rationalizations** — verbatim excuses for skipping discipline
87
+ - **Failure point** — where exactly did it go wrong?
88
+
89
+ <HARD-GATE>
90
+ You MUST observe at least one failure before writing the skill.
91
+ No failure observed = you don't understand the problem well enough to write the solution.
92
+ </HARD-GATE>
93
+
94
+ ### Phase 3 — GREEN (Write Minimal Skill)
95
+
96
+ Write the SKILL.md addressing ONLY the failures observed in Phase 2.
97
+
98
+ Follow `docs/SKILL-TEMPLATE.md` format. Required sections:
99
+
100
+ | Section | Required | Purpose |
101
+ |---|---|---|
102
+ | Frontmatter | YES | Name, description, metadata |
103
+ | Purpose | YES | One paragraph, ecosystem role |
104
+ | Triggers | YES | When to invoke |
105
+ | Calls / Called By | YES | Mesh connections (control flow) |
106
+ | Data Flow | YES | Feeds Into / Fed By / Feedback Loops (data flow) |
107
+ | Workflow | YES | Step-by-step execution |
108
+ | Output Format | YES | Structured, parseable output |
109
+ | Constraints | YES | 3-7 MUST/MUST NOT rules |
110
+ | Sharp Edges | YES | Known failure modes |
111
+ | Self-Validation | YES | Domain-specific QA checklist (per-skill, not centralized) |
112
+ | Done When | YES | Verifiable completion criteria |
113
+ | Cost Profile | YES | Token estimate |
114
+ | Mesh Gates | L1/L2 only | Progression guards |
115
+
116
+ #### SKILL.md Anatomy — WHY vs HOW Split
117
+
118
+ A skill file answers WHY and WHEN — not HOW. Code examples, syntax references, and implementation patterns belong in separate files:
119
+
120
+ ```
121
+ skills/[name]/
122
+ ├── SKILL.md WHY: purpose, triggers, constraints, sharp edges (~150-300 lines)
123
+ ├── references/ HOW: code patterns, syntax tables, API examples
124
+ ├── patterns.md Implementation patterns with code blocks
125
+ └── gotchas.md Language/framework-specific pitfalls
126
+ └── scripts/ ← WHAT: deterministic operations (shell, node)
127
+ ```
128
+
129
+ **Rules:**
130
+ 1. SKILL.md MUST NOT contain code blocks longer than 10 linesmove to `references/`
131
+ 2. One excellent inline example (≤10 lines) is OK for clarity more than that is a smell
132
+ 3. Format templates (Output Format section) are NOT code — they stay in SKILL.md
133
+ 4. Pressure test scenarios (Phase 2) are NOT code they stay in SKILL.md
134
+ 5. If a skill has >3 code blocks → create `references/` and extract them
135
+
136
+ **Why this matters:** Code blocks in SKILL.md inflate context tokens on EVERY invocation. References are loaded only when needed. A 500-line SKILL.md with 200 lines of code examples should be a 300-line SKILL.md + a 200-line references file.
137
+
138
+ <HARD-GATE>
139
+ Code blocks in SKILL.md > 10 lines = review failure.
140
+ Extract to references/ or scripts/. No exceptions.
141
+ </HARD-GATE>
142
+
143
+ #### Frontmatter Rules
144
+
145
+ ```yaml
146
+ ---
147
+ name: kebab-case-max-64-chars # letters, numbers, hyphens only
148
+ description: Use when [specific triggers]. [Symptoms that signal this skill applies].
149
+ metadata:
150
+ layer: L1|L2|L3
151
+ model: haiku|sonnet|opus # haiku=scan, sonnet=code, opus=architecture
152
+ group: [see template]
153
+ ---
154
+ ```
155
+
156
+ **Description rules (CSO Discipline):**
157
+ - MUST start with "Use when..."
158
+ - MUST describe triggering conditions, NOT workflow
159
+ - MUST be third person
160
+ - MUST NOT summarize what the skill does internally
161
+ - AI reads description decides whether to invoke if description contains workflow summary, AI skips reading the full SKILL.md content (it thinks it already knows)
162
+ - Test: if you can execute the skill from the description alone, the description leaks too much
163
+
164
+ Bad: "Analyzes code quality through 6-step process: scan files, check patterns, run linters, compare metrics, generate report, suggest fixes"
165
+ Good: "Use when code changes need quality review before commit. Symptoms: PR ready, refactor complete, pre-release check."
166
+
167
+ ```yaml
168
+ # BAD: Summarizes workflow agent reads description, skips full content
169
+ description: TDD workflow that writes tests first, then code, then refactors
170
+
171
+ # GOOD: Only triggers agent must read full content to know workflow
172
+ description: Use when implementing any feature or bugfix, before writing code
173
+ ```
174
+
175
+ **Why this matters:** When description summarizes the workflow, agents take the shortcut — they follow the description and skip the full SKILL.md. Tested and confirmed.
176
+
177
+ #### Writing Constraints
178
+
179
+ Every constraint MUST block a specific failure mode observed in Phase 2:
180
+
181
+ ```markdown
182
+ # BAD: Generic rule
183
+ 1. MUST write good code
184
+
185
+ # GOOD: Blocks specific failure with consequence
186
+ 1. MUST run tests after each fix — batch-and-pray causes cascading regressions
187
+ ```
188
+
189
+ #### Anti-Rationalization Table
190
+
191
+ Capture every excuse from Phase 2 baseline testing:
192
+
193
+ ```markdown
194
+ | Excuse | Reality |
195
+ |--------|---------|
196
+ | "[verbatim excuse from test]" | [why it's wrong + what to do instead] |
197
+ ```
198
+
199
+ ### Phase 4 — VERIFY (Green Check)
200
+
201
+ Run the SAME pressure scenario from Phase 2, now WITH the skill loaded.
202
+
203
+ Check:
204
+ - Does the agent follow the skill's workflow?
205
+ - Are all constraints respected under pressure?
206
+ - Does the output match the defined format?
207
+
208
+ <HARD-GATE>
209
+ If agent still fails with skill loaded skill is insufficient.
210
+ Go back to Phase 3, strengthen the weak section. Do NOT ship.
211
+ </HARD-GATE>
212
+
213
+ ### Phase 5 — REFACTOR (Close Loopholes)
214
+
215
+ Run additional pressure scenarios with varied pressures. For each new failure:
216
+
217
+ 1. Identify the rationalization
218
+ 2. Add it to the anti-rationalization table
219
+ 3. Add explicit constraint or sharp edge
220
+ 4. Re-run verification
221
+
222
+ Repeat until no new failures emerge in 2 consecutive test runs.
223
+
224
+ #### Pressure Types for Test Scenarios
225
+
226
+ Best tests combine 3+ pressures simultaneously:
227
+
228
+ | Pressure | Example Scenario |
229
+ |----------|------------------|
230
+ | Time | "Emergency deployment, deadline in 30 min" |
231
+ | Sunk cost | "Already wrote 200 lines, can't restart" |
232
+ | Authority | "Senior dev says skip testing" |
233
+ | Economic | "Customer churning, ship now or lose $50k MRR" |
234
+ | Exhaustion | "50 tool calls deep, context filling up" |
235
+ | Social | "Looking dogmatic by insisting on process" |
236
+ | Pragmatic | "Being practical vs being pedantic" |
237
+
238
+ #### Scenario Quality Requirements
239
+
240
+ 1. **Concrete A/B/C options** — force explicit choice (no "I'd ask the user" escape hatch)
241
+ 2. **Real constraints** — specific times, actual consequences, named files
242
+ 3. **Real file paths** — `/tmp/payment-system` not "a project"
243
+ 4. **"Make agent ACT"** — "What do you do?" not "What should you do?"
244
+ 5. **No easy outs** — every option has a cost
245
+
246
+ #### Meta-Testing (When GREEN Isn't Working)
247
+
248
+ If the agent keeps failing even WITH the skill loaded, ask: "How could that skill have been written differently to make the correct option crystal clear?"
249
+
250
+ Three possible responses:
251
+ 1. "Skill was clear, I chose to ignore it" → foundational principle needed (stronger HARD-GATE)
252
+ 2. "Skill should have said X explicitly" → add that exact phrasing verbatim
253
+ 3. "I didn't see section Y" → reorganize for discoverability (move up, add header)
254
+
255
+ #### Bulletproof Criteria
256
+
257
+ A skill is bulletproof when:
258
+ - Agent chooses correct option under maximum pressure (3+ pressures combined)
259
+ - Agent CITES skill sections as justification for its choice
260
+ - Agent ACKNOWLEDGES the temptation but follows the rule anyway
261
+
262
+ #### Persuasion Principles for Skill Language
263
+
264
+ Research (Meincke et al., 2025, 28,000 conversations) shows 33% → 72% compliance with these techniques:
265
+
266
+ | Principle | Application | Use For |
267
+ |-----------|-------------|---------|
268
+ | Authority | "YOU MUST", imperative language | Eliminates decision fatigue, safety-critical rules |
269
+ | Commitment | Explicit announcements + tracked choices | Creates accountability trail |
270
+ | Scarcity | Time-bound requirements, "before proceeding" | Triggers immediate action |
271
+ | Social Proof | "Every time", universal statements | Documents what prevents failures |
272
+ | Unity | "We're building quality" language | Shared identity, quality goals |
273
+
274
+ **Prohibited in skills:**
275
+ - **Liking** ("Great job following the process!") → creates sycophancy
276
+ - **Reciprocity** ("I helped you, now follow the rules") → feels manipulative
277
+
278
+ **Ethical test**: Would this serve the user's genuine interests if they fully understood the technique?
279
+
280
+ ### Phase 5.5 — SECURITY MODEL
281
+
282
+ Every skill that touches external systems, user data, or destructive operations MUST define an explicit Security Model section. This is a contract — not aspirational, but testable.
283
+
284
+ **Add to SKILL.md after Sharp Edges:**
285
+
286
+ ```markdown
287
+ ## Security Model
288
+
289
+ ### Trust Boundaries
290
+ - [What this skill reads] e.g., "Reads .env files, user source code, git history"
291
+ - [What this skill writes] — e.g., "Writes to .rune/ only, never modifies source code"
292
+ - [What this skill executes] e.g., "Runs npm test, never runs arbitrary shell commands"
293
+
294
+ ### This Skill Will NEVER
295
+ - [Explicit denial 1] — e.g., "Execute user-provided strings as shell commands"
296
+ - [Explicit denial 2] e.g., "Read or log credential files (.env, secrets.json)"
297
+ - [Explicit denial 3] — e.g., "Send data to external endpoints"
298
+
299
+ ### Threat Surface
300
+ | Threat | Mitigated By |
301
+ |--------|-------------|
302
+ | Prompt injection via user input | Input validated before processing |
303
+ | Credential exposure in output | Secrets pattern detection before emit |
304
+ | Destructive operation on wrong target | Confirmation gate before delete/overwrite |
305
+ ```
306
+
307
+ **When to require Security Model:**
308
+ - Skill uses `Bash` tool → REQUIRED (can execute arbitrary commands)
309
+ - Skill reads `.env` or credentials → REQUIRED
310
+ - Skill writes/deletes files outside `.rune/` → REQUIRED
311
+ - Skill calls external APIs or MCP tools → REQUIRED
312
+ - Skill is read-only analysis (review, audit, scout) → OPTIONAL but recommended
313
+
314
+ **Eval integration**: Phase 7 evals for skills with Security Model MUST include:
315
+ - E05: Attempt to make skill execute unintended command
316
+ - E06: Attempt to make skill expose credentials in output
317
+ - E07: Attempt to make skill write outside its declared boundary
318
+
319
+ If Security Model is required but missing → Phase 7 EVAL HARD-GATE blocks ship.
320
+
321
+ ### Phase 6 INTEGRATE
322
+
323
+ Wire the skill into the mesh:
324
+
325
+ 1. **Update `docs/ARCHITECTURE.md`** — add to correct layer/group table
326
+ 2. **Update `CLAUDE.md`** — increment skill count, add to layer list
327
+ 3. **Add mesh connections** — update SKILL.md of skills that should call/be called by this one
328
+ 4. **Map data flow** — identify which skills consume this skill's output (Feeds Into) and which skills' outputs this skill needs (Fed By). Look for feedback loops where two skills refine each other's work
329
+ 5. **Write Self-Validation** — 3-5 domain-specific checks unique to this skill's output. Ask: "What quality issues can ONLY this skill catch?"
330
+ 6. **Verify no conflicts** new skill's output format compatible with consumers?
331
+
332
+ ### Phase 6.5 EXTENSION AUTHORING (if building an extension, not a skill)
333
+
334
+ Extensions augment existing skills with optional capabilities. Unlike skills (standalone workflow units) or packs (domain bundles), extensions ADD features to skills that already exist — without modifying the core skill file.
335
+
336
+ #### Extension vs Skill vs Pack
337
+
338
+ | Concept | Purpose | Modifies Core? | Self-contained? |
339
+ |---------|---------|----------------|-----------------|
340
+ | **Skill** | Standalone workflow unit (SKILL.md) | N/A IS core | Yes |
341
+ | **Pack** | Domain bundle of skills (PACK.md) | No bundles existing | Yes |
342
+ | **Extension** | Augments existing skill with new capability | No additive only | Yes own dir with install/uninstall |
343
+
344
+ #### Extension Directory Structure
345
+
346
+ ```
347
+ extensions/<extension-name>/
348
+ ├── EXTENSION.md # Manifest: what it extends, how, dependencies
349
+ ├── install.sh # Unix installer (non-destructive MCP merge)
350
+ ├── install.ps1 # Windows installer
351
+ ├── uninstall.sh # Clean removal
352
+ ├── uninstall.ps1 # Clean removal (Windows)
353
+ ├── skills/
354
+ │ └── <skill-name>/
355
+ │ └── SKILL.md # New skill added by extension
356
+ ├── agents/ # Optional subagent definitions
357
+ │ └── <agent-name>.md
358
+ ├── references/ # Domain knowledge loaded by extension skills
359
+ │ └── <topic>.md
360
+ ├── scripts/ # Executable utilities
361
+ │ └── <script>.py|.sh
362
+ └── docs/
363
+ └── SETUP.md # Extension-specific configuration guide
364
+ ```
365
+
366
+ #### EXTENSION.md Manifest
367
+
368
+ ```yaml
369
+ ---
370
+ name: "<extension-name>"
371
+ extends: "<target-skill-or-pack>"
372
+ description: "What capability this extension adds"
373
+ requires:
374
+ - mcp: "<mcp-server-name>" # Optional: MCP server dependency
375
+ - skill: "<required-skill-name>" # Required core skill
376
+ install_method: "non-destructive" # MUST be non-destructive
377
+ ---
378
+ ```
379
+
380
+ #### Extension Rules
381
+
382
+ 1. **Non-destructive install** — extension MUST NOT modify existing skill files. It adds new files alongside.
383
+ 2. **Self-contained**removing the extension directory restores the system to its pre-install state.
384
+ 3. **MCP merge** — if the extension adds MCP tools, install script MUST merge into settings.json without overwriting existing entries.
385
+ 4. **Fallback graceful** — if the MCP server or external dependency is unavailable, the extension skill MUST degrade gracefully (report unavailability, don't crash).
386
+ 5. **Cost awareness** — if the extension calls paid APIs, the extension skill MUST warn before expensive operations and track usage.
387
+ 6. **Pre-flight check** — extension skill Step 1 MUST verify dependencies are available before executing.
388
+
389
+ #### When to Build an Extension (vs a Skill or Pack)
390
+
391
+ - Build an **extension** when: the capability requires an external API/MCP, is optional, and augments an existing skill
392
+ - Build a **skill** when: the capability is self-contained and fits a layer in the mesh
393
+ - Build a **pack** when: you're bundling multiple related skills for a domain
394
+
395
+ ### Phase 7 — EVAL (Behavior Tests)
396
+
397
+ Before shipping, write **Eval Scenarios** behavior tests for the SKILL.md itself. These are "unit tests for skill files, not code."
398
+
399
+ Save evals to `skills/<name>/evals.md`. Minimum 4 evals per skill:
400
+
401
+ | Eval ID | Category | Required? |
402
+ |---------|----------|-----------|
403
+ | E01 | Happy path core workflow | YES |
404
+ | E02 | Edge case unusual/empty input | YES |
405
+ | E03 | Adversarial pressure scenario | YES |
406
+ | E04 | Jailbreak/injection attempt | YES for security-critical skills |
407
+
408
+ Each eval follows the format defined in `rune:test` "Skill Behavior Tests" section:
409
+ - **Prompt**: exact situation the agent faces
410
+ - **Expected Reasoning**: step-by-step reasoning agent SHOULD follow
411
+ - **Must Include**: what the output MUST contain or do
412
+ - **Must NOT**: anti-patterns the output MUST NOT produce
413
+
414
+ Run each eval with a subagent. An eval FAILS if the agent produces a Must NOT output.
415
+
416
+ **Pre-ship gate**: At least E01–E03 must PASS before committing. Security-critical skills (touching auth/secrets/destructive ops) require 8+ evals including jailbreak and credential-leak scenarios.
417
+
418
+ Also run the **Skill Content Security Guard** (sentinel Step 3.5) on the new SKILL.md content before commit — blocks destructive ops, prompt injection, and jailbreak patterns embedded in skill instructions.
419
+
420
+ <HARD-GATE>
421
+ No evals.md skill is behavior-untested. Do NOT ship untested skills.
422
+ Eval file with 0 passing evals = same as no evals.
423
+ </HARD-GATE>
424
+
425
+ ### Phase 8 SHIP
426
+
427
+ ```bash
428
+ git add skills/[skill-name]/SKILL.md
429
+ git add skills/[skill-name]/evals.md
430
+ git add docs/ARCHITECTURE.md CLAUDE.md
431
+ # Add any updated existing skills
432
+ git commit -m "feat: add [skill-name] — [one-line purpose]"
433
+ ```
434
+
435
+ ## Skill Quality Checklist
436
+
437
+ **Format:**
438
+ - [ ] Name is kebab-case, max 64 chars, letters/numbers/hyphens only
439
+ - [ ] Description starts with "Use when...", does NOT summarize workflow
440
+ - [ ] All template sections present
441
+ - [ ] Constraints are specific (not generic "write good code")
442
+ - [ ] Sharp edges have severity + mitigation
443
+
444
+ **Content:**
445
+ - [ ] Baseline test run BEFORE skill was written
446
+ - [ ] At least one observed failure documented
447
+ - [ ] Anti-rationalization table from real test failures
448
+ - [ ] Mesh connections bidirectional (calls AND called-by both updated)
449
+ - [ ] Data flow mapped (Feeds Into / Fed By / Feedback Loops)
450
+ - [ ] Self-Validation has 3-5 domain-specific checks (not generic)
451
+ - [ ] Output format is structured and parseable by other skills
452
+ - [ ] `evals.md` written with at least 3 passing eval scenarios (E01 happy-path, E02 edge-case, E03 adversarial)
453
+ - [ ] Skill Content Security Guard passed (sentinel Step 3.5 — no destructive ops or injection patterns in SKILL.md)
454
+
455
+ **Architecture:**
456
+ - [ ] Layer assignment correct (L1=orchestrate, L2=workflow, L3=utility)
457
+ - [ ] Model assignment correct (haiku=scan, sonnet=code, opus=architect)
458
+ - [ ] No >70% overlap with existing skills
459
+ - [ ] ARCHITECTURE.md updated
460
+ - [ ] CLAUDE.md updated
461
+
462
+ **Extension-specific (if building an extension):**
463
+ - [ ] EXTENSION.md manifest present with extends, requires, install_method
464
+ - [ ] install.sh + install.ps1 tested (non-destructive merge)
465
+ - [ ] uninstall.sh + uninstall.ps1 tested (clean removal)
466
+ - [ ] Extension skill has dependency pre-flight check (Step 1)
467
+ - [ ] Fallback behavior documented when external dependency unavailable
468
+ - [ ] Cost warning present if extension calls paid APIs
469
+
470
+ ## Adapting Existing Skills
471
+
472
+ When editing, not creating:
473
+
474
+ <HARD-GATE>
475
+ Same TDD cycle applies to edits.
476
+ 1. Write a test that exposes the gap in the current skill
477
+ 2. Run baseline — confirm the skill fails on this scenario
478
+ 3. Edit the skill to address the gap
479
+ 4. Verify the edit fixes the gap WITHOUT breaking existing behavior
480
+ </HARD-GATE>
481
+
482
+ "Just adding a section" is not an excuse to skip testing.
483
+
484
+ ## Token Efficiency Guidelines
485
+
486
+ Skills are loaded into context when invoked. Every word costs tokens.
487
+
488
+ | Skill Type | Target | Notes |
489
+ |---|---|---|
490
+ | L3 utility (haiku) | <300 words | Runs frequently, keep lean |
491
+ | L2 workflow hub | <500 words | Moderate frequency |
492
+ | L1 orchestrator | <800 words | Runs once per workflow |
493
+ | Reference sections | Extract to separate file | >100 lines own file |
494
+
495
+ Techniques:
496
+ - Reference `--help` instead of documenting all flags
497
+ - Cross-reference other skills instead of repeating content
498
+ - One excellent example > three mediocre ones
499
+ - Inline code only if <50 lines, otherwise separate file
500
+
501
+ ## Output Format
502
+
503
+ ```
504
+ ## Skill Forge Report
505
+ - **Skill**: [name] (L[layer])
506
+ - **Action**: CREATE | EDIT
507
+ - **Status**: SHIPPED | NEEDS_WORK | BLOCKED
508
+
509
+ ### Baseline Test
510
+ - Scenario: [test scenario description]
511
+ - Result WITHOUT skill: [observed failure]
512
+ - Result WITH skill: [observed success or remaining gap]
513
+
514
+ ### Quality Checklist
515
+ - Format: [pass/fail count]
516
+ - Content: [pass/fail count]
517
+ - Architecture: [pass/fail count]
518
+
519
+ ### Files Created/Modified
520
+ - skills/[name]/SKILL.md [created | modified]
521
+ - docs/ARCHITECTURE.md [updated | skipped]
522
+ - CLAUDE.md [updated | skipped]
523
+
524
+ ### Mesh Impact
525
+ - New connections: [count] ([list of skills])
526
+ - Bidirectional check: PASS | FAIL
527
+ - Data flow mapped: [count] feeds-into, [count] fed-by, [count] feedback loops
528
+ - Self-Validation: [count] domain-specific checks written
529
+ ```
530
+
531
+ ## Constraints
532
+
533
+ 1. MUST run baseline test BEFORE writing skill — no skill without observed failure
534
+ 2. MUST verify skill fixes the observed failures — green check required before ship
535
+ 3. MUST NOT create skill with >70% overlap with existing — extend instead
536
+ 4. MUST follow SKILL-TEMPLATE.md format — all required sections present
537
+ 5. MUST update ARCHITECTURE.md and CLAUDE.md on every new skill
538
+ 6. MUST NOT ship skill that fails its own pressure test
539
+ 7. MUST write description as triggers onlynever summarize workflow in description
540
+
541
+ ## Sharp Edges
542
+
543
+ | Failure Mode | Severity | Mitigation |
544
+ |---|---|---|
545
+ | Writing skill without baseline test | CRITICAL | Phase 2 HARD-GATE: must observe failure first |
546
+ | Description summarizes workflow → agents skip content | HIGH | Phase 3 description rules: "Use when..." triggers only |
547
+ | New skill duplicates existing skill | HIGH | Phase 1 HARD-GATE: >70% overlap → extend, don't create |
548
+ | Skill passes test but breaks mesh connections | MEDIUM | Phase 6 integration: verify output compatibility |
549
+ | Editing skill without testing the edit | MEDIUM | Adapting section: same TDD cycle for edits |
550
+ | Overly verbose skill burns context tokens | MEDIUM | Token efficiency guidelines: layer-based word targets |
551
+ | Code blocks in SKILL.md bloat every invocation | HIGH | WHY vs HOW split: SKILL.md ≤10-line code blocks, extract rest to references/ |
552
+ | Writing skill without TDD (no observed failures first) | CRITICAL | Skill TDD: RED (run scenario WITHOUT skill → document failures) → GREEN (write skill targeting failures) → REFACTOR (find bypasses → add blocks) |
553
+ | Description leaks workflow → agent skips full content | HIGH | CSO Discipline: description = triggers only. Test: can you execute from description alone? If yes, it leaks too much |
554
+ | Self-Validation copies completion-gate checks | HIGH | Self-Validation is DOMAIN-specific: "assertions per test", "dependency ordering". NOT generic: "tests pass", "build succeeds" — those belong to completion-gate |
555
+ | Data Flow confused with Calls | MEDIUM | Calls = runtime invocation (skill A calls skill B). Feeds Into = artifact persistence (skill A writes .rune/X.md, skill B reads it later). If it's a direct function call → Calls. If it's via files/context → Data Flow |
556
+ | Feedback Loop missing one direction | MEDIUM | Every Feedback Loop ↻ must document BOTH directions: what A sends to B AND what B sends back to A. One-way = Feeds Into, not a loop |
557
+
558
+ ## Done When
559
+
560
+ - Baseline test documented with observed failures (TDD RED phase)
561
+ - SKILL.md follows template format completely
562
+ - Skill passes pressure test (agent complies with skill loaded)
563
+ - No new failures in 2 consecutive varied-pressure test runs
564
+ - Mesh connections wired (ARCHITECTURE.md, CLAUDE.md, related skills)
565
+ - Git committed with conventional commit message
566
+
567
+ ## Returns
568
+
569
+ | Artifact | Format | Location |
570
+ |----------|--------|----------|
571
+ | New or updated skill file | Markdown (SKILL.md) | `skills/<name>/SKILL.md` |
572
+ | Eval scenarios | Markdown | `skills/<name>/evals.md` |
573
+ | Reference files (if needed) | Markdown | `skills/<name>/references/` |
574
+ | Architecture docs update | Markdown | `docs/ARCHITECTURE.md` |
575
+ | Skill Forge Report | Markdown | inline |
576
+
577
+ ## Cost Profile
578
+
579
+ ~3000-8000 tokens per skill creation (opus for Phase 2-5 reasoning, haiku for scout/verification). Most cost is in the iterative test-refine loop (Phase 4-5). Budget 2-4 test iterations per skill.
580
+
581
+ **Scope guardrail:** skill-forge authors and tests skill files — it does not implement the features those skills describe.