init-claude-md

init-claude-md is a command for coding agents from anilcancakir/claude-code-plugin. It costs 22 tokens per session (3,547 once invoked), scanned B, original, MIT.

A command that creates or improves a project-level CLAUDE.md file, which records instructions and useful context for an AI coding assistant. It discovers the codebase and can ask the developer questions.

In plain words
What is it for?
Use it to document project commands, structure, important files, testing, skills, custom coding conventions, and known problems in CLAUDE.md.
Why use it?
It gives the assistant project-specific guidance while preserving sections that the developer manages by hand.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the ac plugin — 6 skills, 9 commands, 2 hooks 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/anilcancakir/claude-code-plugin/init-claude-md
Clone the repo
git clone --depth 1 https://github.com/anilcancakir/claude-code-plugin

Or install ac, the plugin that ships this one along with the rest of its 6 skills, 9 commands, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for init-claude-md

README.md
[![agentmods](https://agentmods.dev/badge/commands/anilcancakir/claude-code-plugin/init-claude-md.svg)](https://agentmods.dev/commands/anilcancakir/claude-code-plugin/init-claude-md)
Your own site
<a href="https://agentmods.dev/commands/anilcancakir/claude-code-plugin/init-claude-md"><img src="https://agentmods.dev/badge/commands/anilcancakir/claude-code-plugin/init-claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,547 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00022 $0.03547
Opus 5 $0.00011 $0.01774
Sonnet 5 $0.00004 $0.00709
Haiku 4.5 $0.00002 $0.00355

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

Security

Grade B, and why

init-claude-md scanned grade B with 1 finding 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 4d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

find . -name "SKILL.md" -path "*/.claude/*" -maxdepth 4 2>/dev/null
plugins/ac/commands/init-claude-md.md · 263 lines

How it starts

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

Init Project CLAUDE.md

Generate a project-level ./CLAUDE.md for the active codebase. Produces ONLY ./CLAUDE.md and optionally .claude/settings.json hooks. Path-scoped conventions → suggest /ac:init-rules.

Authoring knowledge: Section patterns, quality scoring, dedup boundaries, and anti-slop rules live in the claude-md-writer skill. Read it before writing any section content. The template at ${CLAUDE_PLUGIN_ROOT}/references/project-claude-md-template.md provides structural guidance.

Section Ownership

Type Sections Update Behavior
Auto-detected Commands, Architecture, Key Files, Testing, Skills & Extensions Re-discovered and updated on every run
User-managed Mission/description, Code Style (custom conventions), Gotchas (manually added) Preserved across updates, merged with new findings

Modes: update → re-discover, preserve user-managed, skip interview. enhance or no arg → full discovery + interview, pre-fill from existing.


Phase 1: Discovery

Auto-discover project structure, commands, patterns, and existing context. Use Glob, Grep, and Read directly in the main context — no subagents. Source code findings always take priority over documentation claims.

  1. Commands + Build + Dev Tools — Glob for package.json, composer.json, Makefile, Cargo.toml, pyproject.toml, Dockerfile, .github/workflows/*.yml, .gitlab-ci.yml. Read each to extract build/test/lint/dev/format/deploy commands. Glob for linter/formatter configs (.eslintrc*, phpstan.neon, analysis_options.yaml, biome.json, .stylelintrc*, pylintrc, .golangci.yml, .prettierrc*, .editorconfig, rustfmt.toml) and test runners (phpunit.xml, jest.config.*, vitest.config.*, pytest.ini). Assemble: commands table + dev tools table. Priority: actual scripts in config files over README claims.

  2. Architecture + Entry Points — Run ls at depth 2, skipping vendor/, node_modules/, dist/, build/. Identify entry points (main.*, index.*, bootstrap files) via Glob. Note non-obvious config files. Detect monorepo patterns (workspace roots, packages/, apps/). Assemble: annotated structure tree + key files with purpose.

Read the full file on GitHub · 263 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. 4d ago First seen · 263 lines · 22 tokens per session scan B 783d39fcc177

Subscribe to this mod's changes

init-claude-md is a command published in the GitHub repository anilcancakir/claude-code-plugin (2 stars, last pushed 4mo ago), licensed MIT. It adds 22 tokens to every session and 3,547 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.