claude-code-inventory
AGENTS.md1 starsChanged 7 days agoMITView on GitHub
claude-code-inventory is a Claude Code plugin that auto-generates a unified inventory of all Claude Code automations (hooks, skills, plugins, agents, MCP servers) across global, project, and local scopes. It produces .CLAUDE.inventory.md (human-readable), .CLAUDE.inventory.json (machine-readable), and .CLAUDE.inventory.hash (staleness detection). Version: 2.2.1 License: MIT Author: z0rd0n88
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- inventorySkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 56
If stale, hook outputs a JSON message prompting Claude to regenerate
- Distinctive: line 116
No formal test runner — evaluation framework is for future expansion.
- Very specific: line 137
Update the Discovery phase in SKILL.md to read additional files, then update Classification and Generation phases to include the new data.
- Very specific: line 154
Default five-role vocabulary (needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix).
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
Project Overview
claude-code-inventory is a Claude Code plugin that auto-generates a unified inventory of all Claude Code automations (hooks, skills, plugins, agents, MCP servers) across global, project, and local scopes. It produces .CLAUDE.inventory.md (human-readable), .CLAUDE.inventory.json (machine-readable), and .CLAUDE.inventory.hash (staleness detection).
Version: 2.2.1 License: MIT Author: z0rd0n88
Repository Structure
├── .claude-plugin/
│ └── plugin.json # Plugin metadata (name, version, category)
├── commands/
│ ├── inventory.md # /inventory slash command
│ ├── inventory-global.md # /inventory-global slash command (v2.0)
│ └── inventory-compare.md # /inventory-compare slash command (v2.0)
├── docs/
│ └── superpowers/
│ ├── plans/
│ │ ├── 2026-04-11-inventory-v12-deep-scan.md
│ │ ├── 2026-04-11-inventory-v20-global-view.md
│ │ └── 2026-04-11-inventory-v21-capabilities.md
│ └── specs/
│ └── 2026-04-11-inventory-v12-v21-design.md
├── evals/
│ └── evals.json # Evaluation test cases (10 scenarios)
├── examples/
│ └── sample-output.md # Real-world example of generated output
├── hooks/
│ ├── hooks.json # SessionStart hook registration
│ ├── inventory.cmd # Polyglot Windows+Unix wrapper
│ └── inventory.sh # Bash staleness detection script
├── skills/
│ └── inventory/
│ └── SKILL.md # Core 7-phase generation logic (~800 lines)
├── README.md # Full documentation
└── AGENTS.md # This fileTech Stack
- Bash — Hook scripts with cross-platform support (macOS/Linux/Windows via Git Bash)
- Markdown — Skills, commands, and documentation (with YAML frontmatter)
- JSON — Configuration files (plugin.json, hooks.json, evals.json)
- No external dependencies — Runs entirely via Claude Code's built-in capabilities
Architecture
Core Flow
- SessionStart hook (
hooks/inventory.sh) runs on every session start - Hook performs lightweight staleness detection (file age > 24h or config hash changed)
- If stale, hook outputs a JSON message prompting Claude to regenerate
- Skill (
skills/inventory/SKILL.md) executes 7-phase generation:- Discovery → Classification → Validation → Change Detection → Recommendations → Generation → Gitignore
Key Design Patterns
- Polyglot wrapper:
inventory.cmdworks as both batch (Windows) and bash (Unix) - Three-tier staleness: Missing file → age-based (24h) → config hash comparison (MD5)
- Multi-format output:
.mdfor humans,.jsonfor tools,.hashfor fast staleness checks - Self-documenting: The inventory lists the plugin itself among discovered automations
- Non-destructive hooks: Hook only signals staleness; Claude decides whether to regenerate
Configuration Sources Scanned
| Scope | Sources |
| Global | ~/.claude/settings.json, ~/.claude/plugins/installed_plugins.json, ~/.claude/plugins/blocklist.json, ~/.claude/skills/*/SKILL.md, ~/.claude/mcp-needs-auth-cache.json, ~/.claude/keybindings.json, ~/.claude/CLAUDE.md, ~/.claude/settings.json (instructionFiles mode under pluginConfigs), ~/.claude/scheduled-tasks/*/, ~/.claude/plugins/cache/ (orphan markers) |
| Project | .claude/settings.json, .claude/skills/*/SKILL.md, .claude/agents/*.md, CLAUDE.md / AGENTS.md / CLAUDE.local.md / .claude/CLAUDE.md / .claude/AGENTS.md (root and ancestor directories), **/CLAUDE.md, **/AGENTS.md, **/CLAUDE.local.md (subdirectories) |
| Local | .claude/settings.local.json (permission count only) |
| Memory | ~/.claude/projects/<slug>/memory/MEMORY.md, ~/.claude/projects/<slug>/memory/*.md |
Development Guide
Naming Conventions
- Files: dash-separated lowercase (
inventory, notupdateAutomatons) - Output files:
.CLAUDE.inventory.*prefix (dot-prefixed, distinct namespace) - Frontmatter: YAML blocks delimited by
---at top of.mdfiles
JSON Style
- 2-space indentation
- Flat top-level structure
Markdown Tables
- Pipe-delimited columns with descriptive headers
- Status indicators:
active,ORPHANED,MISSING
Error Handling
- Missing config files silently skipped (
2>/dev/null) - Warnings collected and surfaced in validation output
- Fallback chains (e.g.,
md5sum→md5→ Python hashlib → timestamp) - Graceful degradation for every edge case (no git repo, no
.claude/, empty blocklist, first run)
Testing
Evaluations are defined in evals/evals.json with 10 test scenarios:
- Full inventory listing (both scopes)
- Skills/plugins only (handles missing
.claude/) - Regeneration after plugin install (detects Recent Changes)
- Memory files, scheduled tasks, and plugin health status
- Hook execution order and instruction file hierarchy
- Global-only inventory via
/inventory-global - Cross-project comparison via
/inventory-compare - Deferred tools, monitor tracking, and sandbox security
- AGENTS.md-only project (AGENTS.md active and scored)
- Project with both CLAUDE.md and AGENTS.md (AGENTS.md inactive, flagged)
No formal test runner — evaluation framework is for future expansion.
Key Files to Understand
| File | Why It Matters |
skills/inventory/SKILL.md | Core logic — all 7 generation phases, output templates, edge cases |
hooks/inventory.sh | Staleness detection — platform-aware stat, MD5 hashing, fallbacks |
hooks/inventory-hash.sh | Single definition of the config hash; used by the hook and by SKILL.md phase 6c (tests/hash-parity.sh keeps the Python fallback in sync) |
commands/inventory.md | Slash command entry point — frontmatter + invocation instructions |
.claude-plugin/plugin.json | Plugin identity — name, version, category for marketplace |
Common Tasks
Modifying generation logic
Edit skills/inventory/SKILL.md. The 7 phases are clearly delineated with headers.
Changing staleness thresholds
Edit hooks/inventory.sh. The 24-hour threshold is in the age comparison logic.
Adding new config sources
Update the Discovery phase in SKILL.md to read additional files, then update Classification and Generation phases to include the new data.
Adding evaluation scenarios
Append to evals/evals.json following the existing pattern of prompt + expected_output objects.
Project Architecture
See ARCH.md for the full, auto-maintained file-tree map and component overview — the primary entry point for orienting in this repo. The tree refreshes automatically on every commit via .githooks/pre-commit; refresh manually with python3 .githooks/gen_arch.py. After cloning, activate the hook once with git config core.hooksPath .githooks. Use the code-explorer agent for deeper tracing.
Agent skills
Issue tracker
Issues tracked in this repo's GitHub Issues via the gh CLI. See docs/agents/issue-tracker.md.
Triage labels
Default five-role vocabulary (needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix). See docs/agents/triage-labels.md.
Domain docs
Single-context: one CONTEXT.md + docs/adr/ at the repo root. See docs/agents/domain.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

