/mad-skills:brace [--force]from mad-skills
Scaffolds a project directory with specs/, context/, AGENTS.md, CLAUDE.md, .gitignore, and branch protection for AI-assisted development. Idempotent and safe to re-run.
Ships in mad-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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, including the diagonal / glyph before the name.
{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
Initialize any project directory with a standard scaffold for AI-assisted
development. Idempotent — safe to re-run on existing projects. Content
templates and subagent prompts are in references/.
Key principle: Scan first, present plan, get approval, then act.
Phase prompts: references/phase-prompts.md
Scaffold manifest: references/scaffold-manifest.md
Report format: references/report-template.md
Parse optional flags from the request:
--force — Overwrite existing files without promptingBefore starting, check all dependencies in this table:
| Dependency | Type | Check | Required | Resolution | Detail |
|---|---|---|---|---|---|
| superpowers | plugin | registered + enabled check via scripts/lib/superpowers.js | no | ask | claude plugin install superpowers |
For each row, in order:
Superpowers is a soft dependency detected via scripts/lib/superpowers.js,
which only counts it when Claude Code has it registered and enabled (anchor
file using-superpowers/SKILL.md) —
see references/superpowers-deferral.md.
Launch general-purpose subagent (bash) (haiku):
Task(
subagent_type: "general-purpose",
model: "haiku",
description: "Scan directory for existing scaffold structure",
prompt: <read from references/phase-prompts.md#phase-1>
)
Parse SCAN_REPORT. Extract:
directory_name (used as default project name)existing_dirs / missing_dirsexisting_files / missing_fileshas_claude_md / has_gitignorehas_atlas (legacy ATLAS naming detected)has_forge (legacy FORGE naming detected)has_legacy_gotcha (legacy GOTCHA/goals structure detected)has_legacy_memory (old tools/memory system detected)Skip if none of has_atlas, has_forge, has_legacy_gotcha, or has_legacy_memory is true.
Build a description of what was found:
has_atlas or has_forge: "Legacy ATLAS/FORGE naming detected"has_legacy_gotcha: "Legacy GOTCHA/BRACE framework detected (goals/ directory)"has_legacy_memory: "Legacy memory system (tools/memory/, memory/) detected"Ask the user via AskUserQuestion:
Question: "Legacy components detected: {description}. Upgrade and clean up?" Options:
Store result as upgrade_legacy: true|false in USER_CONFIG.
Runs on primary thread (user interaction required).
Derive default project name from SCAN_REPORT directory_name
Present via AskUserQuestion:
Question: "Set up project scaffold?" Options:
If not cancelled, ask for project description (one sentence) via AskUserQuestion with free text.
Ask installation level via AskUserQuestion:
Question: "Install universal guidance (preferences, principles) at user level?" Options:
~/.claude/CLAUDE.mdStore as USER_CONFIG:
If cancelled, stop here.
Build the ACTION_PLAN from SCAN_REPORT + USER_CONFIG + FLAGS.
For each item in references/scaffold-manifest.md:
--force → status: "skip"--force → status: "overwrite"references/instructions-file.md)@AGENTS.md to CLAUDE.md)If upgrade_legacy is true in USER_CONFIG, set status "upgrade" for:
If upgrade_legacy is true AND has_legacy_gotcha is true, additionally:
goals/ → status: "remove" (only if contains only manifest.md and build_app.md)If upgrade_legacy is true AND has_legacy_memory is true, additionally:
tools/memory/ → status: "remove"memory/ → status: "remove"tools/manifest.md → status: "cleanup" (remove memory tool rows).gitignore → status: "cleanup" (remove memory/*.npy entry)Present plan summary to user via AskUserQuestion:
Project Scaffold for: {project_name}
Will create: {list of items with status "create"}
Will merge: {list of items with status "merge"}
Will upgrade: {list of items with status "upgrade"}
Will remove: {list of items with status "remove" — legacy cleanup}
Will clean: {list of items with status "cleanup" — remove legacy references}
Will skip: {count} existing items
Universal guidance: {install_level description}
Proceed?
Options: "Yes, proceed" / "Cancel"
If cancelled, stop here.
Launch general-purpose subagent:
Task(
subagent_type: "general-purpose",
description: "Create project scaffold structure",
prompt: <read from references/phase-prompts.md#phase-4>
)
Before sending the prompt, substitute these variables:
{ACTION_PLAN} — the action plan from Phase 3{PROJECT_NAME} — from USER_CONFIG{PROJECT_DESCRIPTION} — from USER_CONFIG{INSTALL_LEVEL} — from USER_CONFIG ("global" or "project"){AGENTS_MD_TEMPLATE} — read from references/agents-md-template.md
(the section between BEGIN TEMPLATE and END TEMPLATE){GITIGNORE_CONTENT} — read from assets/gitignore-template{GLOBAL_PREFERENCES_CONTENT} — read from assets/global-preferences-template.md
(the section between BEGIN TEMPLATE and END TEMPLATE)Parse SCAFFOLD_REPORT. If status is "failed", report to user and stop.
All injections below write to $TARGET, resolved per
references/instructions-file.md (shared with /rig and the session guard):
_REF="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/slamb2k}/references/instructions-file.md"
if [ -f AGENTS.md ]; then TARGET=AGENTS.md
elif [ -f CLAUDE.md ]; then TARGET=CLAUDE.md
else TARGET=AGENTS.md
fi
AGENTS.md is canonical. CLAUDE.md should start with @AGENTS.md; any
Claude-only notes under that import are intentional and left alone.CLAUDE.md has content and does not import AGENTS.md — whether or not
AGENTS.md exists — offer the migration from
references/instructions-file.md via AskUserQuestion before injecting. Accepted → merge into AGENTS.md, replace CLAUDE.md with
@AGENTS.md, set TARGET=AGENTS.md. Declined → keep TARGET as resolved
and note it in the report.AGENTS.md exists but CLAUDE.md is missing, write the pointer without
asking.When updating an existing instructions file (not creating from template):
## Branch Discipline already exists:
grep -q "## Branch Discipline" "$TARGET"
## Guardrails:
## Guardrails## Guardrails section exists, append the section at the end of the fileWhen updating an existing instructions file (not creating from template):
## Worktree Discipline already exists:
grep -q "## Worktree Discipline" "$TARGET"
## Guardrails:
## Guardrails## Guardrails section exists, append the section at the end of the fileWhen updating an existing instructions file (not creating from template):
## Verification Discipline already exists:
grep -q "## Verification Discipline" "$TARGET"
## Guardrails:
## Guardrails## Guardrails section exists, append the section at the end of the fileWhen updating an existing instructions file (not creating from template):
## Known Gotchas already exists:
grep -q "## Known Gotchas" "$TARGET"
## Guardrails:
## Guardrails## Guardrails section exists, append the section at the end of the fileLaunch general-purpose subagent (bash) (haiku):
Task(
subagent_type: "general-purpose",
model: "haiku",
description: "Verify project scaffold",
prompt: <read from references/phase-prompts.md#phase-5>
)
Parse VERIFY_REPORT. Present the final summary using the format in
references/report-template.md.
Only if the project is a git repo (from SCAN_REPORT git_initialized).
Detect the default branch and hosting platform (GitHub, Azure DevOps, or
unknown). Platform detection and all CLI/REST commands are in
references/branch-protection-steps.md.
git remote get-url origingh api. If unprotected, ask via
AskUserQuestion:
/ship squash-merges without --adminaz repos CLI or REST fallback. If no minimum reviewer
policy, ask via AskUserQuestion:
creator-vote-counts=true so the author's own vote satisfies the gateApply the variant matching the user's choice using the procedures in
references/branch-protection-steps.md (see "Apply protection — team
project" vs "Apply protection — solo project" for each platform).
Include result in the final report under a "🔒 Branch protection" section, labelled with the chosen variant (team / solo / skipped).
After presenting the report, record lifecycle completion and surface the next step:
_R="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/slamb2k}"
node "$_R/hooks/session-guard.cjs" lifecycle-complete brace
If the command prints a LIFECYCLE_OFFER_BEGIN…END block, present that offer to
the user via AskUserQuestion as instructed inside the block. If it prints nothing
(or LIFECYCLE_OFFER_NONE), do not mention the lifecycle engine.
--force)@AGENTS.md--force or explicit user approvalStandard escalation pattern:
Common issues:
assets/gitignore-template (opens in a new tab)assets/global-preferences-template.md (opens in a new tab)references/agents-md-template.md (opens in a new tab)references/brace-workflow.md (opens in a new tab)references/branch-protection-steps.md (opens in a new tab)references/phase-prompts.md (opens in a new tab)references/report-template.md (opens in a new tab)references/scaffold-manifest.md (opens in a new tab)tests/evals.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub slamb2k/mad-skills --plugin mad-skills14 skills in this plugin
/buildContext-isolated feature development pipeline. Takes a detailed design/plan as argument and executes the full feature-dev lifecycle (explore, question, architect, implement, review, ship) inside subagents so the primary conversation stays compact. Use when you have a well-defined plan and want autonomous execution with minimal context window consumption./distilGenerate multiple unique web design variations for any website or web application. Accepts site specifications from a file (--spec path) or pasted text block. Creates a Vite + React + TypeScript + Tailwind project with Bun and produces N different creative designs accessible at /1, /2, /3, etc. Use when prototyping or exploring design directions for any web interface./dockGenerate container-based release pipelines that build once and promote immutable artifacts through environments (dev → staging → prod). Detects your stack, interviews for infrastructure choices, then outputs deterministic CI/CD files (Dockerfile, workflows, deployment manifests) that run without an LLM. Use when setting up deployment pipelines, containerizing an app, creating release workflows, or connecting CI to container-friendly infrastructure (Azure Container Apps, AWS Fargate, Google Cloud Run, Kubernetes, Dokku, Coolify, CapRover, etc.)./ferryFerry a session's live state across a context reset — persist a waybill document and arm a one-shot handoff so the next fresh session resumes from it. Use when the user types /ferry, says they want to hand off, checkpoint, wrap up, clear context, or start fresh while preserving state, or asks to carry work into a new session with clean optimised context. Captures task, status, next steps, key files, decisions, gotchas and repo state, writes a waybill (outside the repo by default), arms the handoff, and tells the user to /clear. "/ferry clean" lists and removes leftover waybills this skill created./hoistGenerate secure, low-infrastructure release pipelines that publish artifacts directly — language packages (npm, PyPI, crates, RubyGems, NuGet, Go), GitHub Releases with binaries, static sites/Pages, or serverless functions — without building a container image. OIDC/trusted publishing, provenance, idempotent publish guards, and three trigger models (auto-bump with optional approval, tag, manual). The non-container sibling of /dock. Use when releasing a package or app that doesn't ship as a container./keelGenerate Infrastructure as Code (IaC) pipelines that provision the cloud and container infrastructure your app deploys to. Interview-driven: detects your stack and cloud provider, then outputs deterministic IaC files (Terraform, Bicep, Pulumi, or CDK) plus CI/CD pipelines that plan on PR and apply on merge. Use when setting up cloud infrastructure, provisioning container registries, databases, networking, DNS, or any infrastructure that containers deploy onto. Designed to run before /dock — /keel lays the infrastructure, /dock deploys to it.