/spectacular:validating-setup-commandsfrom spectacular
Validates that CLAUDE.md defines required install & optional postinstall setup commands before creating worktrees or executing tasks. Provides clear error messages with fix examples when missing.
Ships in spectacular. 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.
None: SKILL.md is the whole skill.
Worktrees require dependency installation before tasks can execute. Projects MUST define setup commands in CLAUDE.md.
This skill validates setup commands exist BEFORE creating worktrees, preventing cryptic failures later.
Use this skill when:
Use early: Validate during setup phase, not during task execution.
Without validation:
With validation:
Announce: "Validating CLAUDE.md setup commands before creating worktrees."
# Get repo root
REPO_ROOT=$(git rev-parse --show-toplevel)
# Check if CLAUDE.md exists
if [ ! -f "$REPO_ROOT/CLAUDE.md" ]; then
echo "❌ Error: CLAUDE.md not found in repository root"
echo ""
echo "Spectacular requires CLAUDE.md to define setup commands."
echo "See: https://docs.claude.com/claude-code"
exit 1
fi
Why fail fast: No CLAUDE.md = no command configuration. Stop before creating any worktrees.
# Parse CLAUDE.md for setup section
INSTALL_CMD=$(grep -A 10 "^### Setup" "$REPO_ROOT/CLAUDE.md" | grep "^- \*\*install\*\*:" | sed 's/.*: `\(.*\)`.*/\1/')
if [ -z "$INSTALL_CMD" ]; then
echo "❌ Error: Setup commands not defined in CLAUDE.md"
echo ""
echo "Worktrees require dependency installation before tasks can execute."
echo ""
echo "Add this section to CLAUDE.md:"
echo ""
echo "## Development Commands"
echo ""
echo "### Setup"
echo "- **install**: \`npm install\` (or your package manager)"
echo "- **postinstall**: \`npx prisma generate\` (optional - any codegen)"
echo ""
echo "Example for different package managers:"
echo "- Node.js: npm install, pnpm install, yarn, or bun install"
echo "- Python: pip install -r requirements.txt"
echo "- Rust: cargo build"
echo "- Go: go mod download"
echo ""
echo "See: https://docs.claude.com/claude-code"
echo ""
echo "Execution stopped. Add setup commands to CLAUDE.md and retry."
exit 1
fi
# Extract postinstall command (optional)
POSTINSTALL_CMD=$(grep -A 10 "^### Setup" "$REPO_ROOT/CLAUDE.md" | grep "^- \*\*postinstall\*\*:" | sed 's/.*: `\(.*\)`.*/\1/')
Parsing logic:
### Setup header**install**: command (required)**postinstall**: command (optional)# Report detected commands
echo "✅ Setup commands found in CLAUDE.md"
echo " install: $INSTALL_CMD"
if [ -n "$POSTINSTALL_CMD" ]; then
echo " postinstall: $POSTINSTALL_CMD"
fi
Store for later use:
INSTALL_CMD to callerPOSTINSTALL_CMD (may be empty)The skill expects this exact format:
## Development Commands
### Setup
- **install**: `npm install`
- **postinstall**: `npx prisma generate` (optional)
Format requirements:
### Setup (exactly)- **install**: command`` (required)- **postinstall**: command`` (optional)Multi-language examples:
### Setup
- **install**: `npm install` # Node.js
- **install**: `pip install -r requirements.txt` # Python
- **install**: `cargo build` # Rust
- **install**: `go mod download` # Go
- **install**: `bundle install` # Ruby
❌ Error: CLAUDE.md not found in repository root
Spectacular requires CLAUDE.md to define setup commands.
See: https://docs.claude.com/claude-code
User action: Create CLAUDE.md in repository root.
❌ Error: Setup commands not defined in CLAUDE.md
Worktrees require dependency installation before tasks can execute.
Add this section to CLAUDE.md:
## Development Commands
### Setup
- **install**: `npm install` (or your package manager)
- **postinstall**: `npx prisma generate` (optional - any codegen)
Example for different package managers:
- Node.js: npm install, pnpm install, yarn, or bun install
- Python: pip install -r requirements.txt
- Rust: cargo build
- Go: go mod download
See: https://docs.claude.com/claude-code
Execution stopped. Add setup commands to CLAUDE.md and retry.
User action: Add Setup section with at least install command.
How commands use this skill:
# In execute.md or spec.md:
# Step 1.5: Validate Setup Commands
# Use validating-setup-commands skill to extract and verify
INSTALL_CMD=$(validate_setup_commands_install)
POSTINSTALL_CMD=$(validate_setup_commands_postinstall)
# Step 3: Create worktrees
git worktree add .worktrees/{runid}-task-1
# Step 4: Install dependencies using validated commands
cd .worktrees/{runid}-task-1
$INSTALL_CMD
if [ -n "$POSTINSTALL_CMD" ]; then
$POSTINSTALL_CMD
fi
Reusable across:
/spectacular:spec - Validates before creating main worktree/spectacular:execute - Validates before creating task worktreesWrong: Create worktrees, then validate Right: Validate BEFORE creating ANY worktrees
Why: Failed validation after worktrees exist leaves orphaned directories.
Wrong: "Error: Add setup commands" Right: "Error: Add setup commands. Here's the exact format: [example]"
Why: Users need to know WHAT to add and WHERE.
Wrong: Fail if postinstall missing Right: Postinstall is optional (codegen only needed in some projects)
Why: Not all projects have codegen (Prisma, GraphQL, etc.).
Validation sequence:
### Setup sectioninstall command (exit if missing)postinstall command (optional)Exit points:
Format validated:
### Setup header- **install**: command``- **postinstall**: command`` (optional)Validate setup commands BEFORE creating worktrees.
Early validation with clear error messages prevents confusing failures during task execution.
The skill provides users with exact examples of what to add, making fixes easy.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
14 skills in this plugin
/decomposing-tasksUse when you need to create an execution plan from a feature spec - handles worktree context, dispatches subagent for task decomposition, validates quality, analyzes dependencies, groups into phases, and commits the plan/executing-parallel-phaseUse when orchestrating parallel phases in plan execution - creates isolated worktrees for concurrent task execution, installs dependencies, spawns parallel subagents, verifies completion, stacks branches linearly, and cleans up (mandatory for ALL parallel phases including N=1)/executing-planUse to execute an implementation plan with automatic sequential/parallel orchestration - handles worktree verification, resume detection, phase dispatch, and quality verification/executing-sequential-phaseUse when orchestrating sequential phases in plan execution - executes tasks one-by-one in main worktree using git-spice natural stacking (NO manual upstack commands, NO worktree creation, tasks build on each other)/phase-task-verificationShared branch creation and verification logic for sequential and parallel task execution - handles git operations, HEAD verification, and MODE-specific behavior/testing-workflows-with-subagentsUse when creating or editing commands, orchestrator prompts, or workflow documentation before deployment - applies RED-GREEN-REFACTOR to test instruction clarity by finding real execution failures, creating test scenarios, and verifying fixes with subagentsnpx claudepluginhub arittr/spectacular --plugin spectacularOther plugins' skills for the same job