/toolsmith:edit-claudefrom toolsmith
Creates, updates, or optimizes CLAUDE.md files following Anthropic best practices. Use when user requests creating, updating, improving, or optimizing CLAUDE.md files for project context, coding standards, or persistent memory.
Ships in toolsmith. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
CREATE: New CLAUDE.md file requested UPDATE: Modify existing CLAUDE.md (keywords: "update", "add", "modify", "change") OPTIMIZE: Audit and clean an existing CLAUDE.md chain (keywords: "optimize", "audit", "clean up", "reduce tokens", "improve")
Make surgical edits in the relevant section (or a new heading), preserving the file's existing organization. After editing, check the file's line count against the size guidance below, because longer files consume more context and may reduce adherence.
The goal is that every line earns its place for the current model, not the shortest file. Rules lose value when cut from their reason, so compress wording, never reasons.
/claude-api prompt-audit scoped to the CLAUDE.md chain (and .claude/rules/), with the current session model as target. It returns a report and a diff covering pressure language, fossils and restated defaults. Call it by skill name only: its bundled file path is versioned per Claude Code release and breaks on upgrade, and a copy here would go stale, so do not copy it either..claude/rules/ with paths frontmatter, so it loads only when needed; @imports can organize long material but still load at launchwc -l) and what actually loads (/context) against the size guidance belowSee reference.md § Optimization Strategies for rewrite examples.
CLAUDE.md is loaded into every session, so it only holds content that is persistent, used in most sessions, and non-sensitive. Route what fails that to its better home and say so: secrets to env vars, one-off asks to the conversation, long docs to a README referenced by path, detailed guidelines to .claude/rules/. For mixed requests, write the part that fits and route the rest.
Gather context: Ask user for project details if missing:
Organize around WHAT/WHY/HOW:
Determine organization strategy (memory hierarchy):
Main CLAUDE.md (universal content; aim for the 200-line target below):
CLAUDE.md in project root (shared via git).claude/rules/ (modular, one topic per file):
python.md, javascript.mdfrontend/, backend/CLAUDE.local.md (personal; add to .gitignore):
~/.claude/CLAUDE.md (cross-project personal):
@imports (organization, not context reduction):
@README, @docs/architecture.md@~/.claude/my-prefs.md.claude/rules/ with paths frontmatter or a subdirectory CLAUDE.md.Load order and how files combine: see reference.md § Memory Hierarchy and Loading.
File Zones (if project uses ref/wip pattern):
ref/ or reference/ (read-only), wip/ or work-in-progress/ (workspace). Use whichever name the project already has.## File Zones
- 🔒 ref/ (or reference/) — READ-ONLY. Never edit unless user explicitly says "update ref". Show diff and ask first.
- ✏️ wip/ (or work-in-progress/) — Default workspace. All new files and edits go here.
- 🔒 .in/ — READ-ONLY archive. Never modify.
Organization decision tree:
@import it only if most sessions need it, because imports load at launchUniversal vs Path-Specific Decision:
Keep in main CLAUDE.md:
Extract to .claude/rules/:
*.py, React for *.tsx)frontend/, backend/, infra/)python.md with paths: "**/*.py", bash-scripting.md with paths: "**/*.sh"Key principle: Cohesion and semantic grouping matter more than a short file. A main CLAUDE.md whose universal sections (Git, Security, Planning, Style) sit together is better than the same content fragmented across files, provided it stays near the 200-line target.
H1 = Project Name (required):
# Project Name — used by /switch, /save-context, /load-context for project identification# Praxis, # NanoVC — Control Repo, # GTD-PCM Control PlaneStructure content:
Write file with appropriate sections based on user context
See reference.md § Templates for starter examples and § Modular Rules for .claude/rules/ patterns.
Each fact below carries its source, consulted 2026-09-21.
Measure: wc -l for each file's line count; /context to check which CLAUDE.md and rules files loaded into the current session; /memory to list memory file locations.
When creating/updating: If a file passes the 200-line target, tell the user and suggest path-scoped rules or trimming content that is not needed in every session. Imports do not help here, because imported files load at launch.
npm test" not "Test the code"paths: glob patternsOrdering and emphasis (sources: code.claude.com/docs/en/memory, code.claude.com/docs/en/best-practices, platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices; consulted 2026-09-21):
Keep main CLAUDE.md to universal content, near the 200-line target. Distribute the rest:
Modular rules (.claude/rules/; files with paths frontmatter load only for matching files):
.claude/rules/
|- code-style.md
|- security.md
|- frontend/react.md
|- backend/api.md
Imports (loaded at launch with the referencing CLAUDE.md; they organize content but do not reduce context):
@README
@docs/architecture.md
@~/.claude/my-project-prefs.md
Reference docs (external):
reference/
|- runbooks/building.md
|- standards/conventions.md
Use /memory command during session to view/edit loaded memories.
See reference.md § Content Guidelines for inclusion/exclusion rules and anti-patterns.
wc -l), and the expected files loaded (/context)See reference.md § Templates, § Modular Rules, and § Import Syntax for detailed examples.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub digital-stoic-org/agent-skills --plugin toolsmith5 skills in this plugin
/edit-pluginAutomates agent-skills plugin version bumps and release metadata. Use when: adding/removing/updating skills or commands, bumping plugin version, preparing a release. Triggers: bump version, edit plugin, update plugin, release, version bump, new skill added, new command added./edit-toolCreates, modifies, and orchestrates Claude Code tools (skills, agents, scripts). Use when user requests creating, updating, improving, or editing any Claude Code extension — skills, sub-agents, slash commands, script wrappers. Triggers include "create/make/new skill/command/agent/script", "tool for X", "slash command", "sub-agent", "prompt audit", "audit prompt", file paths with /skills/, /agents/. For plugin version bumps and release metadata, route directly to edit-plugin./install-dependencyInstall dependencies with monorepo awareness. Use when: user asks to install a package, add a dependency, or setup Python/JS packages. Triggers: "install X", "add package", "setup dependency", "I need lodash", "install docling".
/search-skillDiscover and evaluate Claude Code skills and plugins from curated sources. Use when searching for existing skills/plugins, finding inspiration, or before creating a new skill. Triggers include "search skill", "find skill", "find plugin", "skill for X", "what skills exist for", "discover skills".Other plugins' skills for the same job