@atlashub/smartstack-cli 1.36.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.
- package/config/mcp-defaults.json +62 -0
- package/dist/index.js +57 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +16984 -0
- package/dist/mcp-entry.mjs.map +1 -0
- package/package.json +14 -5
- package/templates/agents/gitflow/start.md +5 -4
- package/templates/agents/mcp-healthcheck.md +15 -13
- package/templates/mcp-scaffolding/component.tsx.hbs +298 -0
- package/templates/mcp-scaffolding/controller.cs.hbs +184 -0
- package/templates/mcp-scaffolding/entity-extension.cs.hbs +231 -0
- package/templates/mcp-scaffolding/frontend/api-client.ts.hbs +116 -0
- package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +133 -0
- package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +134 -0
- package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +261 -0
- package/templates/mcp-scaffolding/service-extension.cs.hbs +53 -0
- package/templates/mcp-scaffolding/tests/controller.test.cs.hbs +413 -0
- package/templates/mcp-scaffolding/tests/entity.test.cs.hbs +239 -0
- package/templates/mcp-scaffolding/tests/repository.test.cs.hbs +441 -0
- package/templates/mcp-scaffolding/tests/security.test.cs.hbs +442 -0
- package/templates/mcp-scaffolding/tests/service.test.cs.hbs +390 -0
- package/templates/mcp-scaffolding/tests/validator.test.cs.hbs +428 -0
- package/templates/ralph/README.md +3 -3
- package/templates/ralph/ralph.config.yaml +2 -2
- package/templates/skills/admin/SKILL.md +42 -0
- package/templates/skills/application/steps/step-01-navigation.md +226 -43
- package/templates/skills/application/steps/step-03-roles.md +160 -38
- package/templates/skills/application/steps/step-04-backend.md +109 -2
- package/templates/skills/application/templates-seed.md +200 -1
- package/templates/skills/business-analyse/_shared.md +24 -1
- package/templates/skills/business-analyse/questionnaire/01-context.md +4 -4
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +3 -3
- package/templates/skills/business-analyse/questionnaire/03-scope.md +4 -4
- package/templates/skills/business-analyse/questionnaire/04-data.md +7 -7
- package/templates/skills/business-analyse/questionnaire/05-integrations.md +1 -1
- package/templates/skills/business-analyse/questionnaire/06-security.md +3 -3
- package/templates/skills/business-analyse/questionnaire/07-ui.md +1 -1
- package/templates/skills/business-analyse/questionnaire/08-performance.md +3 -3
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +4 -4
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +2 -2
- package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +2 -2
- package/templates/skills/business-analyse/questionnaire/12-migration.md +1 -1
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +2 -2
- package/templates/skills/business-analyse/steps/step-01-discover.md +50 -25
- package/templates/skills/business-analyse/steps/step-05-handoff.md +133 -34
- package/templates/skills/cc-agent/SKILL.md +129 -0
- package/templates/skills/cc-agent/references/agent-frontmatter.md +213 -0
- package/templates/skills/cc-agent/references/permission-modes.md +102 -0
- package/templates/skills/cc-agent/references/tools-reference.md +144 -0
- package/templates/skills/cc-agent/steps/step-00-init.md +134 -0
- package/templates/skills/cc-agent/steps/step-01-design.md +186 -0
- package/templates/skills/cc-agent/steps/step-02-generate.md +204 -0
- package/templates/skills/cc-agent/steps/step-03-validate.md +130 -0
- package/templates/skills/cc-agent/templates/agent-categorized.md +67 -0
- package/templates/skills/cc-agent/templates/agent-standalone.md +56 -0
- package/templates/skills/cc-agent/templates/agent-with-skills.md +94 -0
- package/templates/skills/cc-audit/SKILL.md +108 -0
- package/templates/skills/cc-audit/references/agent-checklist.md +91 -0
- package/templates/skills/cc-audit/references/hook-checklist.md +110 -0
- package/templates/skills/cc-audit/references/skill-checklist.md +70 -0
- package/templates/skills/cc-audit/steps/step-00-init.md +98 -0
- package/templates/skills/cc-audit/steps/step-01-scan.md +142 -0
- package/templates/skills/cc-audit/steps/step-02-analyze.md +158 -0
- package/templates/skills/cc-audit/steps/step-03-report.md +142 -0
- package/templates/skills/cc-skill/SKILL.md +134 -0
- package/templates/skills/cc-skill/references/best-practices.md +167 -0
- package/templates/skills/cc-skill/references/frontmatter-reference.md +182 -0
- package/templates/skills/cc-skill/references/skill-patterns.md +199 -0
- package/templates/skills/cc-skill/steps/step-00-init.md +119 -0
- package/templates/skills/cc-skill/steps/step-01-design.md +199 -0
- package/templates/skills/cc-skill/steps/step-02-generate.md +145 -0
- package/templates/skills/cc-skill/steps/step-03-steps.md +151 -0
- package/templates/skills/cc-skill/steps/step-04-validate.md +124 -0
- package/templates/skills/cc-skill/templates/skill-forked.md +85 -0
- package/templates/skills/cc-skill/templates/skill-progressive.md +102 -0
- package/templates/skills/cc-skill/templates/skill-simple.md +75 -0
- package/templates/skills/cc-skill/templates/step-template.md +82 -0
- package/templates/skills/check-version/SKILL.md +6 -0
- package/templates/skills/debug/SKILL.md +4 -0
- package/templates/skills/documentation/SKILL.md +1 -0
- package/templates/skills/efcore/SKILL.md +5 -0
- package/templates/skills/efcore/steps/db/step-deploy.md +26 -5
- package/templates/skills/efcore/steps/shared/step-00-init.md +21 -7
- package/templates/skills/explore/SKILL.md +28 -32
- package/templates/skills/feature-full/SKILL.md +1 -0
- package/templates/skills/gitflow/SKILL.md +8 -0
- package/templates/skills/gitflow/steps/step-start.md +45 -10
- package/templates/skills/mcp/SKILL.md +38 -18
- package/templates/skills/quick-search/SKILL.md +8 -1
- package/templates/skills/ralph-loop/SKILL.md +1 -1
- package/templates/skills/ralph-loop/steps/step-00-init.md +8 -68
- package/templates/skills/ralph-loop/steps/step-04-check.md +1 -1
- package/templates/skills/refactor/SKILL.md +1 -0
- package/templates/skills/review-code/SKILL.md +7 -1
- package/templates/skills/ui-components/SKILL.md +31 -438
- package/templates/skills/ui-components/accessibility.md +170 -0
- package/templates/skills/ui-components/patterns/data-table.md +39 -0
- package/templates/skills/ui-components/patterns/entity-card.md +77 -0
- package/templates/skills/ui-components/patterns/grid-layout.md +91 -0
- package/templates/skills/ui-components/patterns/kanban.md +43 -0
- package/templates/skills/ui-components/style-guide.md +86 -0
- package/templates/skills/utils/SKILL.md +1 -0
- package/templates/skills/validate/SKILL.md +1 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-01-scan
|
|
3
|
+
description: Scan all Claude Code components in target directories
|
|
4
|
+
next_step: steps/step-02-analyze.md
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 1: Scan Components
|
|
8
|
+
|
|
9
|
+
## MANDATORY EXECUTION RULES:
|
|
10
|
+
- Scan ALL component types (skills, agents, hooks, settings)
|
|
11
|
+
- Record metadata for each component found
|
|
12
|
+
- Do NOT validate yet - just inventory
|
|
13
|
+
|
|
14
|
+
## YOUR TASK:
|
|
15
|
+
Discover and inventory all Claude Code components in the resolved scan paths.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## EXECUTION SEQUENCE:
|
|
20
|
+
|
|
21
|
+
### 1. Scan Skills
|
|
22
|
+
|
|
23
|
+
For each path in {scan_paths}:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Search for skills:
|
|
27
|
+
Glob: "{path}/skills/*/SKILL.md"
|
|
28
|
+
|
|
29
|
+
For each SKILL.md found:
|
|
30
|
+
Read the file
|
|
31
|
+
Extract frontmatter fields:
|
|
32
|
+
- name
|
|
33
|
+
- description
|
|
34
|
+
- disable-model-invocation
|
|
35
|
+
- user-invocable
|
|
36
|
+
- allowed-tools
|
|
37
|
+
- model
|
|
38
|
+
- context
|
|
39
|
+
- agent
|
|
40
|
+
- argument-hint
|
|
41
|
+
- hooks
|
|
42
|
+
|
|
43
|
+
Check for supporting directories:
|
|
44
|
+
Glob: "{skill_dir}/steps/step-*.md" → step_count
|
|
45
|
+
Glob: "{skill_dir}/templates/*" → template_count
|
|
46
|
+
Glob: "{skill_dir}/references/*" → reference_count
|
|
47
|
+
Glob: "{skill_dir}/scripts/*" → script_count
|
|
48
|
+
Glob: "{skill_dir}/examples/*" → example_count
|
|
49
|
+
|
|
50
|
+
Record in {skills_found}:
|
|
51
|
+
{name, path, frontmatter, step_count, template_count, reference_count, script_count, example_count, line_count}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 2. Scan Agents
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
Search for agents:
|
|
58
|
+
Glob: "{path}/agents/*.md"
|
|
59
|
+
Glob: "{path}/agents/**/*.md"
|
|
60
|
+
|
|
61
|
+
For each agent .md found:
|
|
62
|
+
Read the file
|
|
63
|
+
Extract frontmatter fields:
|
|
64
|
+
- name
|
|
65
|
+
- description
|
|
66
|
+
- color
|
|
67
|
+
- model
|
|
68
|
+
- tools
|
|
69
|
+
- disallowedTools
|
|
70
|
+
- permissionMode
|
|
71
|
+
- skills
|
|
72
|
+
- hooks
|
|
73
|
+
|
|
74
|
+
Record in {agents_found}:
|
|
75
|
+
{name, path, frontmatter, line_count, category}
|
|
76
|
+
|
|
77
|
+
category = parent directory name if nested (e.g., "efcore", "gitflow"), else "root"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 3. Scan Hooks
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Search for hook configurations:
|
|
84
|
+
Read: "{path}/hooks/hooks.json" (if exists)
|
|
85
|
+
Read: "{path}/settings.json" → extract "hooks" section
|
|
86
|
+
Read: "{path}/settings.local.json" → extract "hooks" section (if exists)
|
|
87
|
+
|
|
88
|
+
For each hook configuration found:
|
|
89
|
+
Extract events (PreToolUse, PostToolUse, Stop, etc.)
|
|
90
|
+
For each event:
|
|
91
|
+
Extract matchers and hook handlers
|
|
92
|
+
Record type (command, prompt, agent)
|
|
93
|
+
Record referenced scripts/files
|
|
94
|
+
|
|
95
|
+
Record in {hooks_found}:
|
|
96
|
+
{source_file, event, matcher, type, command_or_prompt, timeout}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### 4. Scan Settings
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Read settings files:
|
|
103
|
+
"{path}/settings.json"
|
|
104
|
+
"{path}/settings.local.json"
|
|
105
|
+
|
|
106
|
+
Extract:
|
|
107
|
+
- permissions (allow, deny, ask rules)
|
|
108
|
+
- MCP server config
|
|
109
|
+
- plugin config
|
|
110
|
+
- environment variables
|
|
111
|
+
- model settings
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 5. Display Inventory Summary
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Component Inventory:
|
|
118
|
+
|
|
119
|
+
| Type | Count | Scope |
|
|
120
|
+
|------|-------|-------|
|
|
121
|
+
| Skills | {skills_found.length} | {scope} |
|
|
122
|
+
| Agents | {agents_found.length} | {scope} |
|
|
123
|
+
| Hooks | {hooks_found.length} | {scope} |
|
|
124
|
+
| Settings files | N | {scope} |
|
|
125
|
+
|
|
126
|
+
Skills: {list names}
|
|
127
|
+
Agents: {list names}
|
|
128
|
+
Hooks: {list events}
|
|
129
|
+
|
|
130
|
+
→ Analyzing components...
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## SUCCESS METRICS:
|
|
136
|
+
- All component types scanned
|
|
137
|
+
- Metadata extracted for each component
|
|
138
|
+
- Counts displayed in summary table
|
|
139
|
+
- No components missed
|
|
140
|
+
|
|
141
|
+
## NEXT STEP:
|
|
142
|
+
After showing inventory summary, proceed directly to `./step-02-analyze.md`
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-02-analyze
|
|
3
|
+
description: Validate component structure, frontmatter, and cross-references
|
|
4
|
+
next_step: steps/step-03-report.md
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Step 2: Analyze Components
|
|
8
|
+
|
|
9
|
+
## MANDATORY EXECUTION RULES:
|
|
10
|
+
- Validate EVERY component found in Step 1
|
|
11
|
+
- Load reference checklists from `references/` directory
|
|
12
|
+
- Record all issues with severity (ERROR, WARN, INFO)
|
|
13
|
+
- Check cross-references between component types
|
|
14
|
+
|
|
15
|
+
## YOUR TASK:
|
|
16
|
+
Validate each component against official Claude Code conventions and check cross-references.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## EXECUTION SEQUENCE:
|
|
21
|
+
|
|
22
|
+
### 1. Load Checklists
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Read reference checklists:
|
|
26
|
+
Read: "references/skill-checklist.md"
|
|
27
|
+
Read: "references/agent-checklist.md"
|
|
28
|
+
Read: "references/hook-checklist.md"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 2. Validate Skills
|
|
32
|
+
|
|
33
|
+
For each skill in {skills_found}, check:
|
|
34
|
+
|
|
35
|
+
**Frontmatter (required):**
|
|
36
|
+
- `name` exists and is lowercase, max 64 chars → ERROR if missing
|
|
37
|
+
- `description` exists and is non-empty → ERROR if missing
|
|
38
|
+
|
|
39
|
+
**Frontmatter (recommended):**
|
|
40
|
+
- `argument-hint` present if skill accepts arguments → WARN if missing
|
|
41
|
+
- `disable-model-invocation` explicitly set for side-effect skills → WARN
|
|
42
|
+
|
|
43
|
+
**SKILL.md quality:**
|
|
44
|
+
- Line count < 500 → WARN if exceeded
|
|
45
|
+
- Contains `<objective>` section → WARN if missing
|
|
46
|
+
- Contains `<entry_point>` section (if has steps/) → ERROR if missing
|
|
47
|
+
- Contains `<workflow>` or `<step_files>` section → INFO if missing
|
|
48
|
+
|
|
49
|
+
**Step files validation (if steps/ exists):**
|
|
50
|
+
- Each step file has frontmatter with `name` and `description` → ERROR if missing
|
|
51
|
+
- Each step file (except last) has `next_step` in frontmatter → ERROR if missing
|
|
52
|
+
- `next_step` paths resolve to existing files → ERROR if broken
|
|
53
|
+
- Steps follow sequential naming (step-00, step-01, ...) → WARN if not
|
|
54
|
+
- Each step has "NEXT STEP" or "SUCCESS METRICS" section → INFO if missing
|
|
55
|
+
|
|
56
|
+
**File references:**
|
|
57
|
+
- All files referenced in SKILL.md exist → ERROR if missing
|
|
58
|
+
- Templates, references, scripts directories referenced exist → WARN if missing
|
|
59
|
+
|
|
60
|
+
**Record issues in {issues}:**
|
|
61
|
+
```
|
|
62
|
+
{component_name, component_type: "skill", severity, message, file_path, line_number}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 3. Validate Agents
|
|
66
|
+
|
|
67
|
+
For each agent in {agents_found}, check:
|
|
68
|
+
|
|
69
|
+
**Frontmatter (required):**
|
|
70
|
+
- `name` exists → ERROR if missing
|
|
71
|
+
- `description` exists and is non-empty → ERROR if missing
|
|
72
|
+
|
|
73
|
+
**Frontmatter (recommended):**
|
|
74
|
+
- `model` is valid (haiku, sonnet, opus, inherit) or absent → ERROR if invalid
|
|
75
|
+
- `tools` references valid tool names → WARN if unrecognized tool
|
|
76
|
+
- `permissionMode` is valid (default, acceptEdits, dontAsk, bypassPermissions, plan) → ERROR if invalid
|
|
77
|
+
- `skills` references existing skill names → WARN if not found
|
|
78
|
+
|
|
79
|
+
**Content quality:**
|
|
80
|
+
- Has workflow or instructions section → INFO if very short (< 10 lines)
|
|
81
|
+
- System prompt is clear and actionable → INFO
|
|
82
|
+
|
|
83
|
+
**Record issues in {issues}:**
|
|
84
|
+
```
|
|
85
|
+
{component_name, component_type: "agent", severity, message, file_path}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 4. Validate Hooks
|
|
89
|
+
|
|
90
|
+
For each hook in {hooks_found}, check:
|
|
91
|
+
|
|
92
|
+
**Structure:**
|
|
93
|
+
- Event name is valid (SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, PostToolUseFailure, Notification, SubagentStart, SubagentStop, Stop, PreCompact, SessionEnd) → ERROR if invalid
|
|
94
|
+
- Hook type is valid (command, prompt, agent) → ERROR if invalid
|
|
95
|
+
|
|
96
|
+
**Command hooks:**
|
|
97
|
+
- Referenced script/command exists → ERROR if missing
|
|
98
|
+
- Script is executable (on Unix) → WARN if not
|
|
99
|
+
|
|
100
|
+
**Prompt hooks:**
|
|
101
|
+
- `prompt` field is non-empty → ERROR if missing
|
|
102
|
+
- `model` is valid if specified → WARN if invalid
|
|
103
|
+
|
|
104
|
+
**Matcher patterns:**
|
|
105
|
+
- Regex is valid → ERROR if invalid syntax
|
|
106
|
+
- Pattern matches at least one known tool/event → INFO if no match
|
|
107
|
+
|
|
108
|
+
### 5. Validate Cross-References
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
Check skills → agents:
|
|
112
|
+
For skills with `context: fork` and `agent: {name}`:
|
|
113
|
+
Verify agent exists in {agents_found} or is built-in (Explore, Plan, general-purpose, Bash)
|
|
114
|
+
→ WARN if agent not found
|
|
115
|
+
|
|
116
|
+
Check agents → skills:
|
|
117
|
+
For agents with `skills: [...]`:
|
|
118
|
+
Verify each skill exists in {skills_found}
|
|
119
|
+
→ WARN if skill not found
|
|
120
|
+
|
|
121
|
+
Check hooks → scripts:
|
|
122
|
+
For command hooks:
|
|
123
|
+
Verify referenced script exists on filesystem
|
|
124
|
+
→ ERROR if missing
|
|
125
|
+
|
|
126
|
+
Check settings → permissions:
|
|
127
|
+
For permission rules referencing tools:
|
|
128
|
+
Verify tool names are valid
|
|
129
|
+
→ WARN if unrecognized
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### 6. Display Analysis Summary
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
Analysis Complete:
|
|
136
|
+
|
|
137
|
+
| Severity | Count |
|
|
138
|
+
|----------|-------|
|
|
139
|
+
| ERROR | {count} |
|
|
140
|
+
| WARN | {count} |
|
|
141
|
+
| INFO | {count} |
|
|
142
|
+
|
|
143
|
+
Top issues:
|
|
144
|
+
{list top 5 most critical issues}
|
|
145
|
+
|
|
146
|
+
→ Generating report...
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## SUCCESS METRICS:
|
|
152
|
+
- All components validated against checklists
|
|
153
|
+
- Cross-references checked
|
|
154
|
+
- All issues recorded with severity
|
|
155
|
+
- Summary counts displayed
|
|
156
|
+
|
|
157
|
+
## NEXT STEP:
|
|
158
|
+
After showing analysis summary, proceed directly to `./step-03-report.md`
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-03-report
|
|
3
|
+
description: Generate comprehensive audit report with recommendations
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Step 3: Audit Report
|
|
7
|
+
|
|
8
|
+
## MANDATORY EXECUTION RULES:
|
|
9
|
+
- Display COMPLETE report (every component, every issue)
|
|
10
|
+
- Group by component type, then by severity
|
|
11
|
+
- Include actionable recommendations for each issue
|
|
12
|
+
- If --fix mode, apply auto-fixes where safe
|
|
13
|
+
|
|
14
|
+
## YOUR TASK:
|
|
15
|
+
Generate and display the final audit report. Apply auto-fixes if requested.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## EXECUTION SEQUENCE:
|
|
20
|
+
|
|
21
|
+
### 1. Component Inventory Table
|
|
22
|
+
|
|
23
|
+
Display full inventory:
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
## Component Inventory
|
|
27
|
+
|
|
28
|
+
### Skills ({count})
|
|
29
|
+
| Name | Steps | Templates | Refs | Lines | Status |
|
|
30
|
+
|------|-------|-----------|------|-------|--------|
|
|
31
|
+
| {name} | {step_count} | {template_count} | {ref_count} | {line_count} | OK/WARN/ERROR |
|
|
32
|
+
|
|
33
|
+
### Agents ({count})
|
|
34
|
+
| Name | Category | Model | Tools | Status |
|
|
35
|
+
|------|----------|-------|-------|--------|
|
|
36
|
+
| {name} | {category} | {model} | {tool_count} | OK/WARN/ERROR |
|
|
37
|
+
|
|
38
|
+
### Hooks ({count})
|
|
39
|
+
| Event | Matcher | Type | Status |
|
|
40
|
+
|-------|---------|------|--------|
|
|
41
|
+
| {event} | {matcher} | {type} | OK/WARN/ERROR |
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Issues Report
|
|
45
|
+
|
|
46
|
+
Group by severity, then by component:
|
|
47
|
+
|
|
48
|
+
```markdown
|
|
49
|
+
## Issues Found
|
|
50
|
+
|
|
51
|
+
### ERRORS ({count}) - Must Fix
|
|
52
|
+
| Component | Type | Issue | File | Recommendation |
|
|
53
|
+
|-----------|------|-------|------|----------------|
|
|
54
|
+
| {name} | {type} | {message} | {file} | {recommendation} |
|
|
55
|
+
|
|
56
|
+
### WARNINGS ({count}) - Should Fix
|
|
57
|
+
| Component | Type | Issue | File | Recommendation |
|
|
58
|
+
|-----------|------|-------|------|----------------|
|
|
59
|
+
| {name} | {type} | {message} | {file} | {recommendation} |
|
|
60
|
+
|
|
61
|
+
### INFO ({count}) - Nice to Have
|
|
62
|
+
| Component | Type | Issue | File | Recommendation |
|
|
63
|
+
|-----------|------|-------|------|----------------|
|
|
64
|
+
| {name} | {type} | {message} | {file} | {recommendation} |
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 3. Recommendations by Issue Type
|
|
68
|
+
|
|
69
|
+
Provide common fix patterns:
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
## Common Fix Patterns
|
|
73
|
+
|
|
74
|
+
### Missing frontmatter fields
|
|
75
|
+
Add required fields to YAML frontmatter:
|
|
76
|
+
- `name`: lowercase identifier, max 64 chars
|
|
77
|
+
- `description`: multi-line, describe when to use
|
|
78
|
+
|
|
79
|
+
### Broken step chain
|
|
80
|
+
Verify `next_step` in each step file points to existing file.
|
|
81
|
+
Steps should follow: step-00-init → step-01-xxx → step-02-xxx → ...
|
|
82
|
+
|
|
83
|
+
### Missing agent reference
|
|
84
|
+
Skills with `context: fork` need a valid `agent` field.
|
|
85
|
+
Built-in agents: Explore, Plan, general-purpose, Bash
|
|
86
|
+
|
|
87
|
+
### Oversized SKILL.md
|
|
88
|
+
Keep SKILL.md under 500 lines. Move detailed content to:
|
|
89
|
+
- references/ for documentation
|
|
90
|
+
- templates/ for code templates
|
|
91
|
+
- steps/ for progressive step loading
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 4. Auto-Fix (if --fix mode)
|
|
95
|
+
|
|
96
|
+
If {fix_mode} is true, apply safe fixes:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Safe auto-fixes:
|
|
100
|
+
✅ Add missing `name` field (derive from directory name)
|
|
101
|
+
✅ Fix broken next_step paths (if obvious rename)
|
|
102
|
+
✅ Add missing description placeholder
|
|
103
|
+
✅ Fix invalid model values (suggest closest match)
|
|
104
|
+
|
|
105
|
+
Unsafe (skip, only recommend):
|
|
106
|
+
❌ Restructure SKILL.md sections
|
|
107
|
+
❌ Change skill type or architecture
|
|
108
|
+
❌ Modify hook configurations
|
|
109
|
+
❌ Delete files
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
For each auto-fix applied:
|
|
113
|
+
- Use Edit tool to modify the file
|
|
114
|
+
- Record the change
|
|
115
|
+
- Display what was changed
|
|
116
|
+
|
|
117
|
+
### 5. Final Summary
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
## Audit Summary
|
|
121
|
+
|
|
122
|
+
| Metric | Value |
|
|
123
|
+
|--------|-------|
|
|
124
|
+
| Scope | {scope} |
|
|
125
|
+
| Components scanned | {total_count} |
|
|
126
|
+
| Healthy | {ok_count} |
|
|
127
|
+
| With warnings | {warn_count} |
|
|
128
|
+
| With errors | {error_count} |
|
|
129
|
+
| Auto-fixes applied | {fix_count} (if --fix) |
|
|
130
|
+
|
|
131
|
+
### Health Score: {score}%
|
|
132
|
+
(100% = no errors or warnings)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## SUCCESS METRICS:
|
|
138
|
+
- Complete report displayed with all components
|
|
139
|
+
- Every issue has an actionable recommendation
|
|
140
|
+
- Auto-fixes applied if --fix mode (safe fixes only)
|
|
141
|
+
- Health score calculated and displayed
|
|
142
|
+
- Report is scannable (tables, not prose)
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-skill
|
|
3
|
+
description: |
|
|
4
|
+
Create or update Claude Code skills based on official documentation.
|
|
5
|
+
Use this skill when:
|
|
6
|
+
- Creating a new skill from scratch
|
|
7
|
+
- Updating an existing skill's structure or content
|
|
8
|
+
- Converting a simple skill to progressive step loading
|
|
9
|
+
argument-hint: "<create|update> [name] [--scope project|global|templates]"
|
|
10
|
+
disable-model-invocation: true
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
<objective>
|
|
14
|
+
Create or update Claude Code skills following official conventions. Guides the user through skill design, generates properly structured files, and validates the result.
|
|
15
|
+
</objective>
|
|
16
|
+
|
|
17
|
+
<quick_start>
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Create a new skill
|
|
21
|
+
/cc-skill create my-skill
|
|
22
|
+
/cc-skill create my-skill --scope project
|
|
23
|
+
/cc-skill create my-skill --scope global
|
|
24
|
+
/cc-skill create my-skill --scope templates
|
|
25
|
+
|
|
26
|
+
# Update an existing skill
|
|
27
|
+
/cc-skill update my-skill
|
|
28
|
+
/cc-skill update my-skill --scope global
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
</quick_start>
|
|
32
|
+
|
|
33
|
+
<parameters>
|
|
34
|
+
|
|
35
|
+
<subcommands>
|
|
36
|
+
| Command | Description | Workflow |
|
|
37
|
+
|---------|-------------|----------|
|
|
38
|
+
| `create` | Create a new skill from scratch | init → design → generate → steps → validate |
|
|
39
|
+
| `update` | Update an existing skill | init → analyze → apply → validate |
|
|
40
|
+
</subcommands>
|
|
41
|
+
|
|
42
|
+
<flags>
|
|
43
|
+
| Flag | Description |
|
|
44
|
+
|------|-------------|
|
|
45
|
+
| `--scope project` | Target `.claude/skills/` (default) |
|
|
46
|
+
| `--scope global` | Target `~/.claude/skills/` |
|
|
47
|
+
| `--scope templates` | Target `templates/skills/` (SmartStack CLI) |
|
|
48
|
+
| `--type simple` | Skip interactive type selection |
|
|
49
|
+
| `--type progressive` | Skip interactive type selection |
|
|
50
|
+
| `--type forked` | Skip interactive type selection |
|
|
51
|
+
</flags>
|
|
52
|
+
|
|
53
|
+
<examples>
|
|
54
|
+
```bash
|
|
55
|
+
# Create a simple skill in current project
|
|
56
|
+
/cc-skill create lint-check --type simple
|
|
57
|
+
|
|
58
|
+
# Create a progressive skill for SmartStack templates
|
|
59
|
+
/cc-skill create my-workflow --scope templates --type progressive
|
|
60
|
+
|
|
61
|
+
# Update an existing skill
|
|
62
|
+
/cc-skill update gitflow
|
|
63
|
+
|
|
64
|
+
# Create a forked research skill
|
|
65
|
+
/cc-skill create code-search --type forked
|
|
66
|
+
```
|
|
67
|
+
</examples>
|
|
68
|
+
|
|
69
|
+
</parameters>
|
|
70
|
+
|
|
71
|
+
<workflow>
|
|
72
|
+
**Create flow:**
|
|
73
|
+
1. Parse subcommand, name, scope, flags
|
|
74
|
+
2. Design skill (type, frontmatter, structure)
|
|
75
|
+
3. Generate SKILL.md with proper sections
|
|
76
|
+
4. Generate step files (if progressive)
|
|
77
|
+
5. Validate structure and conventions
|
|
78
|
+
|
|
79
|
+
**Update flow:**
|
|
80
|
+
1. Parse subcommand, name, scope
|
|
81
|
+
2. Read and analyze existing skill
|
|
82
|
+
3. Apply requested changes
|
|
83
|
+
4. Validate structure and conventions
|
|
84
|
+
</workflow>
|
|
85
|
+
|
|
86
|
+
<state_variables>
|
|
87
|
+
| Variable | Type | Description |
|
|
88
|
+
|----------|------|-------------|
|
|
89
|
+
| `{subcommand}` | string | create or update |
|
|
90
|
+
| `{skill_name}` | string | Skill name (lowercase, max 64 chars) |
|
|
91
|
+
| `{scope}` | string | project, global, or templates |
|
|
92
|
+
| `{target_dir}` | string | Resolved target directory |
|
|
93
|
+
| `{skill_type}` | string | simple, progressive, or forked |
|
|
94
|
+
| `{description}` | string | Skill description |
|
|
95
|
+
| `{user_invocable}` | boolean | Visible in /menu |
|
|
96
|
+
| `{disable_model_invocation}` | boolean | Manual only |
|
|
97
|
+
| `{allowed_tools}` | string | Tools without permission |
|
|
98
|
+
| `{model}` | string | Model override |
|
|
99
|
+
| `{argument_hint}` | string | Autocomplete hint |
|
|
100
|
+
| `{step_count}` | number | Number of steps (if progressive) |
|
|
101
|
+
| `{steps}` | object[] | Step definitions (name, description) |
|
|
102
|
+
</state_variables>
|
|
103
|
+
|
|
104
|
+
<entry_point>
|
|
105
|
+
|
|
106
|
+
**FIRST ACTION:** Load `steps/step-00-init.md`
|
|
107
|
+
|
|
108
|
+
</entry_point>
|
|
109
|
+
|
|
110
|
+
<step_files>
|
|
111
|
+
| Step | File | Purpose |
|
|
112
|
+
|------|------|---------|
|
|
113
|
+
| 00 | `steps/step-00-init.md` | Parse subcommand, name, scope, resolve target directory |
|
|
114
|
+
| 01 | `steps/step-01-design.md` | Choose skill type, gather frontmatter info via questions |
|
|
115
|
+
| 02 | `steps/step-02-generate.md` | Generate SKILL.md from template |
|
|
116
|
+
| 03 | `steps/step-03-steps.md` | Generate step files (progressive only) |
|
|
117
|
+
| 04 | `steps/step-04-validate.md` | Validate structure, display summary |
|
|
118
|
+
</step_files>
|
|
119
|
+
|
|
120
|
+
<execution_rules>
|
|
121
|
+
- **Load one step at a time** - Progressive loading
|
|
122
|
+
- **Ask before generating** - Confirm design choices with user
|
|
123
|
+
- **Use templates** - Load from `templates/` directory for generation
|
|
124
|
+
- **Follow official conventions** - Based on Claude Code documentation
|
|
125
|
+
- **Validate at the end** - Check all generated files
|
|
126
|
+
</execution_rules>
|
|
127
|
+
|
|
128
|
+
<success_criteria>
|
|
129
|
+
- Skill directory created with correct structure
|
|
130
|
+
- SKILL.md has valid frontmatter and sections
|
|
131
|
+
- Step files properly chained (if progressive)
|
|
132
|
+
- All file references valid
|
|
133
|
+
- Skill follows official Claude Code conventions
|
|
134
|
+
</success_criteria>
|