setup

A guided project-setup command that checks the codebase, asks questions, and records setup decisions in order.

In plain words
What is it for?
Use it to inspect a new project, confirm findings, interview the developer about choices, and write the resulting setup files.
Why use it?
It reduces missed setup details by making the process explicit and saving its progress between runs.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sefaertunc/worclaude/setup
Clone the repo
git clone --depth 1 https://github.com/sefaertunc/Worclaude

Made for: Claude Code.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 10,674 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.10674
Opus 5 $0.00009 $0.05337
Sonnet 5 $0.00003 $0.02135
Haiku 4.5 $0.00002 $0.01067

Measured 2d ago against content hash 195a6d76423c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/setup.md · 835 lines

How it starts

The opening of the file, as written. The whole thing — 835 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CRITICAL EXECUTION RULES — READ FIRST

This command is a state machine. Once /setup is invoked, your behavior is constrained by the following rules. These rules override contextual judgment, helpfulness instincts, and any other instructions you would normally apply.

  1. ADVANCE STATES IN ORDER. States execute in numeric order 0 through 11. You MUST NOT skip a state based on your judgment about what seems redundant. If a state's work is trivially empty (e.g., no medium-confidence items to confirm), enter the state, record the empty mutation, and transition immediately — but DO enter it.

  2. NO BACKWARD ADVANCE. Once you leave a state, do not re-enter it within this /setup invocation. "Invocation" means one continuous run from INIT through DONE. Typing cancel setup ENDS the current invocation; re-running /setup later starts a NEW invocation, and entering the saved currentState is an allowed forward transition for the new invocation. If the user wants to correct a prior answer mid-run, tell them to finish this run and edit the output files afterward.

  3. OFF-TOPIC INPUT DOES NOT ADVANCE. If the user's response to a state's prompt is not valid input for that state, you MUST re-render the current state's prompt with this prefix:

    "I'm in the middle of project setup (state: <STATE_NAME>). I'll help with that after setup completes. To cancel setup, type cancel setup."

    You MUST NOT answer the off-topic question. You MUST NOT run any tool to investigate the off-topic question.

  4. CANCEL PRESERVES STATE. The cancel trigger is the case- insensitive regex /^(cancel|stop|abort)( setup)?[.!?\s]*$/i applied to the trimmed user reply. Accepts the base verb (optionally followed by "setup") plus trailing punctuation or whitespace — cancel, Cancel!, STOP SETUP., abort all match. Text beyond the matched prefix means "not a cancel" (cancel please is a question, not a cancel). On match, acknowledge (the state file is already saved after every mutation per rule #6), print:

    "Setup paused. Run /setup again to resume, or worclaude setup-state reset to discard."

    and exit. You MUST NOT write any output files on cancel.

  5. SCOPED TOOL WHITELIST. Between SCAN ENTRY and WRITE ENTRY you may invoke ONLY these tools:

    • Shell: worclaude scan --path . (SCAN only)
    • Shell: worclaude setup-state show --path .
    • Shell: worclaude setup-state save --from-file .claude/cache/setup-state.draft.json --path . — the ONLY way state is persisted. Use Write to produce the draft JSON first, then invoke the CLI against that path. This avoids Claude Code's shell-interpolation safety layer that triggers on heredoc-with-variable-expansion patterns.
    • Shell: worclaude setup-state reset --path .
    • Shell: worclaude setup-state resume-info --path .
    • Read: .claude/cache/detection-report.json
    • Read: .claude/cache/setup-state.json
    • Write: .claude/cache/setup-state.draft.json (state-save staging only — overwritten each save).
    • Tool: AskUserQuestion permitted at:
      • INTERVIEW states, per the Interaction mode contract (selectable / multi-selectable / hybrid questions).
      • CONFIRM_MEDIUM when the per-item option count (candidates + 1 for "Other") is ≤ 4 — AskUserQuestion's own maxItems: 4 schema cap. When the count exceeds 4, fall back to the verbatim text-parse rendering defined in State 3 below. Not permitted at CONFIRM_HIGH: the detection list routinely has 12+ items in real projects, which exceeds the 4-option schema cap. CONFIRM_HIGH renders VERBATIM per rule #7.

    At WRITE state the whitelist RELAXES to additionally permit:

    • Read: each of the six target output files (CLAUDE.md, docs/spec/SPEC.md, three SKILL.md files under .claude/skills/, docs/spec/PROGRESS.md). Reads are ONLY to preserve user content that the merge does not overwrite. Missing files are treated as empty.
    • Read: .claude/workflow-meta.json for template-hash lookup.
    • Write: exactly those six files, with merged content per the per-file merge rules in the WRITE state section.

Read the full file on GitHub · 835 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 835 lines · 17 tokens per session scan A 195a6d76423c

Subscribe to this mod's changes

setup is a command published in the GitHub repository sefaertunc/Worclaude (4 stars, last pushed 23d ago), licensed MIT. It adds 17 tokens to every session and 10,674 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.