@atlashub/smartstack-cli 1.37.0 → 2.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 (99) hide show
  1. package/config/mcp-defaults.json +62 -0
  2. package/dist/index.js +57 -4
  3. package/dist/index.js.map +1 -1
  4. package/dist/mcp-entry.mjs +16984 -0
  5. package/dist/mcp-entry.mjs.map +1 -0
  6. package/package.json +14 -5
  7. package/templates/agents/gitflow/start.md +5 -4
  8. package/templates/agents/mcp-healthcheck.md +15 -13
  9. package/templates/mcp-scaffolding/component.tsx.hbs +298 -0
  10. package/templates/mcp-scaffolding/controller.cs.hbs +184 -0
  11. package/templates/mcp-scaffolding/entity-extension.cs.hbs +231 -0
  12. package/templates/mcp-scaffolding/frontend/api-client.ts.hbs +116 -0
  13. package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +133 -0
  14. package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +134 -0
  15. package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +261 -0
  16. package/templates/mcp-scaffolding/service-extension.cs.hbs +53 -0
  17. package/templates/mcp-scaffolding/tests/controller.test.cs.hbs +413 -0
  18. package/templates/mcp-scaffolding/tests/entity.test.cs.hbs +239 -0
  19. package/templates/mcp-scaffolding/tests/repository.test.cs.hbs +441 -0
  20. package/templates/mcp-scaffolding/tests/security.test.cs.hbs +442 -0
  21. package/templates/mcp-scaffolding/tests/service.test.cs.hbs +390 -0
  22. package/templates/mcp-scaffolding/tests/validator.test.cs.hbs +428 -0
  23. package/templates/ralph/README.md +3 -3
  24. package/templates/ralph/ralph.config.yaml +2 -2
  25. package/templates/skills/admin/SKILL.md +42 -0
  26. package/templates/skills/business-analyse/_shared.md +24 -1
  27. package/templates/skills/business-analyse/questionnaire/01-context.md +4 -4
  28. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +3 -3
  29. package/templates/skills/business-analyse/questionnaire/03-scope.md +4 -4
  30. package/templates/skills/business-analyse/questionnaire/04-data.md +7 -7
  31. package/templates/skills/business-analyse/questionnaire/05-integrations.md +1 -1
  32. package/templates/skills/business-analyse/questionnaire/06-security.md +3 -3
  33. package/templates/skills/business-analyse/questionnaire/07-ui.md +1 -1
  34. package/templates/skills/business-analyse/questionnaire/08-performance.md +3 -3
  35. package/templates/skills/business-analyse/questionnaire/09-constraints.md +4 -4
  36. package/templates/skills/business-analyse/questionnaire/10-documentation.md +2 -2
  37. package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +2 -2
  38. package/templates/skills/business-analyse/questionnaire/12-migration.md +1 -1
  39. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +2 -2
  40. package/templates/skills/business-analyse/steps/step-01-discover.md +50 -25
  41. package/templates/skills/business-analyse/steps/step-05-handoff.md +133 -34
  42. package/templates/skills/cc-agent/SKILL.md +129 -0
  43. package/templates/skills/cc-agent/references/agent-frontmatter.md +213 -0
  44. package/templates/skills/cc-agent/references/permission-modes.md +102 -0
  45. package/templates/skills/cc-agent/references/tools-reference.md +144 -0
  46. package/templates/skills/cc-agent/steps/step-00-init.md +134 -0
  47. package/templates/skills/cc-agent/steps/step-01-design.md +186 -0
  48. package/templates/skills/cc-agent/steps/step-02-generate.md +204 -0
  49. package/templates/skills/cc-agent/steps/step-03-validate.md +130 -0
  50. package/templates/skills/cc-agent/templates/agent-categorized.md +67 -0
  51. package/templates/skills/cc-agent/templates/agent-standalone.md +56 -0
  52. package/templates/skills/cc-agent/templates/agent-with-skills.md +94 -0
  53. package/templates/skills/cc-audit/SKILL.md +108 -0
  54. package/templates/skills/cc-audit/references/agent-checklist.md +91 -0
  55. package/templates/skills/cc-audit/references/hook-checklist.md +110 -0
  56. package/templates/skills/cc-audit/references/skill-checklist.md +70 -0
  57. package/templates/skills/cc-audit/steps/step-00-init.md +98 -0
  58. package/templates/skills/cc-audit/steps/step-01-scan.md +142 -0
  59. package/templates/skills/cc-audit/steps/step-02-analyze.md +158 -0
  60. package/templates/skills/cc-audit/steps/step-03-report.md +142 -0
  61. package/templates/skills/cc-skill/SKILL.md +134 -0
  62. package/templates/skills/cc-skill/references/best-practices.md +167 -0
  63. package/templates/skills/cc-skill/references/frontmatter-reference.md +182 -0
  64. package/templates/skills/cc-skill/references/skill-patterns.md +199 -0
  65. package/templates/skills/cc-skill/steps/step-00-init.md +119 -0
  66. package/templates/skills/cc-skill/steps/step-01-design.md +199 -0
  67. package/templates/skills/cc-skill/steps/step-02-generate.md +145 -0
  68. package/templates/skills/cc-skill/steps/step-03-steps.md +151 -0
  69. package/templates/skills/cc-skill/steps/step-04-validate.md +124 -0
  70. package/templates/skills/cc-skill/templates/skill-forked.md +85 -0
  71. package/templates/skills/cc-skill/templates/skill-progressive.md +102 -0
  72. package/templates/skills/cc-skill/templates/skill-simple.md +75 -0
  73. package/templates/skills/cc-skill/templates/step-template.md +82 -0
  74. package/templates/skills/check-version/SKILL.md +6 -0
  75. package/templates/skills/debug/SKILL.md +4 -0
  76. package/templates/skills/documentation/SKILL.md +1 -0
  77. package/templates/skills/efcore/SKILL.md +5 -0
  78. package/templates/skills/efcore/steps/db/step-deploy.md +26 -5
  79. package/templates/skills/efcore/steps/shared/step-00-init.md +21 -7
  80. package/templates/skills/explore/SKILL.md +28 -32
  81. package/templates/skills/feature-full/SKILL.md +1 -0
  82. package/templates/skills/gitflow/SKILL.md +8 -0
  83. package/templates/skills/gitflow/steps/step-start.md +45 -10
  84. package/templates/skills/mcp/SKILL.md +38 -18
  85. package/templates/skills/quick-search/SKILL.md +8 -1
  86. package/templates/skills/ralph-loop/SKILL.md +1 -1
  87. package/templates/skills/ralph-loop/steps/step-00-init.md +8 -68
  88. package/templates/skills/ralph-loop/steps/step-04-check.md +1 -1
  89. package/templates/skills/refactor/SKILL.md +1 -0
  90. package/templates/skills/review-code/SKILL.md +7 -1
  91. package/templates/skills/ui-components/SKILL.md +31 -438
  92. package/templates/skills/ui-components/accessibility.md +170 -0
  93. package/templates/skills/ui-components/patterns/data-table.md +39 -0
  94. package/templates/skills/ui-components/patterns/entity-card.md +77 -0
  95. package/templates/skills/ui-components/patterns/grid-layout.md +91 -0
  96. package/templates/skills/ui-components/patterns/kanban.md +43 -0
  97. package/templates/skills/ui-components/style-guide.md +86 -0
  98. package/templates/skills/utils/SKILL.md +1 -0
  99. package/templates/skills/validate/SKILL.md +1 -0
@@ -0,0 +1,199 @@
1
+ ---
2
+ name: step-01-design
3
+ description: Choose skill type, gather frontmatter information via interactive questions
4
+ next_step: steps/step-02-generate.md
5
+ ---
6
+
7
+ # Step 1: Design Skill
8
+
9
+ ## MANDATORY EXECUTION RULES:
10
+ - ALWAYS ask the user for design decisions (don't assume)
11
+ - For UPDATE: show current values and ask what to change
12
+ - Load reference docs for guidance
13
+ - Gather ALL needed information before proceeding to generation
14
+
15
+ ## YOUR TASK:
16
+ Guide the user through skill design decisions. Gather all frontmatter fields and structural choices.
17
+
18
+ ---
19
+
20
+ ## EXECUTION SEQUENCE:
21
+
22
+ ### 1. Load References
23
+
24
+ ```
25
+ Read: "references/frontmatter-reference.md"
26
+ Read: "references/skill-patterns.md"
27
+ Read: "references/best-practices.md"
28
+ ```
29
+
30
+ ### 2. Choose Skill Type (if not pre-set)
31
+
32
+ If {skill_type} is not already set:
33
+
34
+ ```yaml
35
+ AskUserQuestion:
36
+ header: "Type"
37
+ question: "What type of skill do you want to create?"
38
+ options:
39
+ - label: "Simple"
40
+ description: "Single SKILL.md file, no steps. Best for simple tasks or knowledge injection."
41
+ - label: "Progressive"
42
+ description: "SKILL.md + step files. Best for complex multi-phase workflows."
43
+ - label: "Forked"
44
+ description: "Runs in isolated subagent context. Best for research/exploration tasks."
45
+ ```
46
+
47
+ ### 3. Gather Description
48
+
49
+ ```yaml
50
+ AskUserQuestion:
51
+ header: "Description"
52
+ question: "Describe what this skill does and WHEN Claude should use it. Include trigger keywords. Example: 'Generate API controllers. Use when: creating controllers, API endpoints, REST routes'"
53
+ ```
54
+
55
+ Store in {description}.
56
+
57
+ ### 4. Gather Invocation Settings
58
+
59
+ ```yaml
60
+ AskUserQuestion:
61
+ header: "Invocation"
62
+ question: "How should this skill be invoked?"
63
+ options:
64
+ - label: "Auto + Manual (Recommended)"
65
+ description: "Claude auto-invokes when relevant AND user can invoke with /name"
66
+ - label: "Manual only"
67
+ description: "Only user can invoke with /name. Best for side-effect operations (deploy, commit)."
68
+ - label: "Hidden"
69
+ description: "Not visible in /menu. Background knowledge only."
70
+ ```
71
+
72
+ Map to:
73
+ - Auto + Manual → {disable_model_invocation} = false, {user_invocable} = true
74
+ - Manual only → {disable_model_invocation} = true, {user_invocable} = true
75
+ - Hidden → {disable_model_invocation} = false, {user_invocable} = false
76
+
77
+ ### 5. Gather Arguments (if applicable)
78
+
79
+ ```yaml
80
+ AskUserQuestion:
81
+ header: "Arguments"
82
+ question: "Does this skill accept arguments? If yes, describe the format (e.g., '<name> [--flag]'). If no, type 'none'."
83
+ ```
84
+
85
+ Store in {argument_hint} (or null if "none").
86
+
87
+ ### 6. Gather Model Preference
88
+
89
+ ```yaml
90
+ AskUserQuestion:
91
+ header: "Model"
92
+ question: "Which model should this skill use?"
93
+ options:
94
+ - label: "Inherit (Recommended)"
95
+ description: "Use whatever model the user has configured"
96
+ - label: "Haiku"
97
+ description: "Fast and cheap. Best for simple, repetitive tasks."
98
+ - label: "Sonnet"
99
+ description: "Balanced. Good for most tasks."
100
+ - label: "Opus"
101
+ description: "Most capable. Best for complex reasoning."
102
+ ```
103
+
104
+ ### 7. Gather Tools (if applicable)
105
+
106
+ If {skill_type} is "forked":
107
+
108
+ ```yaml
109
+ AskUserQuestion:
110
+ header: "Tools"
111
+ question: "Which tools should this skill have access to? (comma-separated)"
112
+ options:
113
+ - label: "Read-only (Recommended)"
114
+ description: "Read, Grep, Glob, WebSearch, WebFetch"
115
+ - label: "Read + Write"
116
+ description: "Read, Write, Edit, Grep, Glob, Bash"
117
+ - label: "Full access"
118
+ description: "All tools available"
119
+ ```
120
+
121
+ Also ask for agent type:
122
+
123
+ ```yaml
124
+ AskUserQuestion:
125
+ header: "Agent"
126
+ question: "Which agent type for the forked context?"
127
+ options:
128
+ - label: "Explore (Recommended)"
129
+ description: "Fast, read-only, optimized for searching"
130
+ - label: "Plan"
131
+ description: "Research and design, read-only"
132
+ - label: "general-purpose"
133
+ description: "Complex tasks, all tools"
134
+ ```
135
+
136
+ ### 8. Progressive Steps Design (if applicable)
137
+
138
+ If {skill_type} is "progressive":
139
+
140
+ Ask: "How many steps does this skill need? Describe each step briefly."
141
+
142
+ For each step, gather:
143
+ - Step number (00, 01, 02, ...)
144
+ - Step name (kebab-case)
145
+ - Step description (one line)
146
+
147
+ Store in {steps}:
148
+ ```json
149
+ [
150
+ {"number": "00", "name": "init", "description": "Parse arguments and initialize state"},
151
+ {"number": "01", "name": "analyze", "description": "Analyze the codebase"},
152
+ {"number": "02", "name": "generate", "description": "Generate output files"},
153
+ {"number": "03", "name": "validate", "description": "Validate results"}
154
+ ]
155
+ ```
156
+
157
+ Also ask about state variables:
158
+
159
+ Ask: "What state variables should persist across steps? (name, type, description for each)"
160
+
161
+ Store in {state_vars}.
162
+
163
+ ### 9. Show Design Summary
164
+
165
+ ```
166
+ Skill Design:
167
+
168
+ | Field | Value |
169
+ |-------|-------|
170
+ | Name | {skill_name} |
171
+ | Type | {skill_type} |
172
+ | Description | {description} (truncated) |
173
+ | Invocation | auto+manual / manual-only / hidden |
174
+ | Arguments | {argument_hint} |
175
+ | Model | {model} |
176
+ | Tools | {allowed_tools} (if forked) |
177
+ | Agent | {agent} (if forked) |
178
+ | Steps | {step_count} (if progressive) |
179
+
180
+ Step plan (if progressive):
181
+ | # | Name | Description |
182
+ |---|------|-------------|
183
+ | 00 | {name} | {desc} |
184
+ | 01 | {name} | {desc} |
185
+ | ... | ... | ... |
186
+
187
+ → Generating skill files...
188
+ ```
189
+
190
+ ---
191
+
192
+ ## SUCCESS METRICS:
193
+ - All required fields gathered from user
194
+ - Skill type chosen and appropriate options collected
195
+ - Steps defined (if progressive)
196
+ - Design summary displayed and confirmed
197
+
198
+ ## NEXT STEP:
199
+ After design is confirmed, proceed directly to `./step-02-generate.md`
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: step-02-generate
3
+ description: Generate SKILL.md file from template based on design choices
4
+ next_step: steps/step-03-steps.md
5
+ ---
6
+
7
+ # Step 2: Generate SKILL.md
8
+
9
+ ## MANDATORY EXECUTION RULES:
10
+ - ALWAYS load the appropriate template from `templates/` directory
11
+ - ALWAYS use the design choices from Step 1
12
+ - For UPDATE: read existing SKILL.md first, then apply changes
13
+ - Generate COMPLETE SKILL.md (not a stub)
14
+
15
+ ## YOUR TASK:
16
+ Generate the SKILL.md file based on the skill type and design choices gathered in Step 1.
17
+
18
+ ---
19
+
20
+ ## EXECUTION SEQUENCE:
21
+
22
+ ### 1. Load Template
23
+
24
+ Based on {skill_type}:
25
+
26
+ ```
27
+ "simple" → Read: "templates/skill-simple.md"
28
+ "progressive" → Read: "templates/skill-progressive.md"
29
+ "forked" → Read: "templates/skill-forked.md"
30
+ ```
31
+
32
+ ### 2. Create Directory Structure
33
+
34
+ ```bash
35
+ # Create skill directory
36
+ mkdir -p {target_dir}
37
+
38
+ # For progressive skills, create subdirectories
39
+ mkdir -p {target_dir}/steps/
40
+ mkdir -p {target_dir}/references/ # optional but recommended
41
+ mkdir -p {target_dir}/templates/ # optional, for code templates
42
+ ```
43
+
44
+ ### 3. Generate SKILL.md
45
+
46
+ Use the loaded template as a base. Replace all placeholders with actual values:
47
+
48
+ **Frontmatter generation:**
49
+
50
+ ```yaml
51
+ ---
52
+ name: {skill_name}
53
+ description: |
54
+ {description}
55
+ ```
56
+
57
+ Add optional fields only if they differ from defaults:
58
+
59
+ ```yaml
60
+ # Only if manual-only
61
+ disable-model-invocation: true
62
+
63
+ # Only if hidden
64
+ user-invocable: false
65
+
66
+ # Only if skill accepts arguments
67
+ argument-hint: "{argument_hint}"
68
+
69
+ # Only if not "inherit"
70
+ model: {model}
71
+
72
+ # Only for forked skills
73
+ context: fork
74
+ agent: {agent}
75
+ allowed-tools: "{allowed_tools}"
76
+ ```
77
+
78
+ Close frontmatter:
79
+
80
+ ```yaml
81
+ ---
82
+ ```
83
+
84
+ **Content generation:**
85
+
86
+ Generate appropriate XML sections based on {skill_type}:
87
+
88
+ **All types get:**
89
+ - `<objective>` - One paragraph from {description}
90
+ - `<quick_start>` - Usage examples with /skill_name
91
+ - `<execution_rules>` - Standard rules
92
+ - `<success_criteria>` - Completion conditions
93
+
94
+ **Progressive type additionally gets:**
95
+ - `<parameters>` with `<flags>` and `<examples>`
96
+ - `<workflow>` - Numbered high-level steps
97
+ - `<state_variables>` - Table of persistent variables
98
+ - `<entry_point>` - Points to step-00-init.md
99
+ - `<step_files>` - Table mapping steps to files
100
+
101
+ **Forked type additionally gets:**
102
+ - Note about isolated context
103
+ - Direct workflow (no step loading)
104
+
105
+ ### 4. Write SKILL.md
106
+
107
+ Use Write tool to create `{target_dir}/SKILL.md` with generated content.
108
+
109
+ ### 5. For UPDATE subcommand
110
+
111
+ If {subcommand} = "update":
112
+ 1. Read existing `{target_dir}/SKILL.md`
113
+ 2. Parse current frontmatter and sections
114
+ 3. Apply only the requested changes (merge, don't replace entirely)
115
+ 4. Use Edit tool to modify specific sections
116
+ 5. Preserve any custom content not being updated
117
+
118
+ ### 6. Confirm Generation
119
+
120
+ ```
121
+ Generated: {target_dir}/SKILL.md ({line_count} lines)
122
+
123
+ Frontmatter:
124
+ name: {skill_name}
125
+ description: {description} (truncated)
126
+ type: {skill_type}
127
+ ...
128
+
129
+ Sections: {list of XML sections included}
130
+
131
+ → Generating step files...
132
+ ```
133
+
134
+ ---
135
+
136
+ ## SUCCESS METRICS:
137
+ - SKILL.md created/updated at correct path
138
+ - Frontmatter includes all required fields
139
+ - Appropriate XML sections for skill type
140
+ - Under 500 lines
141
+ - No placeholder text left unreplaced
142
+
143
+ ## NEXT STEP:
144
+ - If {skill_type} = "progressive" → proceed to `./step-03-steps.md`
145
+ - If {skill_type} = "simple" or "forked" → skip to `./step-04-validate.md`
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: step-03-steps
3
+ description: Generate step files for progressive step loading skills
4
+ next_step: steps/step-04-validate.md
5
+ ---
6
+
7
+ # Step 3: Generate Step Files
8
+
9
+ ## MANDATORY EXECUTION RULES:
10
+ - ONLY execute this step for progressive skills ({skill_type} = "progressive")
11
+ - If not progressive, skip directly to step-04-validate.md
12
+ - Generate ALL step files with proper chaining
13
+ - Each step must follow the standard format
14
+
15
+ ## YOUR TASK:
16
+ Generate step files for progressive step loading. Each step file must have proper frontmatter, sections, and next_step chaining.
17
+
18
+ ---
19
+
20
+ ## EXECUTION SEQUENCE:
21
+
22
+ ### 1. Load Step Template
23
+
24
+ ```
25
+ Read: "templates/step-template.md"
26
+ ```
27
+
28
+ ### 2. Generate Each Step File
29
+
30
+ For each step in {steps} array (from Step 1 design):
31
+
32
+ **File path:** `{target_dir}/steps/step-{number}-{name}.md`
33
+
34
+ **Frontmatter:**
35
+
36
+ ```yaml
37
+ ---
38
+ name: step-{number}-{name}
39
+ description: {step_description}
40
+ next_step: steps/step-{next_number}-{next_name}.md
41
+ ---
42
+ ```
43
+
44
+ For the LAST step: omit `next_step` field.
45
+
46
+ **Content structure for each step:**
47
+
48
+ ```markdown
49
+ # Step {N}: {Title}
50
+
51
+ ## MANDATORY EXECUTION RULES:
52
+ - [Rules specific to this step]
53
+ - FORBIDDEN to skip to next step until this step is complete
54
+
55
+ ## YOUR TASK:
56
+ {step_description}
57
+
58
+ ---
59
+
60
+ ## EXECUTION SEQUENCE:
61
+
62
+ ### 1. [First subtask]
63
+ [Instructions for the first subtask]
64
+
65
+ ### 2. [Second subtask]
66
+ [Instructions for the second subtask]
67
+
68
+ ### N. Show Summary
69
+ [Display step results in compact format]
70
+
71
+ ---
72
+
73
+ ## SUCCESS METRICS:
74
+ - [What indicates this step succeeded]
75
+ - [Measurable outcomes]
76
+
77
+ ## NEXT STEP:
78
+ After showing summary, proceed directly to `./step-{next_number}-{next_name}.md`
79
+ ```
80
+
81
+ ### 3. Special Handling for Step 00 (Init)
82
+
83
+ The first step (step-00-init) should always include:
84
+
85
+ ```markdown
86
+ ## EXECUTION SEQUENCE:
87
+
88
+ ### 1. Parse Input
89
+ Parse flags and arguments from $ARGUMENTS.
90
+ [Include flag parsing based on skill's <parameters>]
91
+
92
+ ### 2. Validate Input
93
+ [Validate required fields, ask user if missing]
94
+
95
+ ### 3. Initialize State
96
+ [Set all state variables to defaults or parsed values]
97
+
98
+ ### 4. Show Summary
99
+ Display compact initialization summary table.
100
+ ```
101
+
102
+ ### 4. Special Handling for Last Step
103
+
104
+ The last step should include:
105
+
106
+ ```markdown
107
+ ## EXECUTION SEQUENCE:
108
+
109
+ ### 1. [Final validation or action]
110
+
111
+ ### 2. Final Summary
112
+ Display:
113
+ - What was accomplished
114
+ - Files created/modified
115
+ - Any warnings or next steps
116
+
117
+ ## NEXT STEP:
118
+ This is the final step. Skill execution is complete.
119
+ ```
120
+
121
+ ### 5. Write All Step Files
122
+
123
+ Use Write tool for each step file. Run writes in parallel if possible.
124
+
125
+ ### 6. Confirm Generation
126
+
127
+ ```
128
+ Generated {step_count} step files:
129
+
130
+ | File | Next Step |
131
+ |------|-----------|
132
+ | steps/step-00-{name}.md | → step-01-{name}.md |
133
+ | steps/step-01-{name}.md | → step-02-{name}.md |
134
+ | ... | ... |
135
+ | steps/step-{N}-{name}.md | (final) |
136
+
137
+ → Validating skill...
138
+ ```
139
+
140
+ ---
141
+
142
+ ## SUCCESS METRICS:
143
+ - All step files created in {target_dir}/steps/
144
+ - Each step has proper frontmatter (name, description, next_step)
145
+ - Step chaining is correct (no broken references)
146
+ - First step handles initialization
147
+ - Last step has completion summary
148
+ - Standard sections present in each step
149
+
150
+ ## NEXT STEP:
151
+ After generating all step files, proceed directly to `./step-04-validate.md`
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: step-04-validate
3
+ description: Validate generated skill structure and display final summary
4
+ ---
5
+
6
+ # Step 4: Validate Skill
7
+
8
+ ## MANDATORY EXECUTION RULES:
9
+ - Validate ALL generated files
10
+ - Check frontmatter completeness
11
+ - Verify step chaining (if progressive)
12
+ - Display actionable report if issues found
13
+
14
+ ## YOUR TASK:
15
+ Validate the generated skill against official Claude Code conventions and display a final summary.
16
+
17
+ ---
18
+
19
+ ## EXECUTION SEQUENCE:
20
+
21
+ ### 1. Read Generated Files
22
+
23
+ ```
24
+ Read: "{target_dir}/SKILL.md"
25
+
26
+ If progressive:
27
+ Glob: "{target_dir}/steps/step-*.md"
28
+ Read each step file
29
+ ```
30
+
31
+ ### 2. Validate SKILL.md
32
+
33
+ **Frontmatter checks:**
34
+ - [ ] `name` exists, lowercase, max 64 chars
35
+ - [ ] `description` exists, non-empty
36
+ - [ ] `argument-hint` present (if skill accepts args)
37
+ - [ ] `disable-model-invocation` set for side-effect skills
38
+ - [ ] `model` is valid (inherit/haiku/sonnet/opus) or absent
39
+
40
+ **Content checks:**
41
+ - [ ] Has `<objective>` section
42
+ - [ ] Has `<quick_start>` with examples
43
+ - [ ] Line count < 500
44
+ - [ ] No unreplaced placeholders (e.g., `{placeholder}`)
45
+
46
+ **Progressive-specific checks:**
47
+ - [ ] Has `<entry_point>` pointing to first step
48
+ - [ ] Has `<step_files>` listing all steps
49
+ - [ ] Has `<state_variables>` documenting persistent state
50
+ - [ ] Has `<workflow>` describing high-level flow
51
+
52
+ ### 3. Validate Step Files (if progressive)
53
+
54
+ For each step file:
55
+ - [ ] Has YAML frontmatter with `name` and `description`
56
+ - [ ] Has `next_step` (except last step)
57
+ - [ ] `next_step` path resolves to existing file
58
+ - [ ] Has sections: YOUR TASK, EXECUTION SEQUENCE, SUCCESS METRICS
59
+ - [ ] Last step has completion message (no next_step)
60
+
61
+ **Chain validation:**
62
+ ```
63
+ step-00 → step-01 → step-02 → ... → step-N (final)
64
+ Verify: each next_step file exists
65
+ Verify: no circular references
66
+ Verify: no orphan steps (steps not in chain)
67
+ ```
68
+
69
+ ### 4. Validate File References
70
+
71
+ Check all file paths referenced in SKILL.md and step files:
72
+ - Templates referenced exist in `templates/`
73
+ - References referenced exist in `references/`
74
+ - Scripts referenced exist in `scripts/`
75
+
76
+ ### 5. Display Validation Report
77
+
78
+ ```
79
+ Skill Validation Report:
80
+
81
+ | Check | Status |
82
+ |-------|--------|
83
+ | Frontmatter complete | PASS/FAIL |
84
+ | Content sections | PASS/FAIL |
85
+ | Line count ({N} lines) | PASS/WARN |
86
+ | Step chaining | PASS/FAIL/N/A |
87
+ | File references | PASS/FAIL |
88
+
89
+ {If any FAIL: show specific issues and recommendations}
90
+ ```
91
+
92
+ ### 6. Display Final Summary
93
+
94
+ ```
95
+ Skill Created Successfully!
96
+
97
+ | Property | Value |
98
+ |----------|-------|
99
+ | Name | {skill_name} |
100
+ | Type | {skill_type} |
101
+ | Location | {target_dir} |
102
+ | Invocation | /cc-skill {skill_name} |
103
+ | Files | {file_count} |
104
+
105
+ Files created:
106
+ {target_dir}/SKILL.md
107
+ {target_dir}/steps/step-00-init.md (if progressive)
108
+ {target_dir}/steps/step-01-*.md (if progressive)
109
+ ...
110
+
111
+ Next steps:
112
+ - Test the skill: /{skill_name}
113
+ - Add references: {target_dir}/references/
114
+ - Add templates: {target_dir}/templates/
115
+ - Run audit: /cc-audit
116
+ ```
117
+
118
+ ---
119
+
120
+ ## SUCCESS METRICS:
121
+ - All validations pass (or issues clearly reported)
122
+ - Final summary displayed with file list
123
+ - Next steps provided to the user
124
+ - Skill is ready to use
@@ -0,0 +1,85 @@
1
+ # Template: Forked Context Skill
2
+
3
+ Use this template when creating a skill that runs in an isolated subagent context. Best for research, exploration, or tasks that need a clean context.
4
+
5
+ ## Generated SKILL.md format:
6
+
7
+ ```yaml
8
+ ---
9
+ name: {{SKILL_NAME}}
10
+ description: |
11
+ {{DESCRIPTION}}
12
+ {{#if ARGUMENT_HINT}}
13
+ argument-hint: "{{ARGUMENT_HINT}}"
14
+ {{/if}}
15
+ context: fork
16
+ agent: {{AGENT_TYPE}}
17
+ allowed-tools: "{{ALLOWED_TOOLS}}"
18
+ {{#if DISABLE_MODEL_INVOCATION}}
19
+ disable-model-invocation: true
20
+ {{/if}}
21
+ {{#if MODEL}}
22
+ model: {{MODEL}}
23
+ {{/if}}
24
+ ---
25
+
26
+ <objective>
27
+ {{OBJECTIVE}}
28
+
29
+ **Note:** This skill runs in an isolated context. Use allowed tools directly - do NOT launch Task agents.
30
+ </objective>
31
+
32
+ <quick_start>
33
+
34
+ ` ` `bash
35
+ /{{SKILL_NAME}} {{EXAMPLE_ARGS_1}}
36
+ /{{SKILL_NAME}} {{EXAMPLE_ARGS_2}}
37
+ ` ` `
38
+
39
+ </quick_start>
40
+
41
+ ## Task
42
+ {{TASK_DESCRIPTION}}: $ARGUMENTS
43
+
44
+ <workflow>
45
+
46
+ ## 1. Parse Input
47
+ - Extract key information from the input
48
+ - Identify scope and targets
49
+
50
+ ## 2. {{MAIN_PHASE}}
51
+ {{MAIN_PHASE_INSTRUCTIONS}}
52
+
53
+ ## 3. Report Results
54
+ - Provide comprehensive answer
55
+ - Reference file paths and line numbers
56
+ - Include relevant code examples
57
+
58
+ </workflow>
59
+
60
+ <execution_rules>
61
+ - **PARALLEL SEARCH**: Run independent searches simultaneously
62
+ - **CITE SOURCES**: Always reference file paths and line numbers
63
+ - **STAY FOCUSED**: Only explore what is needed
64
+ - **NO TASK AGENTS**: Use allowed tools directly (context is already forked)
65
+ - {{RULE_1}}
66
+ </execution_rules>
67
+
68
+ <priority>
69
+ {{PRIORITY_STATEMENT}}
70
+ </priority>
71
+ ```
72
+
73
+ ## Agent Types:
74
+ | Agent | Tools | Best for |
75
+ |-------|-------|----------|
76
+ | `Explore` | Read, Grep, Glob | Fast codebase search |
77
+ | `Plan` | Read, Grep, Glob | Research and design |
78
+ | `general-purpose` | All tools | Complex tasks |
79
+
80
+ ## Notes:
81
+ - Forked skills run in isolated context (separate conversation)
82
+ - Use `allowed-tools` to limit tool access
83
+ - $ARGUMENTS passes user input to the forked context
84
+ - Do NOT use progressive step loading with forked skills
85
+ - Best for: code search, documentation lookup, research, analysis