init

A one-time command that sets up the Craft project harness, a set of project files and conventions used by Craft tools. It offers full setup or a quicker structure-only setup.

In plain words
What is it for?
Use it at the start of a project to create the `.craft` structure, scan existing code and documents, configure project conventions, or perform a quick setup when strong documentation already exists.
Why use it?
It creates the project foundation needed by the other Craft commands and can capture the project's patterns, conventions, and design information.

Command

Part of the craft plugin — 29 commands, 27 agents, 1 MCP server shipped together

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/drobins25/craft/craft-init
Clone the repo
git clone --depth 1 https://github.com/drobins25/craft

Or install craft, the plugin that ships this one along with the rest of its 29 commands, 27 agents, 1 MCP server.

Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 16,824 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.00014 $0.16824
Opus 5 $0.00007 $0.08412
Sonnet 5 $0.00003 $0.03365
Haiku 4.5 $0.00001 $0.01682

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

Security

Grade A, and why

init 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 3d 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.

commands/craft-init.md · 1,458 lines

How it starts

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

Project Init

Set up the Craft harness for your project. Run once at the start.

Flow

Phase 0: Init

Before scanning or asking questions, check what the user needs.

Use AskUserQuestion:

question: "What kind of setup do you need?"
header: "Setup"
options:
  - label: "Full setup (Recommended)"
    description: "Scan project, extract patterns, configure tokens/conventions"
  - label: "Quick setup"
    description: "Just the .craft/ directory structure — for projects with strong existing docs (CLAUDE.md, etc.)"

Use these exact option labels and the (Recommended) marker as written. Do not reframe descriptions, swap the order, or move (Recommended) to a different option based on directory state. Quick setup is for users with a strong existing CLAUDE.md who explicitly want to skip scanning. Full setup is the default for everyone else, including empty directories — Phase 3 (the inspiration design session) is the project-DNA flow that runs regardless of whether code is present yet.

If "Quick setup":

Ask one follow-up for project type:

Use AskUserQuestion:

question: "What type of project is this?"
header: "Type"
options:
  - label: "UI / Web app"
    description: "Includes design tokens, inspiration, components templates"
  - label: "CLI / Backend / Plugin"
    description: "Includes naming conventions, schemas, code patterns"

Then:

  1. For UI projects: Run ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/setup-craft.sh ui
    • Quick setup skips the scanner, so there's no visual file count. Tokens are deferred - the setup script never creates tokens.yaml.
    • The user chose quick setup because they have strong existing docs. Tokens can be added later when you have visual code to reference.
  2. For CLI projects: Run ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/setup-craft.sh cli
    • Conventions are deferred too - quick setup never scans, so there's nothing real to write yet.
  3. Go to Phase 6 (First Cycle Kickoff) and present its AskUserQuestion. Do NOT improvise a kickoff prompt here - Phase 6 owns the kickoff on every path.

Read the full file on GitHub · 1,458 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. 3d ago First seen · 1,458 lines · 14 tokens per session scan A 310f8e628982

Subscribe to this mod's changes

init is a command published in the GitHub repository drobins25/craft (53 stars, last pushed 3d ago), licensed MIT. It adds 14 tokens to every session and 16,824 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-30.