inventory

inventory is a command for coding agents from ggemba/squad-mcp. It costs 0 tokens per session (918 once invoked), scanned A, original, Apache-2.0.

A codebase inventory tool that scans a repository for a named pattern, such as inline SQL, network calls, feature flags, debug leftovers, or deprecated APIs. It records matches in a structured Markdown document and can relate them to routes and handlers.

In plain words
What is it for?
Use it to measure or plan cleanup and migrations across a codebase. Quick, normal, and deep modes provide different levels of analysis, with an optional output path.
Why use it?
It replaces a scattered manual search with a consistent list of where a pattern appears and how those locations connect to the application.

Command

Part of the squad plugin — 10 skills, 14 commands, 12 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ggemba/squad-mcp/inventory
Clone the repo
git clone --depth 1 https://github.com/ggemba/squad-mcp

Or install squad, the plugin that ships this one along with the rest of its 10 skills, 14 commands, 12 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for inventory

README.md
[![agentmods](https://agentmods.dev/badge/commands/ggemba/squad-mcp/inventory.svg)](https://agentmods.dev/commands/ggemba/squad-mcp/inventory)
Your own site
<a href="https://agentmods.dev/commands/ggemba/squad-mcp/inventory"><img src="https://agentmods.dev/badge/commands/ggemba/squad-mcp/inventory.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 918 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00918
Opus 5 $0.00000 $0.00459
Sonnet 5 $0.00000 $0.00184
Haiku 4.5 $0.00000 $0.00092

Measured 3d ago against content hash 884a6b5b49a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

inventory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/inventory.md · 41 lines

How it starts

The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are running the inventory skill on the user's request:

$ARGUMENTS

Execute the skill exactly as specified at skills/inventory/SKILL.md. The full contract — Inviolable Rules, pack loading, rg sweep, hybrid dispatch, deterministic MD renderer, telemetry — lives there. This file is a thin trigger; the skill file is the source of truth.

Depth (--quick / --normal / --deep)

Same vocabulary as /squad:implement and /squad:review, but mapped to the model strategy for enrichment:

  • --quick → Haiku tier-1 only. No escalation. Faster, cheaper, summaries are generic. Best for exploratory first sweep ("how big is the problem?").
  • --normal (default) → Haiku tier-1 + Sonnet escalation for findings with confidence < 0.7 OR rules tagged requires_semantic: true. Sweet spot.
  • --deep → Sonnet tier-1 across all findings + Opus for the cross-ref summary section. Use when the inventory will become a canonical migration plan.

If the user passes none, default to --normal.

Output target

Default: ./docs/inventory/<recipe>-<YYYY-MM-DD>.md inside the project. Created if docs/ doesn't exist. Override with --out <path> (accepts Obsidian vault paths, absolute paths, or repo-relative).

If the output path already exists, the skill prompts before overwriting (write-authority gate, same pattern as /squad:grillme).

Dry-run

--dry-run shows the plan (pack rules loaded, file count, bucket count, dispatched-tier breakdown, estimated token cost) without running the LLM enrichment. The rg sweep still runs (it's cheap) and the resulting raw findings are reported in count form only.

Critical reminders

  1. Reads the codebase; writes ONE file. The skill produces a single MD report at the user-supplied (or default) path. It never edits source code, never modifies git state, never commits, never pushes.
  2. Pack loading is strict. A malformed YAML pack fails the run at Phase 1 — do not partially run with a broken pack.
  3. Cross-tier escalation is binding. Findings from rules with requires_semantic: true MUST go to Sonnet+ (or skip enrichment entirely if --quick). Never silently downgrade.
  4. Determinism is the contract. Same JSON intermediate → byte-identical MD (src/inventory/render-md.ts enforces this via Zod parse and stable sort). If you find yourself adding wall-clock-dependent content, stop — that breaks the contract.
  5. No AI attribution in the generated MD. The footer says "Generated by squad-mcp inventory", not "Generated with AI".

Read the full file on GitHub · 41 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 41 lines · 0 tokens per session scan A 884a6b5b49a3

Subscribe to this mod's changes

inventory is a command published in the GitHub repository ggemba/squad-mcp (4 stars, last pushed 1mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 918 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.