From claude-agent-dev
Initialize or audit repository instructions. Generates high-signal AGENTS.md wired to CLAUDE.md/GEMINI.md stubs. Not for documenting a specific feature's spec or design (see planning, brainstorming). Trigger on: 'init codebase', 'onboard repo', 'audit AGENTS.md', 'setup agent instructions', 'codebase-init', 'initialize project memory'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-agent-dev:codebase-initThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**goal:** Maintain lean, high-signal `AGENTS.md`.
goal: Maintain lean, high-signal AGENTS.md.
constraint: CLAUDE.md/GEMINI.md must be one-line redirect stubs to AGENTS.md (no duplicate contents).
format: Body style must be markdown-kv (key: value lines) — never prose paragraphs.
target: AGENTS.md < 100 lines.
Trigger: Init/Audit Request
-- audit only --> Audit Mode -> Lint AGENTS.md -> Report Issues
-- full init ----> Init Mode -> Phase 0: Mode Selection (if AGENTS.md exists)
-- AGENTS.md absent --------------> Phase 0: Policy Survey
-- generate fresh new skeleton ----> Phase 0: Overwrite Confirmation
-- update existing instructions ---> Phase 0: Marker Detection
Phase 0: Overwrite Confirmation
-- cancel -------------> Halt (no partial file)
-- confirm overwrite ---> Phase 0: Policy Survey
Phase 0: Marker Detection
-- marker present --> Phase 1: Environment Discovery
-- marker absent ---> Phase 0: Policy Survey
Phase 0: Policy Survey (ask 3 questions)
-- survey complete --> Phase 1: Environment Discovery
-- cancelled --------> Halt (no partial file)
Phase 1: Environment Discovery (analyze toolchain/structure)
-> Phase 1.5: Architecting Mapping (detect patterns)
-> Phase 2: Draft (scaffold AGENTS.md)
-> Phase 3: Write, Wire, Validate (wire variants, lint)
AGENTS.md exists.AskUserQuestion with ["Update existing instructions (Recommended)", "Generate fresh new skeleton"].AskUserQuestion to confirm overwrite (["Yes, overwrite", "Cancel"]).AGENTS.md for <!-- codebase-init:hard-rules v1 ... --> (exact v1 match).AskUserQuestion exactly once with all 3 questions ordered.AGENTS.md. Only survey on root AGENTS.md.AGENTS.md without marker.[strict, relaxed, minimal]CONTRIBUTING.md.[production, development]CHANGELOG, or release workflow.[always, touched-files, not-enforced]scripts/run.py analyze-env via .github/workflows/ or .gitlab-ci.yml.scaffold-agents-md auto-fills marker ci= value.--ci <github-actions|gitlab-ci|local-only> only if detection fails.references/hard-rules.md for exact wording.python "$CLAUDE_PLUGIN_ROOT/skills/codebase-init/scripts/run.py" analyze-all . --max-depth 2skills/codebase-init if $CLAUDE_PLUGIN_ROOT undefined.analyze-env, find-dependencies, scan-structure.package.json, pyproject.toml, etc.). Do not hallucinate.ls -R (limited depth)..github/workflows/ or .gitlab-ci.yml.references/phase-1.5-architecting.md.--language value and detect tech stack patterns.python "$CLAUDE_PLUGIN_ROOT/skills/codebase-init/scripts/run.py" scaffold-agents-md --language <node|python|go|rust|java|dotnet|bun> --purpose "<one sentence from Phase 1>" --commit <strict|relaxed|minimal> --maturity <production|development> --testing <always|touched-files|not-enforced> [--pm "<real pm from Phase 1>"] [--set key=value ...] --out AGENTS.mdstrict | relaxed | minimalproduction | developmentalways | touched-files | not-enforcedAGENTS.md manually observing required sections/formats if command fails.key: value lines.
# Agent Instructions or # <Project> Agent Instructionspurpose: <one sentence>commit:, maturity:, testing:, ci:) + marker comment.Co-Authored-By: <Model Name> at EOF.AGENTS.md. Do not rewrite from scratch.python "$CLAUDE_PLUGIN_ROOT/skills/codebase-init/scripts/run.py" wire-agents AGENTS.md CLAUDE.md GEMINI.mdpython "$CLAUDE_PLUGIN_ROOT/skills/codebase-init/scripts/run.py" lint-agents-md AGENTS.mdCLAUDE.md and GEMINI.md with exact stub # See [AGENTS.md](AGENTS.md).python "$CLAUDE_PLUGIN_ROOT/skills/codebase-init/scripts/run.py" lint-agents-md AGENTS.mdreferences/hard-rules.md or references/phase-1.5-architecting.md.diagnose via Skill tool using script stderr and AGENTS.md.AGENTS.md skeleton (must use scaffold-agents-md).CLAUDE.md/GEMINI.md (must use 1-line stub).AGENTS.md sections.npx claudepluginhub j0hanz/claude-agent-dev-plugin --plugin claude-agent-devProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.