harness-tool-errors

harness-tool-errors is a skill for Claude Code from laurigates/claude-plugins. It costs 48 tokens per session (1,774 once invoked), scanned A, original, MIT.

A guide for recovering from common Claude Code tool errors, such as missing paths, oversized files, unread files, formatter changes, web fetch failures, and denied shell commands. It explains safer next steps for each case.

In plain words
What is it for?
Use it when Read, Edit, Write, WebFetch, or Bash fails and you need to diagnose the failure before continuing.
Why use it?
It helps avoid repeating failed tool calls or using the wrong recovery method after an error.

Skill for Claude Code

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

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

Good fit Use it when Read, Edit, Write, WebFetch, or Bash fails and you need to diagnose the failure before continuing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/laurigates/claude-plugins/harness-tool-errors
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 harness-tool-errors
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 harness-tool-errors

README.md
[![agentmods](https://agentmods.dev/badge/skills/laurigates/claude-plugins/harness-tool-errors/github.svg)](https://agentmods.dev/skills/laurigates/claude-plugins/harness-tool-errors)
Your own site
<a href="https://agentmods.dev/skills/laurigates/claude-plugins/harness-tool-errors"><img src="https://agentmods.dev/badge/skills/laurigates/claude-plugins/harness-tool-errors/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 harness-tool-errors

Your own site · 80×15
<a href="https://agentmods.dev/skills/laurigates/claude-plugins/harness-tool-errors"><img src="https://agentmods.dev/badge/skills/laurigates/claude-plugins/harness-tool-errors.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,774 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.00048 $0.01774
Opus 5.5 $0.00019 $0.00710
Sonnet 5.5 $0.00010 $0.00355
Haiku 4.5 $0.00005 $0.00177

Measured 2mo ago against content hash 4f38dcdd91e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

harness-tool-errors 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 2mo 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/harness-tool-errors/SKILL.md · 172 lines

How it starts

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

Harness Tool Errors

Promoted from the always-loaded ~/.claude/rules/tool-use-patterns.md rule, whose stub points here. The sections below are that rule's text for the Read, Edit/Write, WebFetch and Bash-denial failure modes.

Durable patterns distilled from weekly friction-learner reports. The loud bash-antipatterns / branch-protection / agent-coworker-detection hooks already enforce most of the recurring findings (git && chains, find vs Glob, cat/head/tail, sleep-chains, etc.); the patterns below are the failure modes those hooks don't catch.

When to Use This Skill

Use this skill when... Use something else when...
Read errors on a missing path, EISDIR, or "exceeds maximum allowed tokens" An empty search result is about to gate an action → tool-result-traps
Edit/Write refuses with "has not been read yet" or "modified since read" Finding every reference to a symbol before changing it → code-quality-plugin:ast-grep-search
A Bash call returns "Permission to use Bash has been denied" A hook blocked the command with a message → handling-blocked-hooks.md
A WebFetch returns 404/403/timeout The fetch worked but the page is empty → documentation-plugin:docs-fetch-fallbacks

Read tool

Verify the path before calling Read

Read on a missing path is the dominant Read-side failure. The cause is almost always an assumed cwd: the session's working directory moved (worktree switch, prior cd, agent thread reset) and the cached path no longer resolves.

# Wrong — three Reads against guessed paths
Read("/abs/a"); Read("/abs/b"); Read("/abs/c")

# Correct — one Glob tells you which exist
Glob(pattern="/abs/*")

Agent threads always reset cwd between Bash calls. Always pass absolute paths from an agent prompt; never assume the cwd is preserved.

Read is for files, not directories

Read on a directory errors with EISDIR: illegal operation on a directory. The error message doesn't suggest the alternative.

Read the full file on GitHub · 172 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. 2mo ago Changed · +4 lines 4f38dcdd91e0
  2. 2mo ago First seen · 168 lines · 48 tokens per session scan A 43a85755823a

Subscribe to this mod's changes

harness-tool-errors is a skill published in the GitHub repository laurigates/claude-plugins (60 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 1,774 once invoked, about $0.0002 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-09-25.

Related

harness-tool-errors compared with skills from other repositories

harness-tool-errors next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
harness-tool-errorslaurigates/claude-pluginsSkill60yesterdayMITA48Claude Code
verify-before-done42-evey/hermes-pluginsSkill5601mo agoMITA17Claude Code, Codex
mk:resolving-merge-conflictsngocsangyem/MeowKitSkill172d agoMITA24Claude Code
mk:elicitngocsangyem/MeowKitSkill172d agoMITA22Claude Code
mk:investigatengocsangyem/MeowKitSkill172d agoMITA24Claude Code
ci-log-interpretationshopwareLabs/ai-coding-toolsSkill482d agoMITA154Claude Code
devils-advocatemelodic-software/claude-code-pluginsSkill34todayMITA139Claude Code