auto-instrument

auto-instrument is a skill for Claude Code, Codex from soleimanmansouri/debug-bank. It costs 19 tokens per session (808 once invoked), scanned A, original, MIT.

A fallback debugging workflow that adds temporary logging when no known bug pattern matches. It creates hypotheses, instruments the relevant code, and records values needed to test those hypotheses.

In plain words
What is it for?
Use it only after confirming that pattern checks found no match, to investigate Python, JavaScript, TypeScript, or Go code with targeted logs.
Why use it?
It supplies evidence when the existing pattern library and domain examples do not explain the problem.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it only after confirming that pattern checks found no match, to investigate Python, JavaScript, TypeScript, or Go code with targeted logs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/soleimanmansouri/debug-bank/auto-instrument
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.

Any agent
npx skills add soleimanmansouri/debug-bank --skill auto-instrument
Clone the repo
git clone --depth 1 https://github.com/soleimanmansouri/debug-bank

Made for: Claude Code, Codex.

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 auto-instrument

README.md
[![agentmods](https://agentmods.dev/badge/skills/soleimanmansouri/debug-bank/auto-instrument/github.svg)](https://agentmods.dev/skills/soleimanmansouri/debug-bank/auto-instrument)
Your own site
<a href="https://agentmods.dev/skills/soleimanmansouri/debug-bank/auto-instrument"><img src="https://agentmods.dev/badge/skills/soleimanmansouri/debug-bank/auto-instrument/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for auto-instrument

Your own site · 80×15
<a href="https://agentmods.dev/skills/soleimanmansouri/debug-bank/auto-instrument"><img src="https://agentmods.dev/badge/skills/soleimanmansouri/debug-bank/auto-instrument.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 808 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00019 $0.00808
Opus 5 $0.00010 $0.00404
Sonnet 5 $0.00004 $0.00162
Haiku 4.5 $0.00002 $0.00081

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

Security

Grade A, and why

auto-instrument 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 8d 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.

skills/auto-instrument/SKILL.md · 99 lines

How it starts

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

Auto-Instrument Skill

Use when the symptom classifier returns no match and the domain catalog is empty. Do NOT skip Step 0.

Step 0: Confirm No Match

Verify the classifier was already run. Expected output: "No pattern match" or all checklist scores 0/3. If you haven't run the classifier yet, do that first.

Step 1: Generate Hypotheses

H1: [cause] — Test: [what log value would confirm this]
H2: [cause] — Test: [what log value would confirm this]
H3: [cause] — Test: [what log value would confirm this]

Rank by proximity to the error site. Max 5 hypotheses.

Step 2: Instrument

Ensure the log directory exists: mkdir -p .debug-bank

Python

# region DEBUG-H1
import logging as _dbg; _dbg.basicConfig(filename='.debug-bank/debug.log', level=_dbg.DEBUG)
_dbg.debug(f"[DEBUG H1] var={var!r}")
# endregion DEBUG-H1

JavaScript / TypeScript

// #region DEBUG-H1
const _fs = require('fs'); _fs.appendFileSync('.debug-bank/debug.log', `[DEBUG H1] var=${JSON.stringify(var)}\n`);
// #endregion DEBUG-H1

Go

// #region DEBUG-H1
_f, _ := os.OpenFile(".debug-bank/debug.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
fmt.Fprintf(_f, "[DEBUG H1] var=%v\n", var)
_f.Close()
// #endregion DEBUG-H1

Rules: log ONLY to .debug-bank/debug.log, never stdout. Never modify business logic.

Step 3: Reproduce

Run the failing operation. Logs capture evidence per hypothesis.

Step 4: Analyze

Read .debug-bank/debug.log. For each hypothesis:

H1: CONFIRMED / REJECTED / INCONCLUSIVE — [evidence]

Step 5: Fix

Minimal fix for the confirmed hypothesis only. Verify it resolves the symptom.

Step 6: Extract Pattern Candidate

candidate_id: P-candidate-YYYY-MM-DD
name: [from root cause]
category: [config / data / async / auth / type / state / network]
symptom_keywords: [from symptom]
checklist:
  - [confirmed hypothesis — what to check first]
  - [log expression that revealed it]
  - [signal that ruled out other hypotheses]
debugger_strategy:
  breakpoints: [file:function where bug was found]
  watch_expressions: [log expression that showed the evidence]
fix_summary: [one sentence]

Read the full file on GitHub · 99 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. 8d ago First seen · 99 lines · 0 tokens per session scan A 3abf76468126

Subscribe to this mod's changes

auto-instrument is a skill published in the GitHub repository soleimanmansouri/debug-bank (1 stars, last pushed 3mo ago), licensed MIT. It adds 19 tokens to every session and 808 once invoked, about $0.0001 per session on Opus 5. 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.

Related

Other skills, from other repositories