prod-debug

A project-specific production debugging guide that loads database, container, and production-environment details from files in the project.

In plain words
What is it for?
Use it to load the project’s schema, services, and production environment, then investigate database queries, logs, or other production issues.
Why use it?
It prevents repeated searching for essential system context when investigating a live problem. It also points out missing setup files before debugging begins.

Skill for Claude CodeCodex

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 skills/josephfung/trimkit/prod-debug
Any agent
npx skills add josephfung/trimkit --skill prod-debug
Clone the repo
git clone --depth 1 https://github.com/josephfung/trimkit

Made for: Claude Code, Codex.

Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,428 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00048 $0.01428
Opus 5 $0.00024 $0.00714
Sonnet 5 $0.00010 $0.00286
Haiku 4.5 $0.00005 $0.00143

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

Security

Grade A, and why

prod-debug scanned grade A with 1 finding 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 2d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Health check: curl https://<domain>/api/health
skills/prod-debug/SKILL.md · 179 lines

How it starts

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

prod-debug

Invocation

Two modes:

  • /prod-debug — load context and enter debugging mode
  • /prod-debug bootstrap — (re)build schema.md and containers.md from source files

On /prod-debug

Step 1: Find project root

Determine the project root — use the current working directory, or if inside a git repo, use git rev-parse --show-toplevel.

Step 2: Check for data directory

Check whether .claude/prod-debug/config.json exists at the project root.

  • If missing: tell the user that prod-debug is not set up for this project yet, and suggest running /prod-debug bootstrap after creating .claude/prod-debug/config.json.
  • If present: continue to Step 3.

Step 3: Load context files

Read all three data files using the Read tool:

  1. {project_root}/.claude/prod-debug/schema.md
  2. {project_root}/.claude/prod-debug/containers.md
  3. {project_root}/.claude/prod-debug/prod-env.md

If any file is missing, note it and proceed with what's available.

Step 4: Announce

Report a brief summary:

Prod-debug loaded.
  Schema: {N} tables
  Containers: {M} services
  Env: {hostname or domain from prod-env.md}
Ready — ask me to query the DB, inspect logs, or diagnose an issue.

Step 5: Enter debugging mode

Use the loaded context to assist with:

DB queries — Build SQL using the pre-loaded schema. No \d or INFORMATION_SCHEMA queries needed — the schema is already in context. For queries on remote prod, prefix with the SSH + docker exec command from prod-env.md.

Container operations — Use container names and commands from containers.md. Common patterns:

  • View logs: docker logs {service} --tail 100 -f
  • Shell in: docker exec -it {service} sh (or bash)
  • Restart: docker restart {service}

SSH to prod — Use the SSH alias/command from prod-env.md. Remote docker commands are typically run via ssh {alias} docker ...

Stale schema — If the user mentions a table or column that isn't in schema.md, flag it and suggest running /prod-debug bootstrap to rebuild from migrations.

Read the full file on GitHub · 179 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. 2d ago First seen · 179 lines · 48 tokens per session scan A b10a89aef1a3

Subscribe to this mod's changes

prod-debug is a skill published in the GitHub repository josephfung/trimkit (3 stars, last pushed 3mo ago), licensed MIT. It adds 48 tokens to every session and 1,428 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.