specweave 1.0.223 → 1.0.224
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/CLAUDE.md +24 -24
- package/package.json +1 -1
- package/plugins/specweave/skills/skill/SKILL.md +323 -4
- package/plugins/specweave-backend/commands/api-scaffold.md +5 -0
- package/plugins/specweave-backend/commands/crud-generate.md +5 -0
- package/plugins/specweave-backend/commands/migration-generate.md +5 -0
- package/plugins/specweave-confluent/commands/connector-deploy.md +5 -0
- package/plugins/specweave-confluent/commands/ksqldb-query.md +5 -0
- package/plugins/specweave-confluent/commands/schema-register.md +5 -0
- package/plugins/specweave-cost-optimizer/commands/cost-analyze.md +5 -0
- package/plugins/specweave-cost-optimizer/commands/cost-optimize.md +5 -0
- package/plugins/specweave-diagrams/commands/diagrams-generate.md +5 -0
- package/plugins/specweave-figma/commands/figma-import.md +5 -0
- package/plugins/specweave-figma/commands/figma-to-react.md +5 -0
- package/plugins/specweave-figma/commands/figma-tokens.md +5 -0
- package/plugins/specweave-frontend/commands/component-generate.md +5 -0
- package/plugins/specweave-frontend/commands/design-system-init.md +5 -0
- package/plugins/specweave-frontend/commands/frontend-scaffold.md +5 -0
- package/plugins/specweave-frontend/commands/nextjs-setup.md +5 -0
- package/plugins/specweave-kubernetes/commands/cluster-setup.md +5 -0
- package/plugins/specweave-kubernetes/commands/deployment-generate.md +5 -0
- package/plugins/specweave-kubernetes/commands/helm-scaffold.md +5 -0
- package/plugins/specweave-mobile/commands/app-scaffold.md +5 -0
- package/plugins/specweave-mobile/commands/build-config.md +5 -0
- package/plugins/specweave-mobile/commands/screen-generate.md +5 -0
- package/plugins/specweave-payments/commands/stripe-setup.md +5 -0
- package/plugins/specweave-payments/commands/subscription-flow.md +5 -0
- package/plugins/specweave-payments/commands/subscription-manage.md +5 -0
- package/plugins/specweave-payments/commands/webhook-setup.md +5 -0
- package/plugins/specweave-testing/commands/e2e-setup.md +5 -0
- package/plugins/specweave-testing/commands/test-coverage.md +5 -0
- package/plugins/specweave-testing/commands/test-generate.md +5 -0
- package/plugins/specweave-testing/commands/test-init.md +5 -0
- package/plugins/specweave-testing/commands/ui-automate.md +5 -0
- package/plugins/specweave-testing/commands/ui-inspect.md +5 -0
package/CLAUDE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- SW:META template="claude" version="1.0.
|
|
1
|
+
<!-- SW:META template="claude" version="1.0.223" sections="header,start,autodetect,metarule,rules,workflow,reflect,context,structure,taskformat,secrets,syncing,testing,tdd,api,limits,troubleshooting,lazyloading,principles,linking,mcp,auto,docs" -->
|
|
2
2
|
|
|
3
3
|
<!-- SW:SECTION:hook-priority version="1.0.171" -->
|
|
4
4
|
## ⛔ Hook Instructions Override Everything
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
**SKILL FIRST ≠ only one skill.** Chain: hook skill → `sw-frontend:*` / `sw-backend:*` / etc → implement.
|
|
14
14
|
<!-- SW:END:hook-priority -->
|
|
15
15
|
|
|
16
|
-
<!-- SW:SECTION:header version="1.0.
|
|
16
|
+
<!-- SW:SECTION:header version="1.0.223" -->
|
|
17
17
|
**Framework**: SpecWeave | **Truth**: `spec.md` + `tasks.md`
|
|
18
18
|
<!-- SW:END:header -->
|
|
19
19
|
|
|
@@ -123,7 +123,7 @@ claude plugin install sw@specweave --scope project # Team-shared
|
|
|
123
123
|
|
|
124
124
|
SpecWeave auto-installs: LSP → project scope, sw-* → user scope.
|
|
125
125
|
|
|
126
|
-
<!-- SW:SECTION:start version="1.0.
|
|
126
|
+
<!-- SW:SECTION:start version="1.0.223" -->
|
|
127
127
|
## Getting Started
|
|
128
128
|
|
|
129
129
|
**Initial increment**: `0001-project-setup` (auto-created by `specweave init`)
|
|
@@ -133,7 +133,7 @@ SpecWeave auto-installs: LSP → project scope, sw-* → user scope.
|
|
|
133
133
|
2. **Customize**: Edit spec.md and use for setup tasks
|
|
134
134
|
<!-- SW:END:start -->
|
|
135
135
|
|
|
136
|
-
<!-- SW:SECTION:autodetect version="1.0.
|
|
136
|
+
<!-- SW:SECTION:autodetect version="1.0.223" -->
|
|
137
137
|
## Auto-Detection
|
|
138
138
|
|
|
139
139
|
SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
@@ -143,7 +143,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
143
143
|
**Opt-out phrases**: "Just brainstorm first" | "Don't plan yet" | "Quick discussion" | "Let's explore ideas"
|
|
144
144
|
<!-- SW:END:autodetect -->
|
|
145
145
|
|
|
146
|
-
<!-- SW:SECTION:metarule version="1.0.
|
|
146
|
+
<!-- SW:SECTION:metarule version="1.0.223" -->
|
|
147
147
|
## Workflow Orchestration
|
|
148
148
|
|
|
149
149
|
### 1. Plan Mode Default
|
|
@@ -170,7 +170,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
170
170
|
```
|
|
171
171
|
<!-- SW:END:metarule -->
|
|
172
172
|
|
|
173
|
-
<!-- SW:SECTION:rules version="1.0.
|
|
173
|
+
<!-- SW:SECTION:rules version="1.0.223" -->
|
|
174
174
|
## Rules
|
|
175
175
|
|
|
176
176
|
1. **Files** → `.specweave/increments/####-name/` (see Structure section for details)
|
|
@@ -189,7 +189,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
189
189
|
Use next available number. **NEVER create duplicate prefixes.**
|
|
190
190
|
<!-- SW:END:rules -->
|
|
191
191
|
|
|
192
|
-
<!-- SW:SECTION:workflow version="1.0.
|
|
192
|
+
<!-- SW:SECTION:workflow version="1.0.223" -->
|
|
193
193
|
## Workflow
|
|
194
194
|
|
|
195
195
|
`/sw:increment "X"` → `/sw:do` → `/sw:progress` → `/sw:done 0001`
|
|
@@ -235,7 +235,7 @@ project/
|
|
|
235
235
|
**NEVER assume single-repo mode without scanning first!**
|
|
236
236
|
<!-- SW:END:save-nested-repos -->
|
|
237
237
|
|
|
238
|
-
<!-- SW:SECTION:reflect version="1.0.
|
|
238
|
+
<!-- SW:SECTION:reflect version="1.0.223" -->
|
|
239
239
|
## Skill Memories
|
|
240
240
|
|
|
241
241
|
SpecWeave learns from corrections. Learnings saved here automatically. Edit or delete as needed.
|
|
@@ -257,7 +257,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
257
257
|
- **2026-02-04**: Use subagents liberally for codebase analysis - up to 10+ concurrent for large-scale exploration
|
|
258
258
|
- **2026-02-04**: Prefer leaderboard-style reporting when analyzing usage patterns or identifying deletion candidates
|
|
259
259
|
|
|
260
|
-
<!-- SW:SECTION:context version="1.0.
|
|
260
|
+
<!-- SW:SECTION:context version="1.0.223" -->
|
|
261
261
|
## Context
|
|
262
262
|
|
|
263
263
|
**Before implementing**: Check ADRs at `.specweave/docs/internal/architecture/adr/`
|
|
@@ -265,7 +265,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
265
265
|
**Load context**: `/sw:context <topic>` loads relevant living docs into conversation
|
|
266
266
|
<!-- SW:END:context -->
|
|
267
267
|
|
|
268
|
-
<!-- SW:SECTION:structure version="1.0.
|
|
268
|
+
<!-- SW:SECTION:structure version="1.0.223" -->
|
|
269
269
|
## Structure
|
|
270
270
|
|
|
271
271
|
```
|
|
@@ -280,7 +280,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
280
280
|
**Everything else → subfolders**: `reports/` | `logs/` | `scripts/` | `backups/`
|
|
281
281
|
<!-- SW:END:structure -->
|
|
282
282
|
|
|
283
|
-
<!-- SW:SECTION:taskformat version="1.0.
|
|
283
|
+
<!-- SW:SECTION:taskformat version="1.0.223" -->
|
|
284
284
|
## Task Format
|
|
285
285
|
|
|
286
286
|
```markdown
|
|
@@ -290,7 +290,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
290
290
|
```
|
|
291
291
|
<!-- SW:END:taskformat -->
|
|
292
292
|
|
|
293
|
-
<!-- SW:SECTION:secrets version="1.0.
|
|
293
|
+
<!-- SW:SECTION:secrets version="1.0.223" -->
|
|
294
294
|
## Secrets Check
|
|
295
295
|
|
|
296
296
|
**BEFORE CLI tools**: Check existing config first!
|
|
@@ -304,7 +304,7 @@ gh auth status
|
|
|
304
304
|
**SECURITY**: NEVER use `grep TOKEN .env` without `-q` flag - it exposes credentials in terminal!
|
|
305
305
|
<!-- SW:END:secrets -->
|
|
306
306
|
|
|
307
|
-
<!-- SW:SECTION:syncing version="1.0.
|
|
307
|
+
<!-- SW:SECTION:syncing version="1.0.223" -->
|
|
308
308
|
## External Sync (GitHub/JIRA/ADO)
|
|
309
309
|
|
|
310
310
|
**Commands**: `/sw-github:sync {id}` (issues) | `/sw:sync-specs` (living docs only)
|
|
@@ -314,7 +314,7 @@ gh auth status
|
|
|
314
314
|
**Config**: Set `sync.github.enabled: true` + `canUpdateExternalItems: true` in config.json
|
|
315
315
|
<!-- SW:END:syncing -->
|
|
316
316
|
|
|
317
|
-
<!-- SW:SECTION:testing version="1.0.
|
|
317
|
+
<!-- SW:SECTION:testing version="1.0.223" -->
|
|
318
318
|
## Testing
|
|
319
319
|
|
|
320
320
|
BDD in tasks.md | Unit >80% | `.test.ts` (Vitest)
|
|
@@ -326,7 +326,7 @@ vi.mock('./module', () => ({ func: mockFn }));
|
|
|
326
326
|
```
|
|
327
327
|
<!-- SW:END:testing -->
|
|
328
328
|
|
|
329
|
-
<!-- SW:SECTION:tdd version="1.0.
|
|
329
|
+
<!-- SW:SECTION:tdd version="1.0.223" -->
|
|
330
330
|
## TDD Mode (Test-Driven Development)
|
|
331
331
|
|
|
332
332
|
**When `testing.defaultTestMode: "TDD"` is configured**, follow RED-GREEN-REFACTOR discipline:
|
|
@@ -387,7 +387,7 @@ When TDD is enabled, tasks include phase markers:
|
|
|
387
387
|
**Rule**: Complete dependencies BEFORE dependent tasks (RED before GREEN).
|
|
388
388
|
<!-- SW:END:tdd -->
|
|
389
389
|
|
|
390
|
-
<!-- SW:SECTION:api version="1.0.
|
|
390
|
+
<!-- SW:SECTION:api version="1.0.223" -->
|
|
391
391
|
## API Development (OpenAPI-First)
|
|
392
392
|
|
|
393
393
|
**For API projects only.** Commands: `/sw:api-docs --all` | `--openapi` | `--postman` | `--validate`
|
|
@@ -395,13 +395,13 @@ When TDD is enabled, tasks include phase markers:
|
|
|
395
395
|
Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
|
|
396
396
|
<!-- SW:END:api -->
|
|
397
397
|
|
|
398
|
-
<!-- SW:SECTION:limits version="1.0.
|
|
398
|
+
<!-- SW:SECTION:limits version="1.0.223" -->
|
|
399
399
|
## Limits
|
|
400
400
|
|
|
401
401
|
**Max 1500 lines/file** — extract before adding
|
|
402
402
|
<!-- SW:END:limits -->
|
|
403
403
|
|
|
404
|
-
<!-- SW:SECTION:troubleshooting version="1.0.
|
|
404
|
+
<!-- SW:SECTION:troubleshooting version="1.0.223" -->
|
|
405
405
|
## Troubleshooting
|
|
406
406
|
|
|
407
407
|
| Issue | Fix |
|
|
@@ -414,7 +414,7 @@ Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
|
|
|
414
414
|
| Session stuck | Kill + `rm -f .specweave/state/*.lock` + restart |
|
|
415
415
|
<!-- SW:END:troubleshooting -->
|
|
416
416
|
|
|
417
|
-
<!-- SW:SECTION:lazyloading version="1.0.
|
|
417
|
+
<!-- SW:SECTION:lazyloading version="1.0.223" -->
|
|
418
418
|
## Plugin Auto-Loading
|
|
419
419
|
|
|
420
420
|
Plugins load automatically based on project type and keywords. Manual install if needed:
|
|
@@ -428,7 +428,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
|
|
|
428
428
|
**Token savings**: Core ~3-5K tokens vs all plugins ~60K+
|
|
429
429
|
<!-- SW:END:lazyloading -->
|
|
430
430
|
|
|
431
|
-
<!-- SW:SECTION:principles version="1.0.
|
|
431
|
+
<!-- SW:SECTION:principles version="1.0.223" -->
|
|
432
432
|
## Principles
|
|
433
433
|
|
|
434
434
|
### SpecWeave Principles
|
|
@@ -444,7 +444,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
|
|
|
444
444
|
- **Demand Elegance**: For non-trivial changes, pause and ask "is there a more elegant way?" - but skip this for simple, obvious fixes (don't over-engineer).
|
|
445
445
|
<!-- SW:END:principles -->
|
|
446
446
|
|
|
447
|
-
<!-- SW:SECTION:linking version="1.0.
|
|
447
|
+
<!-- SW:SECTION:linking version="1.0.223" -->
|
|
448
448
|
## Bidirectional Linking
|
|
449
449
|
|
|
450
450
|
Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
|
|
@@ -452,7 +452,7 @@ Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
|
|
|
452
452
|
Task format: `**AC**: AC-US1-01, AC-US1-02` (CRITICAL for linking)
|
|
453
453
|
<!-- SW:END:linking -->
|
|
454
454
|
|
|
455
|
-
<!-- SW:SECTION:mcp version="1.0.
|
|
455
|
+
<!-- SW:SECTION:mcp version="1.0.223" -->
|
|
456
456
|
## External Services
|
|
457
457
|
|
|
458
458
|
**Priority**: CLI tools first (simpler) → MCP for complex integrations
|
|
@@ -474,7 +474,7 @@ claude mcp add --transport stdio postgres -- npx -y @modelcontextprotocol/server
|
|
|
474
474
|
MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
|
|
475
475
|
<!-- SW:END:mcp -->
|
|
476
476
|
|
|
477
|
-
<!-- SW:SECTION:auto version="1.0.
|
|
477
|
+
<!-- SW:SECTION:auto version="1.0.223" -->
|
|
478
478
|
## Auto Mode
|
|
479
479
|
|
|
480
480
|
**Commands**: `/sw:auto` (start) | `/sw:auto-status` (check) | `/sw:cancel-auto` (emergency only)
|
|
@@ -491,7 +491,7 @@ MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
|
|
|
491
491
|
**STOP & ASK** if: Spec conflicts | Task unnecessary | Requirement ambiguous
|
|
492
492
|
<!-- SW:END:auto -->
|
|
493
493
|
|
|
494
|
-
<!-- SW:SECTION:docs version="1.0.
|
|
494
|
+
<!-- SW:SECTION:docs version="1.0.223" -->
|
|
495
495
|
## Docs
|
|
496
496
|
|
|
497
497
|
[spec-weave.com](https://spec-weave.com)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specweave",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.224",
|
|
4
4
|
"description": "Spec-driven development framework for Claude Code. AI-native workflow with living documentation, intelligent agents, and multilingual support (9 languages). Enterprise-grade traceability with permanent specs and temporary increments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -1,12 +1,211 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skill
|
|
3
|
-
description: Create Claude Code skills with proper YAML frontmatter, validation, and
|
|
4
|
-
argument-hint: [--name skill-name] [--type auto|command|knowledge]
|
|
3
|
+
description: Create and validate Claude Code skills with proper YAML frontmatter. Use for skill creation, validation, and auditing. Activates for: create skill, validate skill, audit skills, check skills, skill format, SKILL.md.
|
|
4
|
+
argument-hint: [--validate [path]] [--audit] [--name skill-name] [--type auto|command|knowledge]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Skill Creator
|
|
7
|
+
# Skill Creator & Validator
|
|
8
8
|
|
|
9
|
-
Create Claude Code skills with proper YAML frontmatter, validation, and best practices.
|
|
9
|
+
Create and validate Claude Code skills with proper YAML frontmatter, validation, and best practices.
|
|
10
|
+
|
|
11
|
+
## Modes
|
|
12
|
+
|
|
13
|
+
| Mode | Command | Description |
|
|
14
|
+
|------|---------|-------------|
|
|
15
|
+
| **Create** | `/sw:skill` | Interactive skill creation |
|
|
16
|
+
| **Validate** | `/sw:skill --validate [path]` | Validate single skill |
|
|
17
|
+
| **Audit** | `/sw:skill --audit` | Audit ALL skills in project |
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Validation Mode (`--validate`)
|
|
22
|
+
|
|
23
|
+
Validate a single skill file against official Anthropic format.
|
|
24
|
+
|
|
25
|
+
### Usage
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
/sw:skill --validate # Validate current skill (if in skill dir)
|
|
29
|
+
/sw:skill --validate plugins/specweave/skills/pm/SKILL.md
|
|
30
|
+
/sw:skill --validate .claude/skills/my-skill/SKILL.md
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Validation Checks (Official Anthropic Format)
|
|
34
|
+
|
|
35
|
+
Run these checks on every SKILL.md:
|
|
36
|
+
|
|
37
|
+
#### 1. Frontmatter Structure
|
|
38
|
+
```
|
|
39
|
+
[ ] File starts with `---` on line 1
|
|
40
|
+
[ ] Closing `---` present before markdown content
|
|
41
|
+
[ ] Valid YAML syntax between delimiters
|
|
42
|
+
[ ] No tabs in YAML (spaces only)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### 2. Required Fields
|
|
46
|
+
```
|
|
47
|
+
[ ] `name:` present (recommended)
|
|
48
|
+
[ ] `description:` present (CRITICAL for activation)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### 3. Name Validation
|
|
52
|
+
```
|
|
53
|
+
[ ] Matches pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
|
|
54
|
+
[ ] Max 64 characters
|
|
55
|
+
[ ] No consecutive hyphens
|
|
56
|
+
[ ] Matches directory name (if directory-based)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### 4. Description Quality
|
|
60
|
+
```
|
|
61
|
+
[ ] Under 1024 characters
|
|
62
|
+
[ ] Contains activation keywords (e.g., "Use when...", "Activates for...")
|
|
63
|
+
[ ] Front-loads the purpose (first sentence explains what it does)
|
|
64
|
+
[ ] Not too generic (specific enough for auto-activation)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
#### 5. Optional Fields (Valid Values)
|
|
68
|
+
```
|
|
69
|
+
[ ] `allowed-tools:` - valid tool names only (Read, Write, Edit, Grep, Glob, Bash, WebSearch, WebFetch, Task, etc.)
|
|
70
|
+
[ ] `disable-model-invocation:` - boolean (true/false)
|
|
71
|
+
[ ] `user-invocable:` - boolean (true/false)
|
|
72
|
+
[ ] `model:` - valid model (sonnet, opus, haiku)
|
|
73
|
+
[ ] `context:` - valid value (fork)
|
|
74
|
+
[ ] `agent:` - valid subagent type if context:fork
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### 6. Content Quality
|
|
78
|
+
```
|
|
79
|
+
[ ] Has meaningful content after frontmatter
|
|
80
|
+
[ ] Reasonable length (50-2000 lines recommended)
|
|
81
|
+
[ ] No orphaned template placeholders ({placeholder})
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Output Format
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
## Skill Validation Report
|
|
88
|
+
|
|
89
|
+
**File**: plugins/specweave/skills/pm/SKILL.md
|
|
90
|
+
**Status**: PASS | WARN | FAIL
|
|
91
|
+
|
|
92
|
+
### Checks
|
|
93
|
+
| Check | Status | Details |
|
|
94
|
+
|-------|--------|---------|
|
|
95
|
+
| Frontmatter | PASS | Valid YAML |
|
|
96
|
+
| Name | PASS | "pm" matches pattern |
|
|
97
|
+
| Description | WARN | Missing activation keywords |
|
|
98
|
+
| Tools | PASS | Valid tool list |
|
|
99
|
+
| Content | PASS | 245 lines |
|
|
100
|
+
|
|
101
|
+
### Issues Found
|
|
102
|
+
- WARN: Description lacks "Activates for:" or "Use when" keywords
|
|
103
|
+
- INFO: Consider adding trigger phrases for better auto-activation
|
|
104
|
+
|
|
105
|
+
### Suggested Fix
|
|
106
|
+
Add to description: "Activates for: product management, user stories, requirements"
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Audit Mode (`--audit`)
|
|
112
|
+
|
|
113
|
+
Comprehensive audit of ALL skills across project.
|
|
114
|
+
|
|
115
|
+
### Usage
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
/sw:skill --audit # Audit all skills
|
|
119
|
+
/sw:skill --audit --fix # Audit and offer auto-fixes
|
|
120
|
+
/sw:skill --audit --json # Output as JSON
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Scan Locations
|
|
124
|
+
|
|
125
|
+
1. **Project skills**: `.claude/skills/*/SKILL.md`
|
|
126
|
+
2. **Plugin skills**: `plugins/*/skills/*/SKILL.md`
|
|
127
|
+
3. **Legacy commands**: `plugins/*/commands/*.md` (check frontmatter)
|
|
128
|
+
|
|
129
|
+
### Audit Report (Leaderboard Style)
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
## Skills Audit Report
|
|
133
|
+
|
|
134
|
+
**Scanned**: 127 skills, 45 commands
|
|
135
|
+
**Date**: 2026-02-03
|
|
136
|
+
|
|
137
|
+
### Summary
|
|
138
|
+
| Status | Count | Percentage |
|
|
139
|
+
|--------|-------|------------|
|
|
140
|
+
| PASS | 98 | 77% |
|
|
141
|
+
| WARN | 21 | 17% |
|
|
142
|
+
| FAIL | 8 | 6% |
|
|
143
|
+
|
|
144
|
+
### Critical Issues (FAIL)
|
|
145
|
+
| Location | Issue | Severity |
|
|
146
|
+
|----------|-------|----------|
|
|
147
|
+
| plugins/specweave-mobile/commands/build-config.md | Missing frontmatter | CRITICAL |
|
|
148
|
+
| plugins/specweave-n8n/skills/n8n-workflow/SKILL.md | Invalid YAML | CRITICAL |
|
|
149
|
+
| ... | ... | ... |
|
|
150
|
+
|
|
151
|
+
### Warnings
|
|
152
|
+
| Location | Issue |
|
|
153
|
+
|----------|-------|
|
|
154
|
+
| plugins/specweave/skills/pm/SKILL.md | Description lacks keywords |
|
|
155
|
+
| plugins/specweave-frontend/skills/react-expert/SKILL.md | Name too long (67 chars) |
|
|
156
|
+
| ... | ... |
|
|
157
|
+
|
|
158
|
+
### By Plugin (Worst First)
|
|
159
|
+
| Plugin | Pass | Warn | Fail | Score |
|
|
160
|
+
|--------|------|------|------|-------|
|
|
161
|
+
| specweave-mobile | 2 | 3 | 2 | 57% |
|
|
162
|
+
| specweave-n8n | 4 | 2 | 1 | 71% |
|
|
163
|
+
| specweave-testing | 8 | 1 | 0 | 94% |
|
|
164
|
+
| specweave | 25 | 3 | 0 | 94% |
|
|
165
|
+
| ... | ... | ... | ... | ... |
|
|
166
|
+
|
|
167
|
+
### Auto-Fix Available
|
|
168
|
+
8 issues can be auto-fixed. Run `/sw:skill --audit --fix`
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Auto-Fix Capabilities
|
|
172
|
+
|
|
173
|
+
| Issue | Auto-Fix |
|
|
174
|
+
|-------|----------|
|
|
175
|
+
| Missing frontmatter | Add minimal `---\nname: {from-filename}\ndescription: TODO\n---` |
|
|
176
|
+
| Name mismatch | Update to match directory name |
|
|
177
|
+
| Invalid characters in name | Convert to kebab-case |
|
|
178
|
+
| Missing description | Add placeholder with TODO marker |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Commands vs Skills: Clarification
|
|
183
|
+
|
|
184
|
+
**Per official Anthropic docs (2025):**
|
|
185
|
+
|
|
186
|
+
> "Custom slash commands have been merged into skills. A file at `.claude/commands/review.md` and a skill at `.claude/skills/review/SKILL.md` both create `/review` and work the same way."
|
|
187
|
+
|
|
188
|
+
### Migration Recommendation
|
|
189
|
+
|
|
190
|
+
| Format | Status | Recommendation |
|
|
191
|
+
|--------|--------|----------------|
|
|
192
|
+
| `commands/*.md` | Legacy | Migrate to skills or add frontmatter |
|
|
193
|
+
| `skills/*/SKILL.md` | Current | Preferred format |
|
|
194
|
+
|
|
195
|
+
### Command Frontmatter (If Keeping Commands)
|
|
196
|
+
|
|
197
|
+
```yaml
|
|
198
|
+
---
|
|
199
|
+
name: test-init
|
|
200
|
+
description: Initialize testing infrastructure with Vitest and Playwright
|
|
201
|
+
argument-hint: [--framework vitest|jest]
|
|
202
|
+
allowed-tools: [Read, Write, Edit, Bash]
|
|
203
|
+
---
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Create Mode (Interactive)
|
|
10
209
|
|
|
11
210
|
**Quick skill scaffolding** - from concept to working skill in under 2 minutes.
|
|
12
211
|
|
|
@@ -307,3 +506,123 @@ allowed-tools: Read, Grep, Glob, WebSearch
|
|
|
307
506
|
- Custom: specify tools you need
|
|
308
507
|
|
|
309
508
|
Create your skill!
|
|
509
|
+
|
|
510
|
+
---
|
|
511
|
+
|
|
512
|
+
## Implementation: Validation Algorithm
|
|
513
|
+
|
|
514
|
+
When running validation, use this algorithm:
|
|
515
|
+
|
|
516
|
+
### Step 1: Find Skills to Validate
|
|
517
|
+
|
|
518
|
+
```bash
|
|
519
|
+
# For --audit mode, find all skills
|
|
520
|
+
find plugins -name "SKILL.md" -type f 2>/dev/null
|
|
521
|
+
find .claude/skills -name "SKILL.md" -type f 2>/dev/null
|
|
522
|
+
|
|
523
|
+
# Also check commands for frontmatter compliance
|
|
524
|
+
find plugins -path "*/commands/*.md" -type f 2>/dev/null
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
### Step 2: Parse Frontmatter
|
|
528
|
+
|
|
529
|
+
For each file:
|
|
530
|
+
1. Read file content
|
|
531
|
+
2. Check if starts with `---`
|
|
532
|
+
3. Find closing `---`
|
|
533
|
+
4. Parse YAML between delimiters
|
|
534
|
+
5. Extract fields: name, description, allowed-tools, etc.
|
|
535
|
+
|
|
536
|
+
### Step 3: Run Validation Checks
|
|
537
|
+
|
|
538
|
+
```typescript
|
|
539
|
+
interface ValidationResult {
|
|
540
|
+
file: string;
|
|
541
|
+
status: 'PASS' | 'WARN' | 'FAIL';
|
|
542
|
+
checks: {
|
|
543
|
+
frontmatter: { status: string; details: string };
|
|
544
|
+
name: { status: string; details: string };
|
|
545
|
+
description: { status: string; details: string };
|
|
546
|
+
tools: { status: string; details: string };
|
|
547
|
+
content: { status: string; details: string };
|
|
548
|
+
};
|
|
549
|
+
issues: { severity: string; message: string }[];
|
|
550
|
+
suggestions: string[];
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
// Name pattern (official Anthropic spec)
|
|
554
|
+
const NAME_PATTERN = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;
|
|
555
|
+
const MAX_NAME_LENGTH = 64;
|
|
556
|
+
const MAX_DESC_LENGTH = 1024;
|
|
557
|
+
|
|
558
|
+
// Valid tools (Claude Code built-in)
|
|
559
|
+
const VALID_TOOLS = [
|
|
560
|
+
'Read', 'Write', 'Edit', 'Grep', 'Glob', 'Bash',
|
|
561
|
+
'WebSearch', 'WebFetch', 'Task', 'TodoWrite',
|
|
562
|
+
'AskUserQuestion', 'Skill', 'NotebookEdit'
|
|
563
|
+
];
|
|
564
|
+
|
|
565
|
+
// Activation keyword patterns
|
|
566
|
+
const ACTIVATION_PATTERNS = [
|
|
567
|
+
/activates? for:?/i,
|
|
568
|
+
/use when/i,
|
|
569
|
+
/triggers? on/i,
|
|
570
|
+
/invoke when/i,
|
|
571
|
+
/use this skill when/i
|
|
572
|
+
];
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
### Step 4: Generate Report
|
|
576
|
+
|
|
577
|
+
Use leaderboard format for audit mode:
|
|
578
|
+
- Group by plugin
|
|
579
|
+
- Sort by score (worst first for issues, best first for passing)
|
|
580
|
+
- Calculate percentages
|
|
581
|
+
- Identify auto-fixable issues
|
|
582
|
+
|
|
583
|
+
### Step 5: Apply Fixes (if --fix)
|
|
584
|
+
|
|
585
|
+
For auto-fixable issues:
|
|
586
|
+
1. Backup original file
|
|
587
|
+
2. Apply fix (add frontmatter, correct name, etc.)
|
|
588
|
+
3. Re-validate to confirm fix worked
|
|
589
|
+
4. Report changes made
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
## Official Anthropic Frontmatter Reference
|
|
594
|
+
|
|
595
|
+
From https://code.claude.com/docs/en/skills:
|
|
596
|
+
|
|
597
|
+
| Field | Required | Type | Description |
|
|
598
|
+
|-------|----------|------|-------------|
|
|
599
|
+
| `name` | Recommended | string | Identifier (kebab-case, max 64 chars) |
|
|
600
|
+
| `description` | Recommended | string | When to use (max 1024 chars, include keywords) |
|
|
601
|
+
| `argument-hint` | Optional | string | Hint for arguments (e.g., `[issue-number]`) |
|
|
602
|
+
| `disable-model-invocation` | Optional | boolean | Prevent Claude auto-loading (default: false) |
|
|
603
|
+
| `user-invocable` | Optional | boolean | Hide from / menu (default: true) |
|
|
604
|
+
| `allowed-tools` | Optional | array | Tools Claude can use without permission |
|
|
605
|
+
| `model` | Optional | string | Model override (sonnet, opus, haiku) |
|
|
606
|
+
| `context` | Optional | string | Set to `fork` for subagent execution |
|
|
607
|
+
| `agent` | Optional | string | Subagent type when context:fork |
|
|
608
|
+
| `hooks` | Optional | object | Lifecycle hooks for this skill |
|
|
609
|
+
|
|
610
|
+
### Invocation Control Matrix
|
|
611
|
+
|
|
612
|
+
| Frontmatter | User Can Invoke | Claude Can Invoke | When Loaded |
|
|
613
|
+
|-------------|-----------------|-------------------|-------------|
|
|
614
|
+
| (default) | Yes | Yes | Description in context, full skill on invoke |
|
|
615
|
+
| `disable-model-invocation: true` | Yes | No | Description NOT in context |
|
|
616
|
+
| `user-invocable: false` | No | Yes | Description always in context |
|
|
617
|
+
|
|
618
|
+
---
|
|
619
|
+
|
|
620
|
+
## Troubleshooting Validation
|
|
621
|
+
|
|
622
|
+
| Error | Cause | Fix |
|
|
623
|
+
|-------|-------|-----|
|
|
624
|
+
| "Invalid YAML" | Tabs, bad indentation, unclosed quotes | Use spaces, check syntax |
|
|
625
|
+
| "Name mismatch" | `name:` differs from directory | Update to match directory name |
|
|
626
|
+
| "No activation keywords" | Description too generic | Add "Activates for:" or "Use when" |
|
|
627
|
+
| "Invalid tool" | Typo in allowed-tools | Check against VALID_TOOLS list |
|
|
628
|
+
| "Missing frontmatter" | File doesn't start with `---` | Add YAML frontmatter block |
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-scaffold
|
|
3
|
+
description: Generate production-ready backend API structure with authentication, database, and best practices
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# API Scaffolding Command
|
|
2
7
|
|
|
3
8
|
Generate production-ready backend API structure with authentication, database, and best practices.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: crud-generate
|
|
3
|
+
description: Generate complete CRUD operations for a database entity including model, service, controller, DTOs, and tests
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# CRUD Generator Command
|
|
2
7
|
|
|
3
8
|
Generate complete CRUD (Create, Read, Update, Delete) operations for a database entity.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cost-analyze
|
|
3
|
+
description: Analyze cloud infrastructure costs and identify optimization opportunities across AWS, Azure, and GCP.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-cost:cost-analyze
|
|
2
7
|
|
|
3
8
|
Analyze cloud infrastructure costs and identify optimization opportunities across AWS, Azure, and GCP.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cost-optimize
|
|
3
|
+
description: Implement cost optimization recommendations with automated resource modifications and savings plan purchases across AWS, Azure, and GCP.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-cost:cost-optimize
|
|
2
7
|
|
|
3
8
|
Implement cost optimization recommendations with automated resource modifications and savings plan purchases.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: figma-to-react
|
|
3
|
+
description: Convert Figma components to production-ready React components with TypeScript, styled-components, and responsive design.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-figma:to-react
|
|
2
7
|
|
|
3
8
|
Convert Figma components to production-ready React components with TypeScript, styled-components, and responsive design.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: figma-tokens
|
|
3
|
+
description: Extract design tokens from Figma and generate token files for theme configuration (CSS variables, JavaScript, JSON, SCSS).
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-figma:tokens
|
|
2
7
|
|
|
3
8
|
Extract design tokens from Figma and generate token files for theme configuration (CSS variables, JavaScript, JSON, SCSS).
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: component-generate
|
|
3
|
+
description: Generate React/Vue/Angular components with tests, Storybook stories, and documentation following Atomic Design principles.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-frontend:component-generate
|
|
2
7
|
|
|
3
8
|
Generate React/Vue/Angular components with tests, stories, and documentation following Atomic Design principles.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-system-init
|
|
3
|
+
description: Initialize a complete design system with Atomic Design principles, design tokens, theming, and component library foundation.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-frontend:design-system-init
|
|
2
7
|
|
|
3
8
|
Initialize a complete design system with Atomic Design principles, design tokens, and component library.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-scaffold
|
|
3
|
+
description: Scaffold a complete frontend project with modern tooling, TypeScript, and best practices for React, Vue, Angular, or Next.js.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-frontend:frontend-scaffold
|
|
2
7
|
|
|
3
8
|
Scaffold a complete frontend project with modern tooling and best practices.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nextjs-setup
|
|
3
|
+
description: Set up Next.js 14+ App Router project with Server Components, metadata configuration, and production-ready best practices.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-frontend:nextjs-setup
|
|
2
7
|
|
|
3
8
|
Set up Next.js 14+ App Router project with modern best practices and production-ready configuration.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cluster-setup
|
|
3
|
+
description: Set up a production-ready Kubernetes cluster with essential components including ingress, cert-manager, monitoring, and GitOps
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Kubernetes Cluster Setup
|
|
2
7
|
|
|
3
8
|
Set up a production-ready Kubernetes cluster with essential components.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deployment-generate
|
|
3
|
+
description: Generate production-ready Kubernetes deployment manifests including Deployment, Service, ConfigMap, Secret, and HPA resources
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Kubernetes Deployment Generator
|
|
2
7
|
|
|
3
8
|
Generate production-ready Kubernetes deployment manifests.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: app-scaffold
|
|
3
|
+
description: Generate production-ready React Native application structure with navigation, state management, API client, and best practices.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# React Native App Scaffolding
|
|
2
7
|
|
|
3
8
|
Generate production-ready React Native application structure.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stripe-setup
|
|
3
|
+
description: Complete Stripe integration setup with checkout flows, payment intents, customer management, and security best practices
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-payments:stripe-setup
|
|
2
7
|
|
|
3
8
|
Complete Stripe integration setup guide with production-ready code templates, security best practices, and testing workflows.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: subscription-flow
|
|
3
|
+
description: Implement complete subscription billing with pricing tiers, trials, upgrades/downgrades, proration, and lifecycle management
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-payments:subscription-flow
|
|
2
7
|
|
|
3
8
|
Complete subscription billing implementation guide with pricing tiers, trials, upgrades/downgrades, and lifecycle management.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: webhook-setup
|
|
3
|
+
description: Generate secure webhook handlers for payment providers including Stripe, PayPal, and Stripe Connect with signature verification and idempotency
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Payment Webhook Configuration
|
|
2
7
|
|
|
3
8
|
Generate secure webhook handlers for payment providers, including Stripe Connect.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: e2e-setup
|
|
3
|
+
description: Set up comprehensive Playwright E2E testing with best practices, page objects, and CI/CD integration.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-testing:e2e-setup
|
|
2
7
|
|
|
3
8
|
Set up comprehensive Playwright E2E testing with best practices, page objects, and CI/CD integration.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-coverage
|
|
3
|
+
description: Analyze test coverage, identify gaps, generate reports, and provide actionable quality metrics.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-testing:test-coverage
|
|
2
7
|
|
|
3
8
|
Comprehensive test coverage analysis, reporting, and quality metrics for modern test suites.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-generate
|
|
3
|
+
description: Generate comprehensive unit, integration, and E2E tests from components, functions, and API endpoints.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-testing:test-generate
|
|
2
7
|
|
|
3
8
|
Generate comprehensive unit, integration, and E2E tests from components, functions, and API endpoints.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-init
|
|
3
|
+
description: Initialize comprehensive testing infrastructure with Vitest, Playwright, and testing best practices.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# /sw-testing:test-init
|
|
2
7
|
|
|
3
8
|
Initialize comprehensive testing infrastructure with Vitest, Playwright, and testing best practices.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-automate
|
|
3
|
+
description: Create and execute automated browser workflows using Playwright for testing, web scraping, form automation, and UI interaction sequences.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# UI Automate - Browser Automation Workflows
|
|
2
7
|
|
|
3
8
|
Create and execute automated browser workflows using Playwright. Generate scripts for testing, web scraping, form automation, and UI interaction sequences.
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-inspect
|
|
3
|
+
description: Inspect web page elements using browser automation to identify selectors, attributes, and structure for testing and scraping.
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# UI Inspect - Browser Element Inspection
|
|
2
7
|
|
|
3
8
|
Inspect web page elements using browser automation tools. Helps identify selectors, attributes, and structure for automated testing and web scraping.
|