agentleFS
VasiHemanthVasiHemanth/tokentelemetry/.claude/skills/bug-audit/SKILL.md

bug-audit

Skill388 starsChanged 4 months agoMITView on GitHub

Weekly multi-agent audit for serious bugs (data integrity, silent caps, staleness, timestamp math, trust boundaries). Fans out Sonnet scanners + Opus deep auditors, adversarially verifies every finding, files GitHub issues for confirmed critical/high bugs. Trigger: /bug-audit

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. InsightStudio-2026/agent-assets★ 1same name
    2. TienBeta/claude-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always include the standing hot-spots regardless of diff: backend/main.py scan loops, backend/history_store.py, backend/scan_cache.py (if …

    line 21
  2. Very specific:

    Write the report to docs/audits/<YYYY-MM-DD>-bug-audit.md: audited range (<from>..<to> commits), confirmed findings (severity, file:line, …

    line 54
  3. Very specific:

    Always file/update the audit-marker issue: a single issue titled bug-audit marker labeled bug-audit whose body's last line is …

    line 62
  4. Very specific:

    Commit the report on a branch audit/<YYYY-MM-DD> and open a draft PR (report only — never commit fixes from this skill.

    line 65
  5. Very specific:

    Run manually with /bug-audit, or schedule headless:

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

bug-audit — weekly serious-bug sweep

Multi-agent audit of the TokenTelemetry backend/frontend for the bug class that motivated it (PR #131: a silent 100-session cap plus stub rows crushing real persisted data). Optimized for bugs that corrupt data, lose data, or silently report wrong numbers — not style or hypotheticals.

Scope selection (do this first)

  1. Find the last audit marker: the most recent GitHub issue labeled bug-audit (gh issue list --label bug-audit --state all --limit 1), whose body records the commit it audited up to.
  2. Primary scope = git diff <last-audited-commit>..HEAD plus any file those diffs touch. If no marker exists (first run), scope = backend/*.py and frontend/src/lib + frontend/src/app.
  3. Always include the standing hot-spots regardless of diff: backend/main.py scan loops, backend/history_store.py, backend/scan_cache.py (if present), anything matching backend/*cache*/backend/*store*.

Fan-out (Agent tool; run each wave's spawns in parallel)

Wave 1 — breadth, audit-scanner (Sonnet), one per dimension:

  • silent caps & truncation (slices, LIMIT, early breaks, [:N])
  • persisted-state integrity (upserts that overwrite, absent-vs-zero confusion, stub/partial rows)
  • cache & staleness (mtime keys, missing version fields, invalidation gaps)
  • timestamp/timezone math (naive datetimes, mtime-as-date, day bucketing)
  • trust boundaries (on-disk ids/paths/cwd used in paths, SQL, shell)
  • token/cost arithmetic (double counting, high-water-mark vs sum, unit slips)

Give each scanner the scope file list and its dimension. Prompt them to return the FINDING-block format their agent definition specifies.

Wave 2 — depth, audit-deep (Opus), in the same parallel batch as wave 1: one per risky subsystem actually present in scope, typically 2-4 of:

  • scan → cache → history-upsert pipeline (the PR #131 path)
  • one agent-store parser that changed recently (Claude, Codex, Copilot…)
  • any new persisted format introduced since the last audit
  • the analytics aggregation path (/analytics, ecosystem rollups)

Wave 3 — verification, audit-verifier (Opus), one per candidate: Dedupe wave 1+2 candidates by (file, defect) first. Send each survivor to a verifier with the full finding block. Only VERDICT: CONFIRMED findings survive; keep the verifier's own severity, not the scanner's.

Output

  1. Write the report to docs/audits/<YYYY-MM-DD>-bug-audit.md: audited range (<from>..<to> commits), confirmed findings (severity, file:line, scenario, verifier's reason), refuted-candidate count, dimensions that came back clean.
  2. File one GitHub issue per confirmed critical or high finding: gh issue create --label bug,bug-audit — title is the one-sentence defect, body is the finding block + verifier reason + audited commit. Medium findings go only in the report.
  3. Always file/update the audit-marker issue: a single issue titled bug-audit marker labeled bug-audit whose body's last line is audited-through: <HEAD sha> (edit it if it exists, create otherwise).
  4. Commit the report on a branch audit/<YYYY-MM-DD> and open a draft PR (report only — never commit fixes from this skill; fixes are separate, human-initiated work).

Weekly cadence

Run manually with /bug-audit, or schedule headless:

# launchd/cron, weekly:
cd /path/to/tokentelemetry && claude -p "/bug-audit" --permission-mode acceptEdits

Budget note: one run spawns roughly 6 Sonnet scanners + 2-4 Opus deep auditors + one Opus verifier per candidate. If candidates exceed ~15, verify only critical/high candidates and list the rest as unverified in the report.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.