init

A command that creates or prepares a CLAUDE.md file, which gives Claude Code project-specific instructions.

In plain words
What is it for?
Use it to enhance a CLAUDE.md generated by Claude Code's /init command, or create one from scratch with standalone mode.
Why use it?
It provides a structured starting point for projects that need consistent coding rules and context for the assistant.

Command

Part of the claude-md-toolkit plugin — 1 skill, 3 commands 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/juanmhidalgo/claude-plugins/init
Clone the repo
git clone --depth 1 https://github.com/juanmhidalgo/claude-plugins

Or install claude-md-toolkit, the plugin that ships this one along with the rest of its 1 skill, 3 commands.

Per session 51 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,077 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.00051 $0.01077
Opus 5 $0.00026 $0.00539
Sonnet 5 $0.00010 $0.00215
Haiku 4.5 $0.00005 $0.00108

Measured 3d ago against content hash ff42dac03b13, 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.

claude-md-toolkit/commands/init.md · 146 lines

How it starts

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

Initialize CLAUDE.md

Create a best-practices CLAUDE.md file with optimal structure and token efficiency.

Modes

This command runs in one of two modes:

  1. Enhance mode (default): optimize the existing CLAUDE.md produced by Claude Code's built-in /init.
  2. Standalone mode (--standalone): generate an optimized CLAUDE.md from scratch (no /init required).

If $ARGUMENTS contains --standalone, use standalone mode. Otherwise, enhance mode.


Mode 1: Enhance (default)

Prerequisite: the user has run Claude Code's built-in /init so CLAUDE.md exists.

Step 1: check prerequisites

If CLAUDE.md does NOT exist, print this and STOP:

❌ CLAUDE.md not found.

Please run Claude Code's built-in /init command first to generate a base CLAUDE.md, then run this command to enhance it with Anthropic's best practices.

Workflow:
1. /init                          # Generate base CLAUDE.md
2. /claude-md-toolkit:init        # Enhance with best practices

Alternatively, generate from scratch:
/claude-md-toolkit:init --standalone

Step 2: analyze existing CLAUDE.md

Read the existing file and determine:

  • Current token count
  • Current structure (XML tags present?)
  • Project context defined?
  • Critical rules defined?

Step 3: enhance with best practices

Apply the same optimization logic as /optimize-claude-md at --level=moderate:

  1. Create backup CLAUDE.md.backup-[timestamp]
  2. Apply optimizations:
    • Add XML semantic structure (<project_context>, <critical_rules>, etc.)
    • Apply persuasion principles to critical rules (Authority, Commitment)
    • Add priority attributes (blocking, critical, recommended)
    • Consolidate repetitive content
    • Improve hierarchy/nesting
  3. Preview the changes (before/after) to the user
  4. Ask for confirmation
  5. Apply if confirmed

Step 4: success message

Read the full file on GitHub · 146 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 · 146 lines · 51 tokens per session scan A ff42dac03b13

Subscribe to this mod's changes

init is a command published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 8d ago), licensed MIT. It adds 51 tokens to every session and 1,077 once invoked, about $0.0003 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.