@slamb2k/mad-skills 2.0.7 → 2.0.9
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-plugin/marketplace.json +11 -5
- package/.claude-plugin/plugin.json +9 -7
- package/README.md +101 -25
- package/hooks/hooks.json +26 -0
- package/hooks/session-guard-prompt.sh +59 -0
- package/hooks/session-guard.sh +155 -151
- package/package.json +2 -7
- package/skills/brace/SKILL.md +240 -14
- package/skills/brace/assets/gitignore-template +0 -3
- package/skills/brace/references/phase-prompts.md +37 -0
- package/skills/brace/references/report-template.md +5 -1
- package/skills/build/SKILL.md +292 -13
- package/skills/distil/SKILL.md +258 -7
- package/skills/manifest.json +26 -16
- package/skills/prime/SKILL.md +76 -8
- package/skills/rig/SKILL.md +165 -7
- package/skills/ship/SKILL.md +190 -19
- package/skills/speccy/SKILL.md +165 -0
- package/skills/speccy/references/interview-guide.md +96 -0
- package/skills/speccy/tests/evals.json +34 -0
- package/skills/sync/SKILL.md +175 -17
- package/commands/brace.md +0 -9
- package/commands/build.md +0 -9
- package/commands/distil.md +0 -9
- package/commands/prime.md +0 -9
- package/commands/rig.md +0 -9
- package/commands/ship.md +0 -9
- package/commands/sync.md +0 -9
- package/skills/brace/instructions.md +0 -229
- package/skills/build/instructions.md +0 -293
- package/skills/distil/instructions.md +0 -255
- package/skills/prime/instructions.md +0 -73
- package/skills/rig/instructions.md +0 -162
- package/skills/ship/instructions.md +0 -192
- package/skills/sync/instructions.md +0 -178
- package/src/cli.js +0 -482
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "slamb2k
|
|
2
|
+
"name": "slamb2k",
|
|
3
3
|
"description": "Claude Code plugins by Simon Lamb",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.9",
|
|
5
5
|
"owner": {
|
|
6
6
|
"name": "Simon Lamb",
|
|
7
7
|
"url": "https://github.com/slamb2k"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
{
|
|
11
11
|
"name": "mad-skills",
|
|
12
12
|
"description": "AI-assisted planning, development and governance tools",
|
|
13
|
-
"version": "2.0.
|
|
13
|
+
"version": "2.0.9",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "slamb2k",
|
|
16
16
|
"url": "https://github.com/slamb2k"
|
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
"source": "./",
|
|
19
19
|
"category": "development",
|
|
20
20
|
"homepage": "https://github.com/slamb2k/mad-skills",
|
|
21
|
-
"tags": [
|
|
21
|
+
"tags": [
|
|
22
|
+
"planning",
|
|
23
|
+
"tdd",
|
|
24
|
+
"architecture",
|
|
25
|
+
"llm-review",
|
|
26
|
+
"implementation"
|
|
27
|
+
]
|
|
22
28
|
}
|
|
23
29
|
]
|
|
24
|
-
}
|
|
30
|
+
}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mad-skills",
|
|
3
3
|
"description": "AI-assisted planning, development and governance tools",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.9",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "slamb2k",
|
|
7
7
|
"url": "https://github.com/slamb2k"
|
|
8
8
|
},
|
|
9
9
|
"repository": "https://github.com/slamb2k/mad-skills",
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"keywords": [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
"keywords": [
|
|
12
|
+
"planning",
|
|
13
|
+
"tdd",
|
|
14
|
+
"architecture",
|
|
15
|
+
"llm-review",
|
|
16
|
+
"implementation"
|
|
17
|
+
]
|
|
18
|
+
}
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A skill framework for Claude Code. Ships 8 skills covering the full development lifecycle — from project initialization to shipping PRs.
|
|
6
6
|
|
|
7
7
|
## Skills
|
|
8
8
|
|
|
@@ -14,33 +14,111 @@ An npm-based skill framework for Claude Code. Ships 7 skills covering the full d
|
|
|
14
14
|
| **prime** | `/prime` | Load project context before feature work. Supports domain-specific context (security, routing, dashboard, etc.). |
|
|
15
15
|
| **rig** | `/rig` | Bootstrap repos with lefthook hooks, commit templates, PR templates, and GitHub Actions workflows. Idempotent. |
|
|
16
16
|
| **ship** | `/ship` | Full PR lifecycle — sync with main, create branch, commit, push, create PR, wait for CI, fix issues, squash merge, cleanup. |
|
|
17
|
+
| **speccy** | `/speccy` | Interview-driven specification builder. Reviews code/docs, interviews through targeted questions, produces structured specs. |
|
|
17
18
|
| **sync** | `/sync` | Sync local repo with origin/main. Stashes changes, pulls, restores stash, cleans up stale branches. |
|
|
18
19
|
|
|
19
20
|
## Installation
|
|
20
21
|
|
|
22
|
+
Three methods are available. The table below shows what each delivers:
|
|
23
|
+
|
|
24
|
+
| | Plugin | npx skills | npm package |
|
|
25
|
+
|---|---|---|---|
|
|
26
|
+
| Skills (slash commands) | ✅ all 8 | ✅ all 8 | — |
|
|
27
|
+
| Agents (e.g. ship-analyzer) | ✅ | ❌ | — |
|
|
28
|
+
| Session hooks (session-guard) | ✅ | ❌ | — |
|
|
29
|
+
| Cross-agent (Cursor, Cline, etc.) | ❌ Claude Code only | ✅ | — |
|
|
30
|
+
| Selective skill install | ❌ | ✅ | — |
|
|
31
|
+
| Auto-updates | ✅ | ❌ | — |
|
|
32
|
+
|
|
33
|
+
### Plugin (recommended)
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
/plugin install mad-skills@slamb2k
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Installs skills, agents, and session hooks from the GitHub repo into `~/.claude/plugins/`. Updates automatically. Claude Code only.
|
|
40
|
+
|
|
41
|
+
> **First time setup — add the marketplace (one-time):**
|
|
42
|
+
>
|
|
43
|
+
> **Option A** — CLI (outside Claude Code):
|
|
44
|
+
> ```bash
|
|
45
|
+
> claude plugin marketplace add slamb2k/mad-skills
|
|
46
|
+
> ```
|
|
47
|
+
>
|
|
48
|
+
> **Option B** — Manual (add to `~/.claude/settings.json`):
|
|
49
|
+
> ```json
|
|
50
|
+
> "extraKnownMarketplaces": {
|
|
51
|
+
> "slamb2k": {
|
|
52
|
+
> "source": { "source": "github", "repo": "slamb2k/mad-skills" }
|
|
53
|
+
> }
|
|
54
|
+
> }
|
|
55
|
+
> ```
|
|
56
|
+
>
|
|
57
|
+
> Then install the plugin inside Claude Code with `/plugin install mad-skills@slamb2k`, or from the CLI with `claude plugin install mad-skills@slamb2k`.
|
|
58
|
+
|
|
59
|
+
### npx skills
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npx skills add slamb2k/mad-skills -g -y # All skills, global
|
|
63
|
+
npx skills add slamb2k/mad-skills --skill ship -g -y # Specific skill
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Installs skills into `~/.claude/skills/` (and `~/.agents/skills/` for other agents). **Does not install agents or hooks.** This means:
|
|
67
|
+
|
|
68
|
+
- `/build` falls back to `general-purpose` agent for the ship stage instead of the optimised `ship-analyzer` agent
|
|
69
|
+
- The session-guard hook (CLAUDE.md staleness detection, git validation) is not active
|
|
70
|
+
|
|
71
|
+
Use this method when you need cross-agent compatibility (Cursor, Cline, Amp, etc.) or want to install individual skills.
|
|
72
|
+
|
|
73
|
+
> **Note for dotfiles users:** If `~/.claude/skills/` is symlinked from a dotfiles repo, `npx skills` will create broken relative symlinks. Replace the skills directory symlink with a real directory before installing. See [dotfiles compatibility](#dotfiles-compatibility) below.
|
|
74
|
+
|
|
75
|
+
### npm package
|
|
76
|
+
|
|
77
|
+
The `@slamb2k/mad-skills` npm package is the **release artifact** — it is published on every merge to main and is used internally by the plugin system. It does not provide a CLI and cannot be used to install skills directly.
|
|
78
|
+
|
|
79
|
+
### Invoke skills
|
|
80
|
+
|
|
81
|
+
After installation, invoke skills with `/<skill-name>` (e.g., `/ship`, `/sync`).
|
|
82
|
+
|
|
83
|
+
### Upgrading from the old CLI (`npx @slamb2k/mad-skills`)
|
|
84
|
+
|
|
85
|
+
If you previously installed via the v2.0.x CLI, clean up stale artifacts first:
|
|
86
|
+
|
|
21
87
|
```bash
|
|
22
|
-
#
|
|
23
|
-
|
|
88
|
+
# Remove old command stubs
|
|
89
|
+
rm -f ~/.claude/commands/{brace,build,distil,prime,rig,ship,sync,speccy}.md
|
|
90
|
+
|
|
91
|
+
# Remove installer manifest and stale skill files
|
|
92
|
+
rm -f ~/.claude/.mad-skills-manifest.json
|
|
93
|
+
rm -f ~/.claude/skills/*/instructions.md
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Then install fresh using plugin or npx skills above.
|
|
97
|
+
|
|
98
|
+
### Dotfiles compatibility
|
|
99
|
+
|
|
100
|
+
If you manage `~/.claude` via a dotfiles repo with symlinked subdirectories, `npx skills` creates relative symlinks that break when `~/.claude/skills/` is not physically located at `~/.claude/skills/`.
|
|
24
101
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
102
|
+
**Fix:** ensure `~/.claude/skills/` is a real directory (not a symlink), and do not re-symlink it from dotfiles. For custom/local skills you want in dotfiles, use per-skill absolute symlinks in your install script:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
ln -sfn "$DOTFILES_DIR/skills/my-skill" "$HOME/.claude/skills/my-skill"
|
|
29
106
|
```
|
|
30
107
|
|
|
31
|
-
|
|
108
|
+
`npx skills` will leave entries it did not create untouched.
|
|
32
109
|
|
|
33
110
|
## Repository Structure
|
|
34
111
|
|
|
35
112
|
```
|
|
36
113
|
mad-skills/
|
|
37
|
-
├── skills/ # Skill definitions (
|
|
114
|
+
├── skills/ # Skill definitions (8 skills)
|
|
38
115
|
│ ├── build/
|
|
39
116
|
│ ├── brace/
|
|
40
117
|
│ ├── distil/
|
|
41
118
|
│ ├── prime/
|
|
42
119
|
│ ├── rig/
|
|
43
120
|
│ ├── ship/
|
|
121
|
+
│ ├── speccy/
|
|
44
122
|
│ └── sync/
|
|
45
123
|
├── scripts/ # Build and CI tooling
|
|
46
124
|
│ ├── validate-skills.js # Structural validation
|
|
@@ -48,10 +126,7 @@ mad-skills/
|
|
|
48
126
|
│ ├── run-evals.js # Eval runner (Anthropic/OpenRouter)
|
|
49
127
|
│ ├── build-manifests.js # Generate skills/manifest.json
|
|
50
128
|
│ └── package-skills.js # Package .skill archives
|
|
51
|
-
├──
|
|
52
|
-
│ └── cli.js # npx installer CLI
|
|
53
|
-
├── commands/ # Slash command stubs
|
|
54
|
-
├── hooks/ # Session hooks (session-guard)
|
|
129
|
+
├── hooks/ # Session hooks + plugin hook config
|
|
55
130
|
├── agents/ # Agent definitions (ship-analyzer)
|
|
56
131
|
├── tests/results/ # Eval output
|
|
57
132
|
├── archive/ # Legacy skills (v1.x)
|
|
@@ -69,8 +144,7 @@ Each skill in `skills/<name>/` follows a standard layout:
|
|
|
69
144
|
|
|
70
145
|
```
|
|
71
146
|
skills/<name>/
|
|
72
|
-
├── SKILL.md # Frontmatter
|
|
73
|
-
├── instructions.md # Execution logic (max 500 lines)
|
|
147
|
+
├── SKILL.md # Frontmatter + banner + execution logic (single file)
|
|
74
148
|
├── references/ # Extracted prompts, contracts, guides
|
|
75
149
|
├── assets/ # Static files (templates, components)
|
|
76
150
|
└── tests/
|
|
@@ -109,20 +183,22 @@ npm test # validate + lint + eval
|
|
|
109
183
|
- Detects which skills changed and posts eval results as PR comments
|
|
110
184
|
|
|
111
185
|
**Release pipeline** (`.github/workflows/release.yml`):
|
|
112
|
-
- Triggers on push to main
|
|
113
|
-
-
|
|
114
|
-
- Creates version tag from package.json, publishes to npm with provenance
|
|
186
|
+
- Phase 1: Triggers on push to main, validates, bumps patch version, creates auto-merge PR
|
|
187
|
+
- Phase 2: When version bump merges, creates tag, publishes to npm with provenance
|
|
115
188
|
- Builds `.skill` packages and creates a GitHub Release
|
|
116
|
-
- Skips publish if the version tag already exists
|
|
117
189
|
|
|
118
190
|
## Archive
|
|
119
191
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
192
|
+
The `archive/` folder contains **inactive** skills, agents, hooks, and other assets from previous versions. These are kept for historical reference only — they are **not part of the mad-skills release**, not published to npm, not installed by `npx skills`, and not supported.
|
|
193
|
+
|
|
194
|
+
| Name | Description |
|
|
195
|
+
|------|-------------|
|
|
196
|
+
| play-tight | Browser Automation (v1.x) |
|
|
197
|
+
| pixel-pusher | UI/UX Design (v1.x) |
|
|
198
|
+
| cyberarian | Document Lifecycle Management (v1.x) |
|
|
199
|
+
| start-right | Repository Scaffolding (v1.x) |
|
|
200
|
+
| graphite-skill | Git/Graphite Workflows (v1.x) |
|
|
201
|
+
| example-skill | Scaffold template for new skills |
|
|
126
202
|
|
|
127
203
|
## License
|
|
128
204
|
|
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "./hooks/session-guard.sh",
|
|
9
|
+
"timeout": 30000
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"UserPromptSubmit": [
|
|
15
|
+
{
|
|
16
|
+
"hooks": [
|
|
17
|
+
{
|
|
18
|
+
"type": "command",
|
|
19
|
+
"command": "./hooks/session-guard-prompt.sh",
|
|
20
|
+
"timeout": 10000
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# session-guard-prompt.sh — UserPromptSubmit companion hook for session-guard
|
|
3
|
+
#
|
|
4
|
+
# Checks if session-guard.sh left a pending context file from SessionStart.
|
|
5
|
+
# If found, re-emits the context as additionalContext on the first user prompt,
|
|
6
|
+
# then deletes the flag file so it only fires once.
|
|
7
|
+
#
|
|
8
|
+
# This works around the known limitation where SessionStart hook output is
|
|
9
|
+
# silently injected and may not surface until after the first prompt is
|
|
10
|
+
# already processed (see anthropics/claude-code#10808).
|
|
11
|
+
#
|
|
12
|
+
# Install globally in ~/.claude/settings.json:
|
|
13
|
+
# "command": "\"$HOME\"/.claude/hooks/session-guard-prompt.sh"
|
|
14
|
+
#
|
|
15
|
+
# Or per-project in .claude/settings.json:
|
|
16
|
+
# "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/session-guard-prompt.sh"
|
|
17
|
+
|
|
18
|
+
set -uo pipefail
|
|
19
|
+
|
|
20
|
+
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
|
|
21
|
+
PENDING_DIR="${TMPDIR:-/tmp}/claude-session-guard"
|
|
22
|
+
GUARD_KEY=$(echo "$PROJECT_DIR" | md5sum 2>/dev/null | cut -d' ' -f1 || echo "default")
|
|
23
|
+
PENDING_FILE="$PENDING_DIR/$GUARD_KEY.pending"
|
|
24
|
+
|
|
25
|
+
# No pending file — fast exit
|
|
26
|
+
if [[ ! -f "$PENDING_FILE" ]]; then
|
|
27
|
+
jq -n '{}'
|
|
28
|
+
exit 0
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
CONTEXT=$(cat "$PENDING_FILE")
|
|
32
|
+
rm -f "$PENDING_FILE"
|
|
33
|
+
|
|
34
|
+
# Also clean up the dedup lock from session-guard.sh
|
|
35
|
+
rm -f "$PENDING_DIR/$GUARD_KEY.lock"
|
|
36
|
+
|
|
37
|
+
# Skip re-emit if session-guard found no issues (just the ✅ line, no warnings)
|
|
38
|
+
if [[ $(echo "$CONTEXT" | grep -c '⚠️\|ℹ️') -eq 0 ]]; then
|
|
39
|
+
jq -n '{}'
|
|
40
|
+
exit 0
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
WRAPPED=$(cat <<EOF
|
|
44
|
+
[SESSION GUARD — FIRST PROMPT REMINDER]
|
|
45
|
+
The following was detected at session start. Act on these items NOW using
|
|
46
|
+
AskUserQuestion BEFORE proceeding with the user's request.
|
|
47
|
+
|
|
48
|
+
$CONTEXT
|
|
49
|
+
EOF
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
jq -n --arg ctx "$WRAPPED" '{
|
|
53
|
+
hookSpecificOutput: {
|
|
54
|
+
hookEventName: "UserPromptSubmit",
|
|
55
|
+
additionalContext: $ctx
|
|
56
|
+
}
|
|
57
|
+
}'
|
|
58
|
+
|
|
59
|
+
exit 0
|