@thierrynakoa/fire-flow 10.0.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 (215) hide show
  1. package/.claude-plugin/plugin.json +64 -0
  2. package/ARCHITECTURE-DIAGRAM.md +440 -0
  3. package/COMMAND-REFERENCE.md +172 -0
  4. package/DOMINION-FLOW-OVERVIEW.md +421 -0
  5. package/LICENSE +21 -0
  6. package/QUICK-START.md +351 -0
  7. package/README.md +398 -0
  8. package/TROUBLESHOOTING.md +264 -0
  9. package/agents/fire-codebase-mapper.md +484 -0
  10. package/agents/fire-debugger.md +535 -0
  11. package/agents/fire-executor.md +949 -0
  12. package/agents/fire-fact-checker.md +276 -0
  13. package/agents/fire-learncoding-explainer.md +237 -0
  14. package/agents/fire-learncoding-walker.md +147 -0
  15. package/agents/fire-planner.md +675 -0
  16. package/agents/fire-project-researcher.md +155 -0
  17. package/agents/fire-research-synthesizer.md +166 -0
  18. package/agents/fire-researcher.md +723 -0
  19. package/agents/fire-reviewer.md +499 -0
  20. package/agents/fire-roadmapper.md +203 -0
  21. package/agents/fire-verifier.md +880 -0
  22. package/bin/cli.js +208 -0
  23. package/commands/fire-0-orient.md +476 -0
  24. package/commands/fire-1-new.md +281 -0
  25. package/commands/fire-1a-discuss.md +455 -0
  26. package/commands/fire-2-plan.md +527 -0
  27. package/commands/fire-3-execute.md +1303 -0
  28. package/commands/fire-4-verify.md +845 -0
  29. package/commands/fire-5-handoff.md +515 -0
  30. package/commands/fire-6-resume.md +501 -0
  31. package/commands/fire-7-review.md +409 -0
  32. package/commands/fire-add-new-skill.md +598 -0
  33. package/commands/fire-analytics.md +499 -0
  34. package/commands/fire-assumptions.md +78 -0
  35. package/commands/fire-autonomous.md +528 -0
  36. package/commands/fire-brainstorm.md +413 -0
  37. package/commands/fire-complete-milestone.md +270 -0
  38. package/commands/fire-dashboard.md +375 -0
  39. package/commands/fire-debug.md +663 -0
  40. package/commands/fire-discover.md +616 -0
  41. package/commands/fire-double-check.md +460 -0
  42. package/commands/fire-execute-plan.md +182 -0
  43. package/commands/fire-learncoding.md +242 -0
  44. package/commands/fire-loop-resume.md +272 -0
  45. package/commands/fire-loop-stop.md +198 -0
  46. package/commands/fire-loop.md +1168 -0
  47. package/commands/fire-map-codebase.md +313 -0
  48. package/commands/fire-new-milestone.md +356 -0
  49. package/commands/fire-reflect.md +235 -0
  50. package/commands/fire-research.md +246 -0
  51. package/commands/fire-search.md +330 -0
  52. package/commands/fire-security-audit-repo.md +293 -0
  53. package/commands/fire-security-scan.md +484 -0
  54. package/commands/fire-session-summary.md +252 -0
  55. package/commands/fire-skills-diff.md +506 -0
  56. package/commands/fire-skills-history.md +388 -0
  57. package/commands/fire-skills-rollback.md +408 -0
  58. package/commands/fire-skills-sync.md +470 -0
  59. package/commands/fire-test.md +520 -0
  60. package/commands/fire-todos.md +335 -0
  61. package/commands/fire-transition.md +186 -0
  62. package/commands/fire-update.md +312 -0
  63. package/commands/fire-verify-uat.md +146 -0
  64. package/commands/fire-vuln-scan.md +493 -0
  65. package/hooks/hooks.json +16 -0
  66. package/hooks/run-hook.cmd +69 -0
  67. package/hooks/run-hook.sh +8 -0
  68. package/hooks/run-session-end.cmd +49 -0
  69. package/hooks/run-session-end.sh +7 -0
  70. package/hooks/session-end.sh +90 -0
  71. package/hooks/session-start.sh +111 -0
  72. package/package.json +52 -0
  73. package/plugin.json +7 -0
  74. package/references/auto-skill-extraction.md +136 -0
  75. package/references/behavioral-directives.md +365 -0
  76. package/references/blocker-tracking.md +155 -0
  77. package/references/checkpoints.md +165 -0
  78. package/references/circuit-breaker.md +410 -0
  79. package/references/context-engineering.md +587 -0
  80. package/references/decision-time-guidance.md +289 -0
  81. package/references/error-classification.md +326 -0
  82. package/references/execution-mode-intelligence.md +242 -0
  83. package/references/git-integration.md +217 -0
  84. package/references/honesty-protocols.md +304 -0
  85. package/references/integration-architecture.md +470 -0
  86. package/references/issue-to-pr-pipeline.md +150 -0
  87. package/references/metrics-and-trends.md +234 -0
  88. package/references/playwright-e2e-testing.md +326 -0
  89. package/references/questioning.md +125 -0
  90. package/references/research-improvements.md +110 -0
  91. package/references/skills-usage-guide.md +429 -0
  92. package/references/tdd.md +131 -0
  93. package/references/testing-enforcement.md +192 -0
  94. package/references/ui-brand.md +383 -0
  95. package/references/validation-checklist.md +456 -0
  96. package/references/verification-patterns.md +187 -0
  97. package/references/warrior-principles.md +173 -0
  98. package/skills-library/SKILLS-INDEX.md +588 -0
  99. package/skills-library/_general/frontend/html-visual-reports.md +292 -0
  100. package/skills-library/_general/methodology/debug-swarm-researcher-escape-hatch.md +240 -0
  101. package/skills-library/_general/methodology/learncoding-agentic-pattern.md +114 -0
  102. package/skills-library/_general/methodology/shell-autonomous-loop-fixplan.md +238 -0
  103. package/skills-library/basics/api-rest-basics.md +162 -0
  104. package/skills-library/basics/env-variables.md +96 -0
  105. package/skills-library/basics/error-handling-basics.md +125 -0
  106. package/skills-library/basics/git-commit-conventions.md +106 -0
  107. package/skills-library/basics/readme-template.md +108 -0
  108. package/skills-library/common-tasks/async-await-patterns.md +157 -0
  109. package/skills-library/common-tasks/auth-jwt-basics.md +164 -0
  110. package/skills-library/common-tasks/database-schema-design.md +166 -0
  111. package/skills-library/common-tasks/file-upload-basics.md +166 -0
  112. package/skills-library/common-tasks/form-validation.md +159 -0
  113. package/skills-library/debugging/FAILURE_TAXONOMY_CLASSIFICATION.md +117 -0
  114. package/skills-library/debugging/THREE_AGENT_HYPOTHESIS_DEBUGGING.md +86 -0
  115. package/skills-library/methodology/BREATH_BASED_PARALLEL_EXECUTION.md +678 -0
  116. package/skills-library/methodology/CONFIDENCE_GATED_EXECUTION.md +243 -0
  117. package/skills-library/methodology/EVIDENCE_BASED_VALIDATION.md +308 -0
  118. package/skills-library/methodology/MULTI_PERSPECTIVE_CODE_REVIEW.md +330 -0
  119. package/skills-library/methodology/PATH_VERIFICATION_GATE.md +211 -0
  120. package/skills-library/methodology/REFLEXION_MEMORY_PATTERN.md +183 -0
  121. package/skills-library/methodology/RESEARCH_BACKED_WORKFLOW_UPGRADE.md +263 -0
  122. package/skills-library/methodology/SABBATH_REST_PATTERN.md +267 -0
  123. package/skills-library/methodology/STONE_AND_SCAFFOLD.md +220 -0
  124. package/skills-library/performance/cache-augmented-generation.md +172 -0
  125. package/skills-library/quality-safety/debugging-steps.md +147 -0
  126. package/skills-library/quality-safety/deployment-checklist.md +155 -0
  127. package/skills-library/quality-safety/security-checklist.md +204 -0
  128. package/skills-library/quality-safety/testing-basics.md +180 -0
  129. package/skills-library/security/agent-security-scanner.md +445 -0
  130. package/skills-library/specialists/api-architecture/api-designer.md +49 -0
  131. package/skills-library/specialists/api-architecture/graphql-architect.md +49 -0
  132. package/skills-library/specialists/api-architecture/mcp-developer.md +51 -0
  133. package/skills-library/specialists/api-architecture/microservices-architect.md +50 -0
  134. package/skills-library/specialists/api-architecture/websocket-engineer.md +48 -0
  135. package/skills-library/specialists/backend/django-expert.md +52 -0
  136. package/skills-library/specialists/backend/fastapi-expert.md +52 -0
  137. package/skills-library/specialists/backend/laravel-specialist.md +52 -0
  138. package/skills-library/specialists/backend/nestjs-expert.md +51 -0
  139. package/skills-library/specialists/backend/rails-expert.md +53 -0
  140. package/skills-library/specialists/backend/spring-boot-engineer.md +56 -0
  141. package/skills-library/specialists/data-ml/fine-tuning-expert.md +48 -0
  142. package/skills-library/specialists/data-ml/ml-pipeline.md +47 -0
  143. package/skills-library/specialists/data-ml/pandas-pro.md +47 -0
  144. package/skills-library/specialists/data-ml/rag-architect.md +51 -0
  145. package/skills-library/specialists/data-ml/spark-engineer.md +47 -0
  146. package/skills-library/specialists/frontend/angular-architect.md +52 -0
  147. package/skills-library/specialists/frontend/flutter-expert.md +51 -0
  148. package/skills-library/specialists/frontend/nextjs-developer.md +54 -0
  149. package/skills-library/specialists/frontend/react-native-expert.md +50 -0
  150. package/skills-library/specialists/frontend/vue-expert.md +51 -0
  151. package/skills-library/specialists/infrastructure/chaos-engineer.md +74 -0
  152. package/skills-library/specialists/infrastructure/cloud-architect.md +70 -0
  153. package/skills-library/specialists/infrastructure/database-optimizer.md +64 -0
  154. package/skills-library/specialists/infrastructure/devops-engineer.md +70 -0
  155. package/skills-library/specialists/infrastructure/kubernetes-specialist.md +52 -0
  156. package/skills-library/specialists/infrastructure/monitoring-expert.md +70 -0
  157. package/skills-library/specialists/infrastructure/sre-engineer.md +70 -0
  158. package/skills-library/specialists/infrastructure/terraform-engineer.md +51 -0
  159. package/skills-library/specialists/languages/cpp-pro.md +74 -0
  160. package/skills-library/specialists/languages/csharp-developer.md +69 -0
  161. package/skills-library/specialists/languages/dotnet-core-expert.md +54 -0
  162. package/skills-library/specialists/languages/golang-pro.md +51 -0
  163. package/skills-library/specialists/languages/java-architect.md +49 -0
  164. package/skills-library/specialists/languages/javascript-pro.md +68 -0
  165. package/skills-library/specialists/languages/kotlin-specialist.md +68 -0
  166. package/skills-library/specialists/languages/php-pro.md +49 -0
  167. package/skills-library/specialists/languages/python-pro.md +52 -0
  168. package/skills-library/specialists/languages/react-expert.md +51 -0
  169. package/skills-library/specialists/languages/rust-engineer.md +50 -0
  170. package/skills-library/specialists/languages/sql-pro.md +56 -0
  171. package/skills-library/specialists/languages/swift-expert.md +69 -0
  172. package/skills-library/specialists/languages/typescript-pro.md +51 -0
  173. package/skills-library/specialists/platform/atlassian-mcp.md +52 -0
  174. package/skills-library/specialists/platform/embedded-systems.md +53 -0
  175. package/skills-library/specialists/platform/game-developer.md +53 -0
  176. package/skills-library/specialists/platform/salesforce-developer.md +53 -0
  177. package/skills-library/specialists/platform/shopify-expert.md +49 -0
  178. package/skills-library/specialists/platform/wordpress-pro.md +49 -0
  179. package/skills-library/specialists/quality/code-documenter.md +51 -0
  180. package/skills-library/specialists/quality/code-reviewer.md +67 -0
  181. package/skills-library/specialists/quality/debugging-wizard.md +51 -0
  182. package/skills-library/specialists/quality/fullstack-guardian.md +51 -0
  183. package/skills-library/specialists/quality/legacy-modernizer.md +50 -0
  184. package/skills-library/specialists/quality/playwright-expert.md +65 -0
  185. package/skills-library/specialists/quality/spec-miner.md +56 -0
  186. package/skills-library/specialists/quality/test-master.md +65 -0
  187. package/skills-library/specialists/security/secure-code-guardian.md +55 -0
  188. package/skills-library/specialists/security/security-reviewer.md +53 -0
  189. package/skills-library/specialists/workflow/architecture-designer.md +53 -0
  190. package/skills-library/specialists/workflow/cli-developer.md +70 -0
  191. package/skills-library/specialists/workflow/feature-forge.md +65 -0
  192. package/skills-library/specialists/workflow/prompt-engineer.md +54 -0
  193. package/skills-library/specialists/workflow/the-fool.md +62 -0
  194. package/templates/ASSUMPTIONS.md +125 -0
  195. package/templates/BLOCKERS.md +73 -0
  196. package/templates/DECISION_LOG.md +116 -0
  197. package/templates/UAT.md +96 -0
  198. package/templates/blueprint.md +94 -0
  199. package/templates/brainstorm.md +185 -0
  200. package/templates/conscience.md +92 -0
  201. package/templates/fire-handoff.md +159 -0
  202. package/templates/metrics.md +67 -0
  203. package/templates/phase-prompt.md +142 -0
  204. package/templates/record.md +131 -0
  205. package/templates/review-report.md +117 -0
  206. package/templates/skills-index.md +157 -0
  207. package/templates/verification.md +149 -0
  208. package/templates/vision.md +79 -0
  209. package/validation-config.yml +793 -0
  210. package/version.json +7 -0
  211. package/workflows/execute-phase.md +732 -0
  212. package/workflows/handoff-session.md +678 -0
  213. package/workflows/new-project.md +578 -0
  214. package/workflows/plan-phase.md +592 -0
  215. package/workflows/verify-phase.md +874 -0
@@ -0,0 +1,598 @@
1
+ ---
2
+ name: power-add-new-skill
3
+ description: Add a new skill to the skills library when you solve a hard problem
4
+ arguments:
5
+ - name: from
6
+ description: Source for skill extraction (summary, session, or manual)
7
+ required: false
8
+ type: string
9
+ default: "interactive"
10
+ triggers:
11
+ - "add skill"
12
+ - "contribute skill"
13
+ - "new skill"
14
+ - "save pattern"
15
+ ---
16
+
17
+ # /fire-add-new-skill - Add New Skill to Library
18
+
19
+ Interactive wizard to contribute new skills to the Dominion Flow skills library.
20
+
21
+ ## Purpose
22
+
23
+ Capture and preserve proven solutions when you:
24
+ - Solve a challenging technical problem
25
+ - Discover a reusable pattern
26
+ - Find a better approach than existing skills
27
+ - Want to share knowledge across projects
28
+
29
+ ## Arguments
30
+
31
+ | Argument | Required | Description |
32
+ |----------|----------|-------------|
33
+ | `from` | No | Source: `summary` (from RECORD.md), `session` (current work), `manual` (interactive) |
34
+
35
+ ## Usage Examples
36
+
37
+ ```bash
38
+ # Interactive wizard (default)
39
+ /fire-add-new-skill
40
+
41
+ # Extract from most recent RECORD.md
42
+ /fire-add-new-skill --from summary
43
+
44
+ # Extract from current session context
45
+ /fire-add-new-skill --from session
46
+
47
+ # Quick contribute with inline details
48
+ /fire-add-new-skill --name "retry-backoff" --category "api-patterns"
49
+ ```
50
+
51
+ ## Process
52
+
53
+ <step number="1">
54
+ ### Analyze Source Context
55
+
56
+ If `--from summary`:
57
+ - Read most recent RECORD.md from `.planning/phases/`
58
+ - Extract complex solutions, workarounds, discoveries
59
+ - Identify patterns worth preserving
60
+
61
+ If `--from session`:
62
+ - Review current conversation context
63
+ - Identify novel solutions implemented
64
+ - Check for complexity indicators:
65
+ - Multiple failed attempts before success
66
+ - Research queries to external sources
67
+ - Code refactoring iterations
68
+ - Comments indicating non-obvious solutions
69
+
70
+ If interactive (default):
71
+ - Prompt user for problem/solution details
72
+ </step>
73
+
74
+ <step number="2">
75
+ ### Interactive Wizard
76
+
77
+ Display contribution wizard:
78
+
79
+ ```
80
+ =============================================================
81
+ SKILLS CONTRIBUTION WIZARD
82
+ =============================================================
83
+
84
+ Let's capture this valuable pattern for future use!
85
+
86
+ -------------------------------------------------------------
87
+ STEP 1: PROBLEM DESCRIPTION
88
+ -------------------------------------------------------------
89
+
90
+ What problem did you solve?
91
+ (Describe the issue, symptoms, or challenge)
92
+
93
+ > [User input or extracted from source]
94
+
95
+ -------------------------------------------------------------
96
+ STEP 2: CATEGORY SELECTION
97
+ -------------------------------------------------------------
98
+
99
+ What category best fits this skill?
100
+
101
+ 1. database-solutions - Database patterns, queries, optimization
102
+ 2. api-patterns - REST, GraphQL, versioning, errors
103
+ 3. security - Auth, validation, encryption
104
+ 4. performance - Caching, optimization, bundles
105
+ 5. frontend - React, Vue, state, CSS
106
+ 6. testing - Unit, integration, E2E, mocking
107
+ 7. infrastructure - Docker, CI/CD, deployment
108
+ 8. form-solutions - Validation, multi-step, uploads
109
+ 9. ecommerce - Payments, cart, inventory
110
+ 10. video-media - Streaming, processing
111
+ 11. document-processing - PDF, parsing, generation
112
+ 12. integrations - Third-party APIs, webhooks
113
+ 13. automation - Scripts, tasks, workflows
114
+ 14. patterns-standards - Design patterns, standards
115
+ 15. methodology - Process, planning, review
116
+ 16. [custom] - Create new category
117
+
118
+ Select category (1-16): > [User selection]
119
+
120
+ -------------------------------------------------------------
121
+ STEP 2.5: SCOPE CLASSIFICATION (v7.0 — SkillRL)
122
+ -------------------------------------------------------------
123
+
124
+ Is this skill general (any project) or project-specific?
125
+
126
+ 1. General — Applies regardless of project (coding patterns,
127
+ debugging strategies, API design, testing approaches)
128
+ 2. Project — Applies only to this project's stack/domain
129
+ (project-specific config, domain logic, custom APIs)
130
+
131
+ Select scope (1-2): > [User selection]
132
+
133
+ If General → save to skills-library/_general/{category}/{name}.md
134
+ If Project → save to skills-library/{category}/{name}.md (current behavior)
135
+
136
+ -------------------------------------------------------------
137
+ STEP 3: SKILL NAME
138
+ -------------------------------------------------------------
139
+
140
+ Skill name (kebab-case, descriptive):
141
+ Examples: "connection-pool-timeout", "jwt-refresh-rotation"
142
+
143
+ > [User input]
144
+
145
+ -------------------------------------------------------------
146
+ STEP 4: SOLUTION PATTERN
147
+ -------------------------------------------------------------
148
+
149
+ Describe the solution approach:
150
+ (What fixed the problem? What's the recommended pattern?)
151
+
152
+ > [User input]
153
+
154
+ -------------------------------------------------------------
155
+ STEP 5: CODE EXAMPLE
156
+ -------------------------------------------------------------
157
+
158
+ Provide a before/after code example:
159
+
160
+ [Before - Problematic Code]
161
+ > [User input or extracted]
162
+
163
+ [After - Solution Code]
164
+ > [User input or extracted]
165
+
166
+ -------------------------------------------------------------
167
+ STEP 6: USAGE GUIDANCE
168
+ -------------------------------------------------------------
169
+
170
+ When should this skill be used?
171
+ > [User input]
172
+
173
+ When should this skill NOT be used?
174
+ > [User input]
175
+
176
+ -------------------------------------------------------------
177
+ STEP 7: TAGS & METADATA
178
+ -------------------------------------------------------------
179
+
180
+ Tags (comma-separated):
181
+ Examples: prisma, postgresql, typescript, react
182
+
183
+ > [User input]
184
+
185
+ Difficulty level:
186
+ 1. easy - Simple to apply, minimal context needed
187
+ 2. medium - Requires some understanding of the domain
188
+ 3. hard - Complex, requires deep expertise
189
+
190
+ > [User selection]
191
+
192
+ =============================================================
193
+ ```
194
+ </step>
195
+
196
+ <step number="3">
197
+ ### Check for Duplicates
198
+
199
+ Search existing skills for potential duplicates:
200
+
201
+ ```
202
+ -------------------------------------------------------------
203
+ DUPLICATE CHECK
204
+ -------------------------------------------------------------
205
+
206
+ Searching for similar skills...
207
+
208
+ Potential matches found:
209
+
210
+ 1. [{category}] {existing-skill-name}
211
+ Similarity: 75%
212
+ Problem: {brief problem}
213
+
214
+ [View] [This is different] [Update existing instead]
215
+
216
+ 2. [{category}] {existing-skill-name}
217
+ Similarity: 45%
218
+ ...
219
+
220
+ No close matches? [Proceed with new skill]
221
+
222
+ -------------------------------------------------------------
223
+ ```
224
+
225
+ Options:
226
+ - **This is different**: Proceed with new skill creation
227
+ - **Update existing instead**: Launch skill update flow
228
+ - **View**: Show existing skill for comparison
229
+ </step>
230
+
231
+ <step number="4">
232
+ ### Generate Skill Document
233
+
234
+ Create skill file from collected information:
235
+
236
+ ```markdown
237
+ ---
238
+ name: {skill-name}
239
+ category: {category}
240
+ version: 1.0.0
241
+ contributed: {YYYY-MM-DD}
242
+ contributor: {project-name}
243
+ last_updated: {YYYY-MM-DD}
244
+ tags: [{tags}]
245
+ difficulty: {easy|medium|hard}
246
+ ---
247
+
248
+ # {Skill Name (Title Case)}
249
+
250
+ ## Problem
251
+
252
+ {Problem description from wizard}
253
+
254
+ ## Solution Pattern
255
+
256
+ {Solution approach from wizard}
257
+
258
+ ## Code Example
259
+
260
+ ```{language}
261
+ // Before (problematic)
262
+ {before code}
263
+
264
+ // After (solution)
265
+ {after code}
266
+ ```
267
+
268
+ ## When to Use
269
+
270
+ - {scenario 1}
271
+ - {scenario 2}
272
+ - {scenario 3}
273
+
274
+ ## When NOT to Use
275
+
276
+ - {anti-pattern 1}
277
+ - {anti-pattern 2}
278
+
279
+ ## Related Skills
280
+
281
+ - [{related-skill-1}](../{category}/{related-skill-1}.md)
282
+ - [{related-skill-2}](../{category}/{related-skill-2}.md)
283
+
284
+ ## References
285
+
286
+ - {external link if provided}
287
+ - Contributed from: {project-name}
288
+ ```
289
+ </step>
290
+
291
+ <step number="4.5">
292
+ ### Security Scan Gate (MANDATORY)
293
+
294
+ **Before saving any new skill, run the security scanner.**
295
+
296
+ This prevents malicious instructions from entering the skills library — the exact attack vector used in the OpenClaw/ClawdBot incident (2025).
297
+
298
+ ```
299
+ -------------------------------------------------------------
300
+ SECURITY SCAN
301
+ -------------------------------------------------------------
302
+
303
+ Scanning skill content for malicious patterns...
304
+
305
+ Running /fire-security-scan on generated skill document:
306
+ Layer 1: Invisible characters ... {CLEAN | FOUND}
307
+ Layer 2: Prompt injection ... {CLEAN | FOUND}
308
+ Layer 3: Credential harvesting ... {CLEAN | FOUND}
309
+ Layer 4: PII collection ... {CLEAN | FOUND}
310
+ Layer 5: Tool poisoning ... {CLEAN | FOUND}
311
+
312
+ Verdict: {CLEAN | SUSPICIOUS | BLOCKED}
313
+
314
+ -------------------------------------------------------------
315
+ ```
316
+
317
+ **Apply the 6-layer scan from `security/agent-security-scanner.md` to the generated skill content:**
318
+
319
+ 1. **NFKC-normalize** the generated skill text
320
+ 2. Scan for **invisible Unicode characters** (zero-width, tag chars, directional overrides)
321
+ 3. Scan for **prompt injection signatures** (instruction override, role manipulation, code execution)
322
+ 4. Scan for **credential harvesting** ("collect API keys", "read .env and send", actual secret patterns)
323
+ 5. Scan for **PII collection** (SSN, credit card, crypto wallet patterns)
324
+ 6. Scan for **tool poisoning** (exfiltration URLs, cross-tool manipulation, urgency language)
325
+
326
+ **If CLEAN:** Proceed to save.
327
+
328
+ **If SUSPICIOUS:**
329
+ ```
330
+ Use AskUserQuestion:
331
+ header: "Security"
332
+ question: "Security scan found {N} suspicious patterns in this skill. Review?"
333
+ options:
334
+ - "Show findings" - Display flagged lines with context
335
+ - "Save anyway" - Accept risk and save
336
+ - "Cancel" - Do not save this skill
337
+ ```
338
+
339
+ **If BLOCKED:**
340
+ ```
341
+ SECURITY ALERT: This skill has been BLOCKED.
342
+
343
+ Detected: {threat description}
344
+ - {finding 1}
345
+ - {finding 2}
346
+
347
+ This skill will NOT be saved to the library.
348
+ Malicious patterns in skills are the EXACT attack vector used in
349
+ the OpenClaw/ClawdBot hack (2025).
350
+ ```
351
+
352
+ **Skills from external sources (marketplace, online) get --deep mode automatically.**
353
+ **Skills from --from session or --from summary get quick mode.**
354
+ </step>
355
+
356
+ <step number="4.6">
357
+ ### Credential Filtration Gate (MANDATORY — v9.1)
358
+
359
+ **After security scan, run the credential filter on the generated skill content.**
360
+
361
+ This catches real API keys, passwords, and connection strings that leak into skills when AI agents extract patterns from live session work.
362
+
363
+ **Chain this gate blocks:** Real `.env` → session work → skill extraction → skills-library → git
364
+
365
+ **Run the shared credential scanner:**
366
+ ```bash
367
+ # Save generated skill to temp file, then scan
368
+ echo "{generated_skill_content}" > /tmp/skill-check.md
369
+ bash ~/.claude/hooks/credential-filter.sh /tmp/skill-check.md
370
+ RESULT=$?
371
+ rm /tmp/skill-check.md
372
+ ```
373
+
374
+ **If RESULT=0 (clean):** Proceed to save.
375
+
376
+ **If RESULT=1 (credentials found):**
377
+ ```
378
+ -------------------------------------------------------------
379
+ CREDENTIAL LEAK BLOCKED
380
+ -------------------------------------------------------------
381
+
382
+ Real credentials detected in generated skill content!
383
+
384
+ This is the EXACT attack chain from the 2026-02-24 incident:
385
+ .env values → session work → skill docs → git → public
386
+
387
+ {scanner output showing matched lines}
388
+
389
+ ACTION REQUIRED:
390
+ Replace real values with placeholders:
391
+ - API keys → YOUR_API_KEY
392
+ - Client IDs → YOUR_CLIENT_ID
393
+ - Secrets → YOUR_CLIENT_SECRET
394
+ - Account IDs → YOUR_ACCOUNT_ID
395
+ - Passwords → YOUR_PASSWORD
396
+ - Conn strings → YOUR_CONNECTION_STRING
397
+
398
+ After replacing, re-run /fire-add-new-skill to try again.
399
+ -------------------------------------------------------------
400
+ ```
401
+
402
+ **Do NOT save the skill. Do NOT offer to save anyway.**
403
+ Unlike the security scan (Step 4.5) which allows "save anyway" for suspicious content, credential leaks are ALWAYS blocked. There is no valid reason to commit real secrets to the skills library.
404
+ </step>
405
+
406
+ <step number="5">
407
+ ### Save and Update Index
408
+
409
+ 1. Save skill file:
410
+ - Path: `~/.claude/plugins/dominion-flow/skills-library/{category}/{skill-name}.md`
411
+
412
+ 2. Update SKILLS-INDEX.md:
413
+ - Add entry to category section
414
+ - Update total skill count
415
+ - Add to recent additions
416
+
417
+ 3. Git commit (if skills library is versioned):
418
+ ```bash
419
+ cd ~/.claude/plugins/dominion-flow/skills-library
420
+ git add {category}/{skill-name}.md SKILLS-INDEX.md
421
+ git commit -m "feat(skills): add {category}/{skill-name}"
422
+ ```
423
+ </step>
424
+
425
+ <step number="6">
426
+ ### Confirmation
427
+
428
+ Display success message:
429
+
430
+ ```
431
+ =============================================================
432
+ SKILL CONTRIBUTED SUCCESSFULLY
433
+ =============================================================
434
+
435
+ Created: skills-library/{category}/{skill-name}.md
436
+ Updated: skills-library/SKILLS-INDEX.md
437
+
438
+ -------------------------------------------------------------
439
+ SKILL SUMMARY
440
+ -------------------------------------------------------------
441
+
442
+ Name: {skill-name}
443
+ Category: {category}
444
+ Tags: {tags}
445
+ Difficulty: {difficulty}
446
+
447
+ This skill is now available for:
448
+ - Search: /fire-search "{skill-name}"
449
+ - Planning: Add to skills_to_apply in BLUEPRINT.md
450
+ - Agents: Automatic reference during execution
451
+
452
+ -------------------------------------------------------------
453
+ NEXT STEPS
454
+ -------------------------------------------------------------
455
+
456
+ 1. Consider syncing to global library:
457
+ /fire-skills-sync --push
458
+
459
+ 2. View your contribution:
460
+ /fire-search --detail {category}/{skill-name}
461
+
462
+ 3. Continue working on current task
463
+
464
+ =============================================================
465
+
466
+ Thank you for contributing to the skills library!
467
+ ```
468
+ </step>
469
+
470
+ ## Skill Document Template
471
+
472
+ Full template for reference:
473
+
474
+ ```markdown
475
+ ---
476
+ name: {skill-name}
477
+ category: {category}
478
+ version: 1.0.0
479
+ contributed: YYYY-MM-DD
480
+ contributor: {project-name}
481
+ last_updated: YYYY-MM-DD
482
+ contributors:
483
+ - {project-name}
484
+ tags: [tag1, tag2, tag3]
485
+ difficulty: easy | medium | hard
486
+ usage_count: 0
487
+ success_rate: 100
488
+ ---
489
+
490
+ # {Skill Name}
491
+
492
+ ## Problem
493
+
494
+ [What problem does this skill solve?]
495
+ [Be specific about symptoms, error messages, or scenarios]
496
+
497
+ ## Solution Pattern
498
+
499
+ [The recommended approach]
500
+ [Explain the "why" behind the solution]
501
+
502
+ ## Code Example
503
+
504
+ ```{language}
505
+ // Before (problematic)
506
+ [code showing the problem]
507
+
508
+ // After (solution)
509
+ [code showing the fix]
510
+ ```
511
+
512
+ ## Implementation Steps
513
+
514
+ 1. [Step 1]
515
+ 2. [Step 2]
516
+ 3. [Step 3]
517
+
518
+ ## When to Use
519
+
520
+ - [Scenario 1 where this applies]
521
+ - [Scenario 2 where this applies]
522
+ - [Signs that this skill is needed]
523
+
524
+ ## When NOT to Use
525
+
526
+ - [Anti-pattern 1 - when this would be wrong]
527
+ - [Anti-pattern 2 - alternative situations]
528
+ - [Conditions where different approach is better]
529
+
530
+ ## Common Mistakes
531
+
532
+ - [Mistake 1 to avoid]
533
+ - [Mistake 2 to avoid]
534
+
535
+ ## Related Skills
536
+
537
+ - [related-skill-1] - [brief description]
538
+ - [related-skill-2] - [brief description]
539
+
540
+ ## References
541
+
542
+ - [Link to documentation]
543
+ - [Link to related article]
544
+ - [Link to original issue/PR if applicable]
545
+ ```
546
+
547
+ ## Auto-Contribution Triggers
548
+
549
+ The system may automatically prompt for contribution when:
550
+
551
+ 1. **Complexity indicators detected**:
552
+ - Task took >30 minutes to solve
553
+ - Multiple research attempts
554
+ - Code comments: "// tricky:", "// hard:", "// discovered:"
555
+
556
+ 2. **Novel pattern identified**:
557
+ - Pattern not found in existing skills library
558
+ - Unique solution to common problem
559
+
560
+ 3. **Success after failure**:
561
+ - Multiple failed attempts before working solution
562
+ - Test failures followed by passing tests
563
+
564
+ Auto-prompt display:
565
+ ```
566
+ -------------------------------------------------------------
567
+ CONTRIBUTION OPPORTUNITY
568
+ -------------------------------------------------------------
569
+
570
+ This looks like a valuable pattern!
571
+
572
+ You solved: {detected problem}
573
+ Using: {detected technique}
574
+
575
+ Would you like to contribute this to the skills library?
576
+
577
+ [Yes, contribute now] [Later] [Never for this pattern]
578
+
579
+ -------------------------------------------------------------
580
+ ```
581
+
582
+ ## Options
583
+
584
+ | Option | Description |
585
+ |--------|-------------|
586
+ | `--from summary` | Extract from most recent RECORD.md |
587
+ | `--from session` | Extract from current session context |
588
+ | `--name {name}` | Pre-fill skill name |
589
+ | `--category {cat}` | Pre-fill category |
590
+ | `--quick` | Minimal prompts, use defaults |
591
+ | `--dry-run` | Preview without saving |
592
+
593
+ ## Related Commands
594
+
595
+ - `/fire-search` - Search existing skills
596
+ - `/fire-skills-sync` - Sync to global library
597
+ - `/fire-skills-history` - View contribution history
598
+ - `/fire-analytics` - See skill usage patterns