init-project

A command for investigating a project and writing its standing instructions into CLAUDE.md and related rule files. These files tell coding agents how to work in a project.

In plain words
What is it for?
Use it to inspect a project, create or update CLAUDE.md, optionally create personal instructions, and split path-specific guidance into separate rule files.
Why use it?
It gathers project facts first so the instructions reflect the repository’s tools, languages, conventions, and existing agent setup.

Command

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/anilcancakir/claude-code/init-project
Clone the repo
git clone --depth 1 https://github.com/anilcancakir/claude-code
Per session 275 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,346 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.00275 $0.06346
Opus 5 $0.00138 $0.03173
Sonnet 5 $0.00055 $0.01269
Haiku 4.5 $0.00028 $0.00635

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

Security

Grade A, and why

init-project 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.

plugins/ac/commands/init-project.md · 237 lines

How it starts

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

/ac:init-project

Deep project investigation followed by an optimized CLAUDE.md, optional CLAUDE.local.md, and up to five path-scoped .claude/rules/*.md files. Fuses the init-deep 4-phase shape with the gap-fill interview from CC native /init, and drives the ac:claude-md-rules-creator skill as the writing playbook.

Request: $ARGUMENTS

Do NOT call EnterPlanMode or ExitPlanMode; both are deny-ruled by the overlay. This command runs on the main thread and uses no plan mode.

Phase 0: Identity, Arguments, and Gap-Fill Interview

You are the /ac:init-project orchestrator. You investigate a target project, decide what standing instructions belong in which file shape, and write CLAUDE.md plus optional companions for that project. You run on the main thread; the four discovery agents in Phase 1 are subagents you spawn.

CAN: Use Read, Write, Edit, Grep, Glob, Bash, LSP, AskUserQuestion. Spawn Agent with subagent_type: "ac:explore" for codebase fan-out. Invoke the ac:claude-md-rules-creator skill at Phase 3 entry (see the exact call in section 3a). Write <target>.proposed sidecar files when an existing target would be overwritten.

CANNOT: Spawn ac:librarian or ac:oracle from this command; the surface is limited to ac:explore for codebase discovery. ac:explore cannot spawn anything, because its tools: allowlist omits Agent; every discovery agent returns to this orchestrator before the next step. Author CLAUDE.md prose without first invoking ac:claude-md-rules-creator. Edit files outside the target project directory. Interview the user about skills, hooks, MCP servers, or settings.json; this command's interview surface is CLAUDE.md only.

MUST: Apply argument precedence: when both --dry-run and --force-overwrite are set, --dry-run wins and no Write or Edit fires. Spawn the four Phase 1 discovery agents in a single parallel block. Invoke the writing skill exactly once at the very start of Phase 3. Run the pre-flight checklist at SKILL.md:336-361 before every Write (new file) or Edit (existing file). Cap the root CLAUDE.md and rule files within the line budgets stated in Phase 3.

Read the full file on GitHub · 237 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 · 237 lines · 275 tokens per session scan A fe943a468dca

Subscribe to this mod's changes

init-project is a command published in the GitHub repository anilcancakir/claude-code (3 stars, last pushed 13d ago), licensed MIT. It adds 275 tokens to every session and 6,346 once invoked, about $0.0014 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.