tool-result-traps

tool-result-traps is a skill for Claude Code from laurigates/claude-plugins. It costs 68 tokens per session (1,970 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.

Part of the agent-patterns-plugin plugin — 26 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

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 laurigates/claude-plugins --skill tool-result-traps
Clone the repo
git clone --depth 1 https://github.com/laurigates/claude-plugins

Made for: Claude Code.

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

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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 1,970 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 8 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 20
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
  • high Anti-Refusal · line 64
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
  • medium Rogue Agent · line 4
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Excessive Agency · line 5
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • medium Agent Snooping · line 162
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 164
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 168
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 181
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
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.01970
Opus 5.5 $0.00027 $0.00788
Sonnet 5.5 $0.00014 $0.00394
Haiku 4.5 $0.00007 $0.00197

Measured 17d ago against content hash fce2ad214b84, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 17d 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 · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 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 trap bodies are that rule's verbatim text: most now live in references/search-traps.md, references/rejected-flags.md and REFERENCE.md; the 2>/dev/null trap under The traps is inline.

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
A pgrep -f liveness check or watcher loop disagrees with the job's own log, or never exits You hold the job's PID, or watch the file it writes on completion

Read the full file on GitHub · 135 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. 17d ago Changed fce2ad214b84
  2. 22d ago Changed · +5 lines 2dec25478f88
  3. 1mo ago Changed 4c1dc14410b5
  4. 1mo ago Changed · +4 lines 86caa7f0a301
  5. 1mo ago Changed · -195 lines bdd5c7940d4a
  6. 2mo ago Changed · +1 lines 3569326e0284
  7. 3mo 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 (60 stars, last pushed today), licensed MIT. It adds 68 tokens to every session and 1,970 once invoked, about $0.0003 per session on Opus 5.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

tool-result-traps compared with skills from other repositories

tool-result-traps next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tool-result-trapslaurigates/claude-pluginsSkill60todayMITA68Claude Code
verify-before-done42-evey/hermes-pluginsSkill5601mo agoMITA17Claude Code, Codex
mk:elicitngocsangyem/MeowKitSkill17yesterdayMITA22Claude Code
mk:resolving-merge-conflictsngocsangyem/MeowKitSkill17yesterdayMITA24Claude Code
mk:investigatengocsangyem/MeowKitSkill17yesterdayMITA24Claude Code
ci-log-interpretationshopwareLabs/ai-coding-toolsSkill48yesterdayMITA154Claude Code
devils-advocatemelodic-software/claude-code-pluginsSkill33todayMITA139Claude Code