example-audit

A read-only command that checks an mcpkit example against the rules in its `examples/CONVENTIONS.md` file. It identifies the example’s type and reports where the code or files drift from those rules.

In plain words
What is it for?
Use it to audit an example by name or path, verify required files and code patterns, and check either the user-interface or non-interface checklist.
Why use it?
It finds convention violations without changing the example, which makes compliance checks safer and easier to review.

Command for Claude Code

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/panyam/mcpkit/example-audit
Clone the repo
git clone --depth 1 https://github.com/panyam/mcpkit

Made for: Claude Code.

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 1,023 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.01023
Opus 5 $0.00000 $0.00511
Sonnet 5 $0.00000 $0.00205
Haiku 4.5 $0.00000 $0.00102

Measured yesterday against content hash 0c5d460fd6c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

example-audit 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 yesterday.

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.

.claude/commands/example-audit.md · 77 lines

How it starts

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

Audit an mcpkit example for compliance with examples/CONVENTIONS.md. Read-only — reports drift, never edits.

Args

  • $1 — example name (e.g. discord-events) or relative path (e.g. examples/events/discord). If missing, ask.

Steps

  1. Read examples/CONVENTIONS.md. It is the spec; this skill is just the runner. If the doc has changed since this skill was written, follow the doc.

  2. Resolve the target directory:

    • Try examples/$1, then examples/events/$1, then treat $1 as a relative path.
    • Refuse if the directory doesn't exist.
  3. Detect example type — UI vs non-UI:

    • UI: contains an *.html file AND main.go calls server.WithExtension(&ui.UIExtension{...}). Run the UI checklist (CONVENTIONS.md §8 second block).
    • Non-UI: everything else. Run the non-UI checklist (CONVENTIONS.md §8 first block).
    • If ambiguous (e.g. *.html present but no UI extension), report it as a finding and audit as non-UI.
  4. Walk the checklist. For each item, attempt to verify automatically:

    • File presence: Read / LS the path.
    • Code shape: grep for the canonical symbol or anti-pattern.
    • Doc shape: read the file and check section headers.
    • Build precondition: run cd <dir> && go build ./.... If it fails, emit build-broken as the sole finding and skip checks that depend on a working build (especially walkthrough-md-fresh).
    • WALKTHROUGH.md drift: run cd <dir> && go run . --doc md and diff against the committed file.
  5. Emit findings in the format under "## Output format" below. Use the canonical IDs from CONVENTIONS.md §8 (one per checklist item) so /example-upgrade can match them deterministically.

  6. Do not edit any files. Do not run just readme, do not run go fmt, do not run just tidy. The audit's only side effects are read operations + the --doc md build attempt in step 4.

  7. Final line: print exactly Audit complete: <N> pass, <M> fail so a follow-up /example-upgrade invocation can detect a recent audit in conversation context.

Read the full file on GitHub · 77 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. yesterday First seen · 77 lines · 0 tokens per session scan A 0c5d460fd6c4

Subscribe to this mod's changes

example-audit is a command published in the GitHub repository panyam/mcpkit (5 stars, last pushed 2d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,023 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.