From mad-skills
Deep-dive interview skill for creating comprehensive specifications. Reviews existing code and docs, then interviews the user through multiple rounds of targeted questions covering technical implementation, UI/UX, concerns, and tradeoffs. Produces a structured spec in specs/. Use when starting a new feature, system, or major change that needs a spec.
npx claudepluginhub slamb2k/mad-skills --plugin mad-skillsThis skill is limited to using the following tools:
When this skill is invoked, IMMEDIATELY output the banner below before doing anything else.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
When this skill is invoked, IMMEDIATELY output the banner below before doing anything else. Pick ONE tagline at random — vary your choice each time. CRITICAL: Reproduce the banner EXACTLY character-for-character. The first line of the art has 4 leading spaces — you MUST preserve them.
{tagline}
⠀ ██╗███████╗██████╗ ███████╗ ██████╗ ██████╗██╗ ██╗
██╔╝██╔════╝██╔══██╗██╔════╝██╔════╝██╔════╝╚██╗ ██╔╝
██╔╝ ███████╗██████╔╝█████╗ ██║ ██║ ╚████╔╝
██╔╝ ╚════██║██╔═══╝ ██╔══╝ ██║ ██║ ╚██╔╝
██╔╝ ███████║██║ ███████╗╚██████╗╚██████╗ ██║
╚═╝ ╚══════╝╚═╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝
Taglines:
After the banner, display parsed input:
┌─ Input ────────────────────────────────────────
│ {Field}: {value}
│ Flags: {parsed flags or "none"}
└────────────────────────────────────────────────
Pre-flight results:
── Pre-flight ───────────────────────────────────
✅ {dep} {version or "found"}
⚠️ {dep} not found → {fallback detail}
❌ {dep} missing → stopping
──────────────────────────────────────────────────
Stage/phase headers: ━━ {N} · {Name} ━━━━━━━━━━━━━━━━━━━━━━━━━
Status icons: ✅ done · ❌ failed · ⚠️ degraded · ⏳ working · ⏭️ skipped
Interview the user through multiple rounds of targeted questions to build
a comprehensive specification, then write it directly using the spec template
in references/spec-template.md.
Interview prompts and question guidelines: references/interview-guide.md
Spec template and writing guidelines: references/spec-template.md
Before starting, check all dependencies in this table:
| Dependency | Type | Check | Required | Resolution | Detail |
|---|---|---|---|---|---|
| prime | skill | ls .claude/skills/prime/SKILL.md ~/.claude/skills/prime/SKILL.md ~/.claude/plugins/marketplaces/slamb2k/skills/prime/SKILL.md 2>/dev/null | no | fallback | Context loading; falls back to manual project scan |
For each row, in order:
Before gathering context, check if the user is on a stale branch:
CURRENT=$(git branch --show-current)
if [ "$CURRENT" != "main" ] && [ "$CURRENT" != "master" ]; then
git fetch origin main --quiet 2>/dev/null
BEHIND=$(git rev-list --count HEAD..origin/main 2>/dev/null || echo 0)
if [ "$BEHIND" -gt 5 ]; then
echo "⚠️ Branch '$CURRENT' is $BEHIND commits behind main."
echo " Consider running /sync before building from this spec."
fi
fi
This is advisory only (specs don't modify code) — do not block, continue regardless of the result.
Before asking any questions, build a thorough understanding of the project:
/prime to load domain-specific context
(CLAUDE.md, specs, memory). If /prime is unavailable, fall back to
the manual scan below.CLAUDE.md if present (project conventions, structure, domain)specs/ directory for existing specificationsGroup gaps into interview categories:
Conduct multiple rounds of questions using AskUserQuestion. Continue until
all knowledge gaps are resolved.
(Recommended) to its label.
At least one question per round should have a recommendation where possible.Each round follows this pattern:
Stop interviewing when ALL of the following are true:
When complete, briefly present a Decision Summary — a numbered list of all decisions made across all rounds — and confirm with the user before proceeding to spec generation.
Once the interview is complete and decisions are confirmed:
Create specs/ directory if it doesn't exist:
mkdir -p specs
Read the spec template from references/spec-template.md
Generate the spec by filling the template with:
Write the spec file to specs/{name}.md where {name} is a
kebab-case slug derived from the GOAL (e.g., specs/user-auth.md,
specs/payment-integration.md). Use the Write tool directly.
The specs/ directory is the standard location — /build and /prime
both scan it automatically.
After the spec is created, report to the user:
┌─ Speccy · Report ──────────────────────────────
│
│ ✅ Spec complete
│
│ 📄 File: {spec file path}
│ 📋 Sections: {count}
│ 💬 Rounds: {interview rounds conducted}
│ ❓ Questions: {total questions asked}
│
│ 📝 Key decisions
│ • {decision 1}
│ • {decision 2}
│ • {decision 3}
│
│ 🔗 Links
│ Spec: {spec file path}
│
│ ⚡ Next steps
│ 1. Review the spec: {path}
│ 2. Run `/build {spec path}` to implement (reads the file automatically)
│
└─────────────────────────────────────────────────
Then write a pending-build marker so the next session knows about this spec:
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/slamb2k}"
node -e "require('$PLUGIN_ROOT/hooks/lib/state.cjs').savePendingBuild(process.cwd(), '{spec file path}')"
This marker is picked up by the session-guard hook on the next session start
(including after /clear), which surfaces the build command automatically.
Then display the build command:
⚡ To implement, run: /build {spec file path}
(You can /clear first — the spec is saved and the next session will remind you)
The spec file persists on disk, so the user can /clear the conversation
to free context before running /build. This is the recommended flow for
large specs — clearing context gives /build maximum working room.
IMPORTANT: After generating the spec, STOP. Do NOT enter plan mode,
do NOT start implementing directly, do NOT invoke /build yourself, and
do NOT offer to execute the plan. The spec file is the handoff artifact —
the user controls when and how to invoke /build.