init

init is a command for Claude Code from juanmhidalgo/claude-plugins. It costs 50 tokens per session (1,075 once invoked), scanned A, original, MIT.

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 for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the agents-md-toolkit plugin — 1 skill, 3 commands shipped together

Good fit Use it to enhance a CLAUDE.md generated by Claude Code's /init command, or create one from scratch with standalone mode.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add juanmhidalgo/claude-plugins
Claude Code
/plugin install agents-md-toolkit

Made for: Claude Code.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/init/github.svg)](https://agentmods.dev/commands/juanmhidalgo/claude-plugins/init)
Your own site
<a href="https://agentmods.dev/commands/juanmhidalgo/claude-plugins/init"><img src="https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/init/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for init

Your own site · 80×15
<a href="https://agentmods.dev/commands/juanmhidalgo/claude-plugins/init"><img src="https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 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,075 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00050 $0.01075
Opus 5.5 $0.00020 $0.00430
Sonnet 5.5 $0.00010 $0.00215
Haiku 4.5 $0.00005 $0.00108

Measured 28d ago against content hash ebb51aa0c28d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 28d 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.

agents-md-toolkit/commands/init.md · 145 lines

How it starts

The opening of the file, as written. The whole thing — 145 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. /agents-md-toolkit:init        # Enhance with best practices

Alternatively, generate from scratch:
/agents-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.)
    • State each critical rule with its reason
    • 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

✓ CLAUDE.md enhanced successfully!

**Applied enhancements**:
- ✓ XML semantic structure added
- ✓ Critical rules marked with priority attributes
- ✓ Token-optimized structure

**Metrics**:
- Original: [X] tokens
- Enhanced: [Y] tokens
- Effectiveness: +[Z]% (structure score improved)

**Backup**: CLAUDE.md.backup-[timestamp]

**Next Steps**:
1. Review changes
2. Test with Claude Code
3. Commit: `git add CLAUDE.md && git commit -m "feat: enhance CLAUDE.md with best practices"`

Read the full file on GitHub · 145 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. 28d ago Changed · -1 tokens per session ebb51aa0c28d
  2. 2mo ago Changed · -1 lines ac3bbc3fdef1
  3. 3mo 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 16d ago), licensed MIT. It adds 50 tokens to every session and 1,075 once invoked, about $0.0002 per session on Opus 5.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.

Related

init compared with commands from other repositories

init next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
initjuanmhidalgo/claude-pluginsCommand816d agoMITA50Claude Code
checklistgithub/spec-kitCommand153k3d agoMITA13Claude Code
clarifygithub/spec-kitCommand153k3d agoMITA27Claude Code
analyzegithub/spec-kitCommand153k3d agoMITA26Claude Code
specifygithub/spec-kitCommand153k3d agoMITA13Claude Code
convergegithub/spec-kitCommand153k3d agoMITA35Claude Code
implementgithub/spec-kitCommand153k3d agoMITA14Claude Code