Claude
Skills
Sign in
Back

build

Included with Lifetime
$97 forever

Context-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.

Design

What this skill does


# Build - Context-Isolated Feature Development

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:
- ⚙️ Compiling hopes and dreams...
- 🏗️ Bob the Builder has entered the chat!
- 🤖 Assembling the Voltron of code!
- 🏭 Feature factory: ONLINE
- ☕ Hold my coffee, I'm building!
- 📦 Some assembly required...
- 🧱 Bricks, mortar, and semicolons!
- 🏎️ Let's see what this baby can do!

---

## Output Formatting

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

---

Execute a detailed design/plan through the full feature-dev lifecycle with
maximum context isolation. Every heavy stage runs in a subagent so the primary
conversation only accumulates structured reports.

Stage prompts: `references/stage-prompts.md`
Report budgets: `references/report-contracts.md`
Agent selection: `references/architecture-notes.md`
Project detection: `references/project-detection.md`

## Flags

Parse optional flags from the request:
- `--skip-questions`: Skip Stage 2 (clarifying questions)
- `--skip-review`: Skip Stage 5 (code review)
- `--no-ship`: Stop after Stage 8 docs update
- `--parallel-impl`: Split implementation into parallel agents when independent

---

## Pre-flight

Before starting, check all dependencies in this table:

| Dependency | Type | Check | Required | Resolution | Detail |
|-----------|------|-------|----------|------------|--------|
| ship | skill | `ls .claude/skills/ship/SKILL.md ~/.claude/skills/ship/SKILL.md ~/.claude/plugins/marketplaces/slamb2k/skills/ship/SKILL.md 2>/dev/null` | yes | stop | Install with: npx skills add slamb2k/mad-skills --skill ship |
| 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 CLAUDE.md/goals scan |
| feature-dev:code-explorer | agent | — | no | fallback | Uses general-purpose agent |
| feature-dev:code-architect | agent | — | no | fallback | Uses general-purpose agent |
| feature-dev:code-reviewer | agent | — | no | fallback | Uses general-purpose agent |

For each row, in order:
1. Run the Check command (for cli/npm) or test file existence (for agent/skill)
2. If found: continue silently
3. If missing: apply Resolution strategy
   - **stop**: notify user with Detail, halt execution
   - **url**: notify user with Detail (install link), halt execution
   - **install**: notify user, run the command in Detail, continue if successful
   - **ask**: notify user, offer to run command in Detail, continue either way (or halt if required)
   - **fallback**: notify user with Detail, continue with degraded behavior
4. After all checks: summarize what's available and what's degraded

1. Capture **PLAN** (the user's argument) and **FLAGS**
2. **Clear pending-build marker** — if a marker was left by `/speccy`, clear it:
   ```bash
   PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/slamb2k}"
   node -e "require('$PLUGIN_ROOT/hooks/lib/state.cjs').clearPendingBuild(process.cwd())"
   ```
3. **Load project context** — invoke `/prime` to load domain-specific context
   (CLAUDE.md, specs, memory). If /prime is unavailable, fall back to
   manually scanning CLAUDE.md and specs/ directory.
4. Detect project type using `references/project-detection.md` to populate
   **PROJECT_CONFIG** (language, test_runner, test_setup)
5. **Create task list** — ALWAYS create tasks upfront for all stages using
   `TaskCreate`. This provides visible progress tracking throughout the build:
   - Task: "Stage 1: Explore codebase"
   - Task: "Stage 2: Clarifying questions" (if not `--skip-questions`)
   - Task: "Stage 3: Architecture design"
   - Task: "Stage 4: Implementation"
   - Task: "Stage 5: Code review" (if not `--skip-review`)
   - Task: "Stage 7: Verify"
   - Task: "Stage 9: Ship" (if not `--no-ship`)
   Mark each task `in_progress` when starting and `completed` when done.
6. Check for outstanding items from previous work:
   - Query persistent tasks via `TaskList` for incomplete items
   - Search CLAUDE.md for a "Known Issues" or "Open Questions" section
   - Search memory (if available) for recent unresolved items
7. If outstanding items found, present via AskUserQuestion:
   ```
   "Found {count} outstanding items from previous work:"
   {numbered list with summary of each}
   "Address any of these before starting the build?"
   ```
   Options:
   - **"Yes, let me choose which ones"** → present each; options:
     "Incorporate into this build" / "Skip for now" / "Explain more"
     Items marked "incorporate" get appended to the PLAN as additional
     requirements for Stage 1 to explore.
   - **"No, proceed with the build"** → continue normally
---

## Plan Resolution

Before Stage 1, resolve the PLAN argument into content:

1. **File detection** — If the argument contains `/` or ends with
   `.md`, `.yaml`, `.json`, or `.txt`, treat it as a file path:
   - Try reading the path as-is
   - If not found, try `specs/{arg}`
   - If found, use file content as PLAN
   - If not found at any location, treat the original argument as free-form text
2. **Free-form text** — If not a file path (or file not found), use the argument
   verbatim as PLAN
3. **Display** — In the Input box, show the resolved source:
   - File: `Plan: {file path} ({line count} lines)`
   - Text: `Plan: inline ({word count} words)`

## Pre-Build Branch Check

Before starting Stage 1, verify the working tree is suitable for building:

1. **Detect current branch and default branch:**
   ```bash
   CURRENT=$(git branch --show-current)
   DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
   DEFAULT_BRANCH="${DEFAULT_BRANCH:-main}"
   git fetch origin "$DEFAULT_BRANCH" --quiet 2>/dev/null
   ```

2. **If on a feature branch** (not `main`/`master`/default):
   ```bash
   BEHIND=$(git rev-list --count HEAD..origin/"$DEFAULT_BRANCH" 2>/dev/null || echo 0)
   ```
   If `BEHIND > 0`, warn the user via `AskUserQuestion`:
   ```
   "You're on branch '{CURRENT}' which is {BEHIND} commits behind {DEFAULT_BRANCH}.
   Starting a new feature here risks divergent branches and complex rebases."
   ```
   Options:
   - "Switch to main first (Recommended)" — run `/sync`, then create a new branch
   - "Continue on this branch" — proceed (user accepts the risk)
   - "Cancel" — stop

3. **If on the default branch** and not up to date:
   ```bash
   LOCAL=$(git rev-parse "$DEFAULT_BRANCH")
   REMOTE=$(git rev-parse "origin/$DEFAULT_BRANCH")
   ```
   If `LOCAL != REMOTE`, run `/sync` automatically before proceeding.

---

## Stage 1: Explore

Launch **feature-dev:code-explorer** (fallback: general-purpose):

```
Task(
  subagent_type: "feature-dev:code-explorer",
  description: "Explore codebase for build plan",
  prompt: <read from references/stage-prompts.md#stage-1>
)
```

Substitute `{PLAN}` into the p
Files: 6
Size: 32.3 KB
Complexity: 55/100
Category: Design

Related in Design