From agents-initializer
Initializes optimized CLAUDE.md hierarchy and .claude/rules/ for projects. Uses subagent-driven codebase analysis to generate minimal, scoped files following progressive disclosure — based on the ETH Zurich 'Evaluating AGENTS.md' study and Anthropic's context engineering best practices.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agents-initializer:init-claudeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate an evidence-based CLAUDE.md file hierarchy for this project, leveraging Claude Code's full configuration system: CLAUDE.md files, `.claude/rules/` path-scoped rules, and progressive disclosure pointers.
assets/templates/claude-rule.mdassets/templates/domain-doc.mdassets/templates/root-claude-md.mdassets/templates/scoped-claude-md.mdreferences/claude-rules-system.mdreferences/context-optimization.mdreferences/progressive-disclosure-guide.mdreferences/validation-criteria.mdreferences/what-not-to-include.mdGenerate an evidence-based CLAUDE.md file hierarchy for this project, leveraging Claude Code's full configuration system: CLAUDE.md files, .claude/rules/ path-scoped rules, and progressive disclosure pointers.
Research shows that auto-generated comprehensive configuration files reduce agent task success by ~3% while increasing cost by 20%+ (Evaluating AGENTS.md, ETH Zurich, 2026). Developer-written minimal files improve success by ~4%. This skill generates files that mimic what an experienced developer would write: only non-obvious tooling and conventions.
Claude Code's configuration hierarchy enables powerful progressive disclosure:
.claude/rules/ — path-scoped rules triggered only when matching files are readCheck if CLAUDE.md exists in the current working directory.
If it already exists:
improve-claude skill and follow its complete process.If it does not exist: Proceed to Phase 1 below.
Delegate to the codebase-analyzer agent with this task:
Analyze the project at the current working directory. Return ONLY non-standard, non-obvious information that would cause Claude to make mistakes if it didn't know them. Be ruthlessly minimal.
The agent runs on Sonnet with read-only tools (Read, Grep, Glob, Bash) in an isolated context. Wait for it to complete and parse its structured output. Require the parsed output to surface non-default config overrides, repo-wide critical constraints, and any cross-scope prerequisites needed for the root file.
Delegate to the scope-detector agent with this task:
Detect scopes in the project at the current working directory. Only flag scopes with genuinely different tooling or conventions. A simple single-package project should have ZERO additional scopes. Also identify areas that would benefit from path-scoped .claude/rules/ files. Check shared/library packages in monorepos — even utility packages may need their own scope if they have unique constraints (e.g., zero-dependency rules, dual exports, conditional imports).
Wait for it to complete and parse its structured output. Require the parsed output to state explicitly when a simple single-package project needs zero additional scopes.
Drop Phases 1–2 references. Read:
${CLAUDE_SKILL_DIR}/references/progressive-disclosure-guide.md — hierarchy decisions and loading tiers${CLAUDE_SKILL_DIR}/references/what-not-to-include.md — content exclusion criteriaDecide which file types to generate and what content belongs in each tier.
Drop Phase 3a references. Read:
${CLAUDE_SKILL_DIR}/references/context-optimization.md — token budget guidelines${CLAUDE_SKILL_DIR}/references/claude-rules-system.md — .claude/rules/ conventions and path-scopingGenerate the file hierarchy:
Root CLAUDE.md — Read ${CLAUDE_SKILL_DIR}/assets/templates/root-claude-md.md. Fill placeholders. Remove empty sections. Target: 15-40 lines.
Subdirectory CLAUDE.md (per detected scope) — If scopes detected, read ${CLAUDE_SKILL_DIR}/assets/templates/scoped-claude-md.md. Only scope-specific content differing from root.
.claude/rules/ Files (Path-Scoped Rules) — If file-pattern-specific rules detected, read ${CLAUDE_SKILL_DIR}/assets/templates/claude-rule.md. Consult claude-rules-system.md (already loaded) for when to create rules files vs using CLAUDE.md, path-scoping conventions, and convention vs domain-critical rule categories.
Domain Files — If non-standard domain patterns detected, read ${CLAUDE_SKILL_DIR}/assets/templates/domain-doc.md.
Read ${CLAUDE_SKILL_DIR}/references/validation-criteria.md and execute its Validation Loop Instructions against every generated file. Check general criteria AND CLAUDE.md-specific structural checks (path-scoping, minimal always-loaded content). For init flows, treat the Hard Rules size targets (root 15-40 lines, scoped 10-30 lines) as required validation gates — if a monorepo root exceeds target, move scope-specific detail into subdirectory CLAUDE.md, rules, or domain files and rerun. Maximum 3 iterations.
.claude/rules/ directory if generating rules filesnpx claudepluginhub rodrigorjsf/agent-engineering-toolkit --plugin agents-initializerProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.