From spec-first
Diagnoses and configures spec-first environment by checking CLI dependencies, plugin version, repo-local config. Guides installation of missing tools for troubleshooting setup or onboarding.
npx claudepluginhub sunrain520/spec-firstThis skill uses the workspace's default tool permissions.
Ask the user each question below using the platform's blocking question tool: `AskUserQuestion` in Claude Code (call `ToolSearch` with `select:AskUserQuestion` first if its schema isn't loaded) or `request_user_input` in Codex. Fall back to presenting each question as a numbered list in chat only when no blocking tool exists in the harness or the call errors (e.g., Codex edit modes) — not becau...
Runs `specify check` to verify Spec Kit tools (git, claude, gemini, VS Code, cursor-agent, etc.) are installed and in PATH; interprets results and suggests fixes like speckit-install or re-init. Useful for slash command issues or post-install checks.
Initializes spec-kit projects via `specify` CLI: automatic setup, installation validation, project structure enforcement for spex workflow skills.
Use to validate spectacular environment - checks superpowers plugin, git-spice, git repo, and project structure before running spectacular workflows
Share bugs, ideas, or general feedback.
Ask the user each question below using the platform's blocking question tool: AskUserQuestion in Claude Code (call ToolSearch with select:AskUserQuestion first if its schema isn't loaded) or request_user_input in Codex. Fall back to presenting each question as a numbered list in chat only when no blocking tool exists in the harness or the call errors (e.g., Codex edit modes) — not because a schema load is required. Never silently skip or auto-configure. For multiSelect questions, accept comma-separated numbers (e.g. 1, 3).
Interactive setup for spec-first — diagnoses environment health, cleans obsolete repo-local CE config, and helps configure required tools. Review agent selection is handled automatically by spec-code-review; project-specific review guidance belongs in CLAUDE.md or AGENTS.md.
Browser automation setup is owned by spec-mcp-setup, not this legacy setup flow. If agent-browser is missing, direct Claude users to /spec:mcp-setup and Codex users to $spec-mcp-setup.
Detect the installed spec-first version by reading the plugin metadata or manifest. This is platform-specific -- use whatever mechanism is available (e.g., reading plugin.json from the plugin root or cache directory). If the version cannot be determined, skip this step.
If a version is found, pass it to the check script via --version. Otherwise omit the flag.
Before running the script, display: "Spec-First -- checking your environment..."
Run the bundled check script. Do not perform manual dependency checks -- the script handles this setup flow's CLI tools, agent skills, repo-local CE file checks, and .gitignore guidance in one pass. Do not add agent-browser install commands here; use spec-mcp-setup for that helper tool.
bash scripts/check-health --version VERSION
Or without version if Step 1 could not determine it:
bash scripts/check-health
Script reference: scripts/check-health
Display the script's output to the user.
Platform detection (pre-resolved): ![ -n "${CLAUDE_PLUGIN_ROOT}" ] && echo "CLAUDE_CODE" || echo "OTHER"
If the line above resolved to CLAUDE_CODE, this is a Claude Code session and /spec:update is available. Otherwise, omit any /spec:update references from output.
After the diagnostic report, check whether:
spec-first.local.md is present and needs cleanup.spec-first/config.local.yaml does not exist or is not safely gitignored.spec-first/config.local.example.yaml is missing or outdatedIf everything is installed, no repo-local cleanup is needed, and .spec-first/config.local.yaml already exists and is gitignored, display the tool and skill list and completion message. Parse the tool and skill names from the script output and list each with a green circle. Omit the Skills line if the Skills section is absent from the script output:
✅ Spec-First setup complete
Tools: 🟢 gh 🟢 jq 🟢 vhs 🟢 silicon 🟢 ffmpeg 🟢 ast-grep
Skills: 🟢 ast-grep
Config: ✅
Run /spec:setup anytime to re-check.
If this is a Claude Code session, append to the message: "Run /spec:update to grab the latest plugin version."
Stop here.
Otherwise proceed to Phase 2 to resolve any issues. Handle repo-local cleanup (Step 4) first, then config bootstrapping (Step 5), then missing dependencies (Step 6).
Resolve the repository root (git rev-parse --show-toplevel). If spec-first.local.md exists at the repo root, explain that it is obsolete because review-agent selection is automatic and CE now uses .spec-first/config.local.yaml for any surviving machine-local state. Ask whether to delete it now. Use the repo-root path when deleting.
Resolve the repository root (git rev-parse --show-toplevel). All paths below are relative to the repo root, not the current working directory.
Example file (always refresh): Copy references/config-template.yaml to <repo-root>/.spec-first/config.local.example.yaml, creating the directory if needed. This file is committed to the repo and always overwritten with the latest template so teammates can see available settings.
Local config (create once): If .spec-first/config.local.yaml does not exist, ask whether to create it:
Set up a local config file for this project?
This saves your Spec-First preferences (like which tools to use and how workflows behave).
Everything starts commented out -- you only enable what you need.
1. Yes, create it (Recommended)
2. No thanks
If the user approves, copy references/config-template.yaml to <repo-root>/.spec-first/config.local.yaml. If .spec-first/config.local.yaml is not already covered by .gitignore, offer to add the entry:
.spec-first/*.local.yaml
If the local config already exists, check whether it is safely gitignored. If not, offer to add the .gitignore entry as above.
Present the missing tools and skills using a multiSelect question with all items pre-selected. Use the install commands and URLs from the script's diagnostic output. Group items under Tools: and Skills: so the user can see which runtime each item targets; omit a group whose items are all installed.
The following items are missing. Select which to install:
(All items are pre-selected)
Tools:
[x] gh - GitHub CLI for issues and PRs
[x] jq - JSON processor
[x] vhs (charmbracelet/vhs) - Create GIFs from CLI output
[x] silicon (Aloxaf/silicon) - Generate code screenshots
[x] ffmpeg - Video processing for feature demos
[x] ast-grep - Structural code search using AST patterns
Skills:
[x] ast-grep - Agent skill for structural code search with ast-grep
Only show items that are actually missing. Omit installed ones.
For each selected dependency, in order:
Show the install command (from the diagnostic output) and ask for approval:
Install gh?
Command: NONINTERACTIVE=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install -q gh
1. Run this command
2. Skip - I'll install it manually
If approved: Run the install command using a shell execution tool. After the command completes, verify installation:
command -v gh).npx --yes skills list --global --json | jq -r '.[].name' | grep -qx <skill-name> when npx is available; otherwise fall back to checking that ~/.claude/skills/<skill-name> exists (file, directory, or symlink).If verification succeeds: Report success.
If verification fails or install errors: Display the project URL as fallback and continue to the next dependency.
Display a brief summary:
✅ Spec-First setup complete
Installed: gh, jq
Skipped: rtk
Run /spec:setup anytime to re-check.
If this is a Claude Code session (per platform detection in Step 3), append: "Run /spec:update to grab the latest plugin version."