sherlock

sherlock is a skill for Claude Code, Codex from drubinstein/terry. It costs 146 tokens per session (3,323 once invoked), scanned A, original, MIT.

A structured method for finding the real cause of difficult software bugs by listing every plausible explanation and ruling them out with evidence.

In plain words
What is it for?
It helps investigate nondeterministic failures, competing bug causes, regressions, and bugs that occur only on certain machines or setups.
Why use it?
It reduces guesswork when failures are intermittent, environment-specific, regressions, or otherwise seem impossible to reproduce or explain.

Skill for Claude CodeCodex

Part of the terry plugin — 6 skills 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 skills/drubinstein/terry/sherlock
Any agent
npx skills add drubinstein/terry --skill sherlock
Clone the repo
git clone --depth 1 https://github.com/drubinstein/terry

Made for: Claude Code, Codex.

Or install terry, the plugin that ships this one along with the rest of its 6 skills.

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 sherlock

README.md
[![agentmods](https://agentmods.dev/badge/skills/drubinstein/terry/sherlock.svg)](https://agentmods.dev/skills/drubinstein/terry/sherlock)
Your own site
<a href="https://agentmods.dev/skills/drubinstein/terry/sherlock"><img src="https://agentmods.dev/badge/skills/drubinstein/terry/sherlock.svg" alt="Measured on agentmods" height="20"></a>
Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,323 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.00146 $0.03323
Opus 5 $0.00073 $0.01662
Sonnet 5 $0.00029 $0.00665
Haiku 4.5 $0.00015 $0.00332

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

Security

Grade A, and why

sherlock 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 4d 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.

- (f) client / (h) harness: reproduced with a fresh `curl --no-keepalive` → ✗ both.
skills/sherlock/SKILL.md · 219 lines

How it starts

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

Sherlock — root-cause by elimination

"When you have eliminated the impossible, whatever remains, however improbable, must be the truth." — Sherlock Holmes, The Sign of the Four

Sherlock is the differential-diagnosis discipline for bugs. Instead of chasing your favorite theory, you build the complete list of possible causes, then eliminate each one with decisive evidence — never with a hunch or a reputation — until a single explanation survives. Whatever survives is the truth, however much it "shouldn't" be possible.

The whole method turns on one asymmetry: you cannot confirm your way to a root cause, but you can eliminate your way there. Confirmation flatters the theory you already hold; elimination is forced to consider the ones you don't.

Six moves, each a guard against the way bug-hunts actually fail:

  • The complete suspect list. Enumerate all candidate causes up front — including the ones you "know" can't be it. An incomplete list is the #1 reason a bug "can't be found": the true cause was never written down.
  • Eliminate by proof, not by reputation. A suspect leaves the board only when a test makes it impossible. "The stdlib is well-tested," "we decommissioned that," "the compiler doesn't have bugs" are not evidence — they're the exact assumptions the real bug hides behind.
  • Falsify, don't confirm. Design the test that would kill your leading theory, not the one that flatters it. Twist theories to fit facts; never twist facts to fit theories.
  • The dog that didn't bark. The absence of an expected signal — a missing log line, an error that never fired, a retry that never happened — is evidence. Observe, don't merely see.
  • Trust the improbable survivor. When one cause remains, accept it even though it "can't" happen, then confirm it. The bug that can't happen is happening.
  • Zero survivors ⇒ your reasoning failed, not the universe. If you've eliminated everything, you either over-eliminated (killed a suspect on assumption, not proof — re-test it) or under-enumerated (the cause is one you dismissed as impossible — widen the list). This branch is the maxim itself.

Read the full file on GitHub · 219 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 219 lines · 0 tokens per session scan A 05f4779b86d2

Subscribe to this mod's changes

sherlock is a skill published in the GitHub repository drubinstein/terry (1 stars, last pushed 2mo ago), licensed MIT. It adds 146 tokens to every session and 3,323 once invoked, about $0.0007 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.

Related

Other skills, from other repositories

autoimplement

Auto-advance a multi-phase plan: dispatch a subagent per phase, chain /review /pitfall-verification at each boundary, stop on actionable findings. Use for "autoimplement", "run this plan end-to-end", "auto-advance phases".

Paretofilm/superpowers-gstack · 58 tokens

swiftui-design-consultation

Apple-canon design system for SwiftUI projects: produces DESIGN.md + a Swift Package starter (semantic colors, SF Pro, Liquid Glass, motion, accessibility). Use when starting or refreshing a SwiftUI design system.

Paretofilm/superpowers-gstack · 51 tokens

ios-native-review

After a PRD/spec/plan for an iOS app, before implementation: validate the artifact against Apple HIG (iOS) via WebFetch citations. Asks "is this iOS-native?" — complements pitfall-verification and quality-review.

Paretofilm/superpowers-gstack · 57 tokens

office-hours-track-aware

Track-aware wrapper for gstack /office-hours: runs the session, detects native vs web, renders + opens DESIGN.html before the approval gate. Use when starting a new product idea or brainstorming.

Paretofilm/superpowers-gstack · 46 tokens

pitfall-verification

After any PRD, spec, plan, or code change: verify artifact-specific pitfalls don't apply before declaring done. For ship-worthy changes, auto-chains Codex a third model house + adversarial synthesis.

Paretofilm/superpowers-gstack · 50 tokens

verify-and-land

Build the checked-out branch, launch that exact app, let the user confirm the fix is really there, then push and offer merge or PR.

Paretofilm/superpowers-gstack · 34 tokens