tool-result-traps

tool-result-traps is a skill for Claude Code from laurigates/claude-plugins. It costs 68 tokens per session (4,635 once invoked), scanned A, original, MIT.

A guide for interpreting tool results carefully, especially empty searches, successful commands, and output that may hide an error or missing input.

In plain words
What is it for?
Use it when a search result or command outcome will determine an action or be reported as evidence, including checks for duplicates, files, renames, and tool failures.
Why use it?
It prevents mechanical results from being mistaken for proof that something is absent, complete, or correct.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; names the TodoWrite tool.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./conf/cli_clients/gemini.json: "--n" ← the file says "--yolo"; rg rewrote it.

Part of the agent-patterns-plugin plugin — 22 skills shipped together

Good fit Use it when a search result or command outcome will determine an action or be reported as evidence, including checks for duplicates, files, renames, and tool failures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/laurigates/claude-plugins/tool-result-traps
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/laurigates/claude-plugins
agentmods
npx agentmods add skills/laurigates/claude-plugins/tool-result-traps

Made for: Claude Code.

Or install agent-patterns-plugin, the plugin that ships this one along with the rest of its 22 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 tool-result-traps

README.md
[![agentmods](https://agentmods.dev/badge/skills/laurigates/claude-plugins/tool-result-traps.svg)](https://agentmods.dev/skills/laurigates/claude-plugins/tool-result-traps)
Your own site
<a href="https://agentmods.dev/skills/laurigates/claude-plugins/tool-result-traps"><img src="https://agentmods.dev/badge/skills/laurigates/claude-plugins/tool-result-traps.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,635 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.1 $0.00068 $0.04635
Opus 5 $0.00034 $0.02318
Sonnet 5 $0.00014 $0.00927
Haiku 4.5 $0.00007 $0.00464

Measured 6d ago against content hash 9c6235c00697, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

tool-result-traps 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 6d 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.

agent-patterns-plugin/skills/tool-result-traps/SKILL.md · 320 lines

How it starts

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

Tool Result Traps

Promoted from the always-loaded ~/.claude/rules/tool-use-patterns.md rule, whose stub points here. The section bodies below are that rule's verbatim text.

One law across all of them: an empty result, a green exit, and a well-formed line of output are each claims about mechanics, not about content. Every trap here produces output that is indistinguishable from a correct answer — no error, no warning, nothing on stderr — and the damage lands when that output is used as a verdict: "no duplicate exists", "the rename is complete", "nothing was lost", "the agent got its input". In one case the diagnostic was written — and the caller's own 2>/dev/null is what made it disappear.

The recurring fix is equally uniform: control-test any negative that gates an action. Re-run the same command shape against something you know is present. If the control also comes back empty, the tool is broken, not the tree clean. One control run is cheap; a wrong negative is a confidently-reported non-finding.

When to Use This Skill

Use this skill when... Skip when...
A zero-match or empty result is about to be reported as "clean", "complete", or "none found" The result is non-empty and you are acting on what it contains
Deduping before filing an issue, or concluding nobody reported something Reading a single known file whose path you just listed
Declaring a bulk rename, migration, or sweep finished Mid-sweep, still transforming matches
A verification loop's input set is built from a relative path The path was resolved absolutely in the same command that used it
Batching parallel tool calls whose siblings may exit non-zero A single call, or a batch of confirmed-present paths
A Workflow script's agents report thin or generic findings on rich material Agents are returning specific, grounded detail
An rg/git grep result contradicts something you read directly Output matches an independent read of the same file
Concluding a skill, command, recipe, or binary "does not exist" You enumerated every tier it could be defined in
A -g/--glob filter is doing the narrowing, and the name you want is a directory The glob is **/<name>/**, or the search is on content not names
The command that produced the empty result had its stderr redirected away You read the command's stderr, or have seen it fail before

Read the full file on GitHub · 320 lines

Files

What ships with it

1 file 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. 6d ago First seen · 320 lines · 68 tokens per session scan A 9c6235c00697

Subscribe to this mod's changes

tool-result-traps is a skill published in the GitHub repository laurigates/claude-plugins (58 stars, last pushed yesterday), licensed MIT. It adds 68 tokens to every session and 4,635 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

a0-debug-plugin

Diagnose and fix Agent Zero plugin problems. Covers plugin not appearing, won't enable, API endpoints not responding, frontend store errors, extension point injection, settings resolution, hooks.py issues, and log inspection. Use when a plugin is not working, not loading, crashing, missing from the list, or behaving…

agent0ai/agent-zero · 68 tokens

audit-dead-code

Hunt dead code across a whole repository through four labelled lanes of unequal confidence. Knip (TS/JS unused files, exports, types, enum members), vulture (Python symbols), gopls (Go unexported symbols), and a portable grep lane (shell and other symbol languages), then adjudicate every candidate against the…

melodic-software/claude-code-plugins · 254 tokens

doctor

Check ryk installation, policy status, host integration status, and plugin readiness.

christopherkarani/ryk · 0 tokens

ryk-doctor

Check ryk installation, policy status, host integration status, and plugin readiness.

christopherkarani/ryk · 0 tokens

ci-log-interpretation

Use this skill when reading or analyzing CI logs from a Shopware GitHub Actions workflow to figure out why a build failed — phrases like "why did CI fail", "what broke the build", "check the pipeline", "interpret these logs", "debug this red build" — or whenever raw run logs, job logs, or check annotations from a…

shopwareLabs/ai-coding-tools · 154 tokens

a0-debug-plugin

Diagnose and fix Agent Zero plugin problems. Covers plugin not appearing, won't enable, API endpoints not responding, frontend store errors, extension point injection, settings resolution, hooks.py issues, and log inspection. Use when a plugin is not working, not loading, crashing, missing from the list, or behaving…

Gen-Verse/PAST-Bench · 68 tokens