From agents-initializer
Initializes optimized AGENTS.md hierarchy for projects. Uses subagent-driven codebase analysis to generate minimal, scoped files following progressive disclosure — based on the ETH Zurich 'Evaluating AGENTS.md' study showing that minimal developer-style files outperform comprehensive auto-generated ones.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agents-initializer:init-agentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate an evidence-based AGENTS.md file hierarchy for this project. Instead of one bloated file, create minimal per-scope files that load on-demand.
Generate an evidence-based AGENTS.md file hierarchy for this project. Instead of one bloated file, create minimal per-scope files that load on-demand.
Research shows that auto-generated comprehensive AGENTS.md 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.
Check if AGENTS.md exists in the current working directory.
If it already exists:
improve-agents 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 an agent 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. Check shared/library packages for unique constraints even if they are not user-facing, and treat repo-internal tooling directories as root/domain-doc candidates unless they truly need their own config file.
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 any references from Phases 1–2. Read these references:
${CLAUDE_SKILL_DIR}/references/progressive-disclosure-guide.md — file hierarchy decisions${CLAUDE_SKILL_DIR}/references/what-not-to-include.md — content exclusion criteriaDecide which file types to generate (root, scope, domain) and what content belongs in each tier.
Drop Phase 3a references. Read this reference:
${CLAUDE_SKILL_DIR}/references/context-optimization.md — token budget guidelinesUsing ONLY the information from Phase 1 and Phase 2, generate the file hierarchy:
Read ${CLAUDE_SKILL_DIR}/assets/templates/root-agents-md.md. Fill its placeholders using ONLY the analysis output from Phase 1 and Phase 2. Follow the HTML comment instructions in the template to determine which sections to include or remove. Remove any section that would be empty. Target: 15-40 lines.
If scopes were detected, read ${CLAUDE_SKILL_DIR}/assets/templates/scoped-agents-md.md for each scope. Only include scope-specific content that differs from root.
If the codebase-analyzer identified non-standard domain patterns, read ${CLAUDE_SKILL_DIR}/assets/templates/domain-doc.md and generate a file per domain.
Read ${CLAUDE_SKILL_DIR}/references/validation-criteria.md and execute its Validation Loop Instructions against every generated file.
The loop evaluates all hard limits and quality checks, fixes any failures, and re-evaluates — maximum 3 iterations. Do not proceed to Phase 5 until ALL criteria pass for ALL files. For init flows, treat output-size targets as required validation gates: the root file MUST finish within 15-40 lines and each scoped file MUST finish within 10-30 lines. If a monorepo root exceeds target, move scope-specific detail down or trim non-essential context and rerun the validation loop.
Provides 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.
npx claudepluginhub rodrigorjsf/agent-engineering-toolkit --plugin agents-initializer