claude-md-best-practices

claude-md-best-practices is a skill for Claude Code from juanmhidalgo/claude-plugins. It costs 42 tokens per session (955 once invoked), scanned A, original, MIT.

A set of guidelines for creating, analyzing, or improving CLAUDE.md files used by Claude Code. These files give Claude project-specific instructions and context.

In plain words
What is it for?
Designing project instruction files, reviewing their structure and content, and organizing rules into reusable supporting files.
Why use it?
It helps keep instructions concise, organized, safe, and easy for Claude to follow as projects grow.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

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

Good fit Designing project instruction files, reviewing their structure and content, and organizing rules into reusable supporting files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/juanmhidalgo/claude-plugins/claude-md-best-practices
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.

Any agent
npx skills add juanmhidalgo/claude-plugins --skill claude-md-best-practices
Clone the repo
git clone --depth 1 https://github.com/juanmhidalgo/claude-plugins

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 claude-md-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/claude-md-best-practices/github.svg)](https://agentmods.dev/skills/juanmhidalgo/claude-plugins/claude-md-best-practices)
Your own site
<a href="https://agentmods.dev/skills/juanmhidalgo/claude-plugins/claude-md-best-practices"><img src="https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/claude-md-best-practices/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 claude-md-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/juanmhidalgo/claude-plugins/claude-md-best-practices"><img src="https://agentmods.dev/badge/skills/juanmhidalgo/claude-plugins/claude-md-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 955 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.00042 $0.00955
Opus 5.5 $0.00017 $0.00382
Sonnet 5.5 $0.00008 $0.00191
Haiku 4.5 $0.00004 $0.00096

Measured 2mo ago against content hash ce5745adf7c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

claude-md-best-practices 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 2mo 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/skills/claude-md-best-practices/SKILL.md · 120 lines

How it starts

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

CLAUDE.md Best Practices

Consolidated guide from Anthropic's official documentation.

Core Principles

<context_window_management> The context window is shared between:

  • System prompt, conversation history, all CLAUDE.md files
  • Commands, skills, hooks, and user's actual request

Golden rule: Only add what Claude doesn't already know. </context_window_management>

<conciseness_imperative> Target sizes:

  • Small projects (< 10K LOC): 100-150 lines
  • Medium projects (10-50K LOC): 150-250 lines
  • Large projects (> 50K LOC): 200-300 lines

Red flags: > 400 lines, multiple 50+ line examples, repeated explanations </conciseness_imperative>

XML Tags for Structure

XML tags help separate reference data (directories, commands) from instructions.

Essential tags: <project_context>, <key_directories>, <standards>, <critical_rules>, <reference_docs>

For detailed XML patterns and examples, see patterns.md.

Memory System

<memory_hierarchy> Precedence order (higher overrides lower):

  1. Enterprise: /etc/claude-code/CLAUDE.md
  2. Project: ./CLAUDE.md
  3. Project Rules: ./.claude/rules/*.md
  4. User: ~/.claude/CLAUDE.md
  5. Local: ./CLAUDE.local.md (gitignored) </memory_hierarchy>

File imports: Use @path/to/file syntax. Max depth 5 hops.

Modular rules: Use .claude/rules/*.md with optional paths: frontmatter for path-specific rules.

Essential Content

Stating Critical Rules

State each critical rule once, plainly, with its reason ("Run the test suite before committing — CI does not gate merges"). Put mechanically checkable rules in hooks instead of prose, and reserve emphasis for a single rule you have observed being skipped. See critical-rules.md.

Read the full file on GitHub · 120 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago Changed · -2 lines ce5745adf7c2
  2. 3mo ago First seen · 122 lines · 42 tokens per session scan A 3d0e76ec669a

Subscribe to this mod's changes

claude-md-best-practices is a skill published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed 16d ago), licensed MIT. It adds 42 tokens to every session and 955 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

claude-md-best-practices compared with skills from other repositories

claude-md-best-practices next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
claude-md-best-practicesjuanmhidalgo/claude-pluginsSkill816d agoMITA42Claude Code
memory-systemkangarooking/system-prompt-skillsSkill2317mo agoMITA166Claude Code, Codex
tool-specificationkangarooking/system-prompt-skillsSkill2317mo agoMITA151Claude Code, Codex
agent-delegationkangarooking/system-prompt-skillsSkill2317mo agoMITA141Claude Code, Codex
code-engineeringkangarooking/system-prompt-skillsSkill2317mo agoMITA86Claude Code, Codex
context-managementkangarooking/system-prompt-skillsSkill2317mo agoMITA136Claude Code, Codex
conversation-flowkangarooking/system-prompt-skillsSkill2317mo agoMITA133Claude Code, Codex