/claude-md-management-reloaded:init-claude-md [subdirectory to scope, or a specific area to document]from claude-md-management-reloaded
Scaffold a project's persistent memory the way Claude Code's built-in /init would, but as a HYBRID layout instead of one monolithic file: a lean root CLAUDE.md holding only repo-wide essentials, PLUS path-scoped .claude/rules/*.md for area-specific conventions. The rules-aware analog of /init. Run manually with /claude-md-management-reloaded:init-claude-md on a repo that has little or no memory yet: it analyzes build/test/lint commands and big-picture architecture, decides what stays in CLAUDE.md versus what becomes a path-scoped rule, derives and verifies paths: globs against real files, and writes the files only after you approve. If memory already exists it proposes improvements instead of overwriting. For auditing memory that already exists, use the companion claude-md-improver skill.
Ships in claude-md-management-reloaded. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Bootstrap a repository's persistent memory the way Claude Code's built-in /init
does — analyze the codebase, then write the memory a future session needs — but
emit a hybrid layout instead of one monolithic file:
CLAUDE.md with only repo-wide essentials (the canonical
build/test/lint commands and the big-picture architecture), and.claude/rules/*.md for area-specific conventions, so each
area's rules load only when Claude touches that area.disable-model-invocation: true) and never scaffolds on its
own. Invoke it with /claude-md-management-reloaded:init-claude-md./init: same analysis, but the result is split
across the modern memory surface instead of dumped into one file.claude-md-improver references rather than re-deriving them.claude-md-improver for a full audit.CLAUDE.md # lean: repo-wide commands + big-picture architecture
.claude/rules/
├── frontend.md # paths: src/components/**/*.tsx
├── api.md # paths: src/api/**/*.ts
└── testing.md # paths: tests/**/*
/init analyzes the code, but some memory-worthy facts aren't in it: which
command is canonical when several exist, where the real architectural boundaries
lie, deploy/release steps, or a gotcha only the maintainer knows. When the repo
doesn't settle such a point and guessing would risk a wrong or invented
instruction, ask rather than assume — but keep it light:
AskUserQuestion,
each with concrete options and a sensible default first.Discover every memory and rules source before writing anything:
find . -path ./node_modules -prune -o \
\( -name CLAUDE.md -o -name CLAUDE.local.md \) -print 2>/dev/null | sort
ls -1 .claude/rules/*.md .claude/rules/**/*.md 2>/dev/null
ls -1 .cursorrules .cursor/rules/* .github/copilot-instructions.md README.md 2>/dev/null
Branch on what you find:
CLAUDE.md or .claude/rules/ already exist → do not overwrite. Read them,
then propose targeted improvements and/or a split of an oversized CLAUDE.md
into rules — or defer to the claude-md-improver skill for a full audit..cursor/rules/, .cursorrules) or Copilot rules
(.github/copilot-instructions.md) → fold the important parts into the new
memory; do not copy them wholesale.README.md → mine it for the important parts; never duplicate what is
trivially discoverable from the tree.This is the literal /init "what to add", carried over so behavior matches the
built-in:
1. Commands that will be commonly used, such as how to build, lint, and run
tests. Include the necessary commands to develop in this codebase, such as how
to run a single test.
2. High-level code architecture and structure so that future instances can be
productive more quickly. Focus on the "big picture" architecture that requires
reading multiple files to understand.
Gather these by reading build manifests (package.json, justfile, Cargo.toml,
pyproject.toml, Makefile), entry points, and the directory layout. Identify
the distinct areas (frontend / api / tests / infra / per-package) — these are
the split candidates for Step 3. If several plausible build/test commands exist
and the code doesn't reveal which is canonical, that's an Ask candidate.
Apply the "what goes where" guidance from splitting-guide.md:
CLAUDE.md..claude/rules/<topic>.md with a paths: glob.paths:.Aim to keep the root file under the ~200-line budget, pushing each area-specific block down into a rule. Confirm any non-obvious split boundary with the user when the code doesn't make it clear.
paths: globsFor each rule, map the area to the files it governs, then verify the glob matches real files before committing to it:
ls src/components/**/*.tsx 2>/dev/null | head # confirm the glob is non-empty
If a candidate glob matches nothing, drop the rule or widen the glob — never ship
a paths: that matches no files.
CLAUDE.mdThe file must begin with the exact /init prefix — this is the imitation
contract:
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Then a lean body — ## Commands (copy-paste-ready, including how to run a single
test) and ## Architecture (the big-picture map) — per the minimal shape in
templates.md. Rule files use the
path-scoped shape from the same templates.
Present the full proposed file tree, then each new file as a diff with a one-line
"why". Apply with Edit/Write only after the user approves. When a split moves
content out of CLAUDE.md, never leave it duplicated in both the file and a rule.
Carried over from /init so the output stays lean:
One hybrid-specific rule: do not force a split when there is nothing to split.
A tiny single-area repo may correctly produce only a lean CLAUDE.md with zero
rules.
A repo with a TypeScript frontend in src/components/ and an API in src/api/
scaffolds to a lean root file plus two path-scoped rules:
CLAUDE.md # prefix + ## Commands + ## Architecture (big picture)
.claude/rules/
├── frontend.md # paths: ["src/components/**/*.tsx"] — CSS modules, aria-labels
└── api.md # paths: ["src/api/**/*.ts"] — input validation, error envelope
The component conventions load only when Claude edits a .tsx, the API
conventions only under src/api/, and CLAUDE.md stays small.
CLAUDE.md (with the /init prefix) plus one or more
.claude/rules/*.md, each with a verified paths: glob — written only after
approval.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub 46ki75/yaarr --plugin claude-md-management-reloaded3 skills in this plugin
/claude-md-improverAudit and improve a project's persistent memory across BOTH CLAUDE.md files and the .claude/rules/ directory. Use when the user asks to check, audit, review, update, improve, fix, organize, or restructure their CLAUDE.md or rules; when CLAUDE.md has grown too long and should be split into path-scoped rules; when setting up .claude/rules/; or for "CLAUDE.md maintenance" and "project memory optimization". Covers every scope — project ./CLAUDE.md and ./.claude/CLAUDE.md, nested CLAUDE.md, ./CLAUDE.local.md, user ~/.claude/ CLAUDE.md, and rules in .claude/rules/ and ~/.claude/rules/. Trigger even without exact wording: "is my CLAUDE.md up to date", "my CLAUDE.md is too big", "split this into rules", "review my .claude/rules", "clean up project memory" all count.
/revise-claude-mdCapture learnings from the current session into project memory, routing each one to the right place: a project CLAUDE.md, a path-scoped .claude/rules/ file, a gitignored CLAUDE.local.md, or user-scope ~/.claude memory. Use at the end of a session, or whenever something is worth remembering for next time — a build command discovered, a gotcha hit, a convention confirmed, a correction the user made. Invoke directly with /revise-claude-md, or let it run when the user says "capture what we learned", "update CLAUDE.md with this", "remember this for the project", "add this gotcha", or "write this down for next time". For auditing or reorganizing memory that already exists (not capturing new learnings), use the companion claude-md-improver skill instead.