graceful-tool-failure

graceful-tool-failure is a skill for Claude Code, Codex from HKUDS/OpenSpace. It costs 20 tokens per session (1,042 once invoked), scanned B, original, MIT.

A response procedure for cases where an essential tool, such as PDF extraction or web search, repeatedly fails. It requires explaining the failure and providing the most useful limited result possible.

In plain words
What is it for?
Use it when required tools fail several times and the task cannot be fully completed, so the agent can document the limitation and produce a clearly marked partial answer.
Why use it?
It prevents an agent from hiding blocked work or presenting guesses as a completed result.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when required tools fail several times and the task cannot be fully completed, so the agent can document the limitation and produce a clearly marked partial answer.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkuds/openspace/graceful-tool-failure
About the project

OpenSpace is a skill-management layer for AI agents that stores, retrieves, evaluates, shares, and improves reusable workflows. It is intended for people using multiple coding agents who want skills to be reused and refined based on task outcomes. The catalogue provides 200 skills for use with OpenSpace and the agents it supports.

HKUDS/OpenSpace · 8,146 stars · on GitHub

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 HKUDS/OpenSpace --skill graceful-tool-failure
Clone the repo
git clone --depth 1 https://github.com/HKUDS/OpenSpace

Made for: Claude Code, Codex.

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 graceful-tool-failure

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/openspace/graceful-tool-failure/github.svg)](https://agentmods.dev/skills/hkuds/openspace/graceful-tool-failure)
Your own site
<a href="https://agentmods.dev/skills/hkuds/openspace/graceful-tool-failure"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/graceful-tool-failure/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 graceful-tool-failure

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkuds/openspace/graceful-tool-failure"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/graceful-tool-failure.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,042 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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: 1 finding, 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 142
    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.
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.00020 $0.01042
Opus 5.5 $0.00008 $0.00417
Sonnet 5.5 $0.00004 $0.00208
Haiku 4.5 $0.00002 $0.00104

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

Security

Grade B, and why

graceful-tool-failure scanned grade B 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 3mo 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.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

- ❌ Providing output without disclaimers about its reliability
benchmarks/gdpval/skills/graceful-tool-failure/SKILL.md · 144 lines

How it starts

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

Graceful Tool Failure Workflow

This skill guides agents on how to respond when critical tools (like PDF extraction, web search, data APIs) fail repeatedly and block task completion.

When to Apply This Skill

Use this pattern when:

  • A core tool required for task completion has failed multiple times (3+ attempts with different approaches)
  • Alternative approaches to achieve the same goal have also failed
  • The task cannot be fully completed without the blocked capability

Step-by-Step Instructions

1. Explicitly Report Blocking Issues

Clearly document what failed and why:

## Blocking Issues

The following tools/approaches were attempted but failed:

1. **PDF Extraction (pdftotext)**: Command returned error - file appears corrupted or uses non-standard encoding
2. **PDF Extraction (PyMuPDF)**: Library could not parse document structure
3. **Web Search**: Search queries returned no relevant results for [specific topic]

These failures prevent completion of [specific deliverable].

2. Attempt Minimal Viable Output

Using available domain knowledge, create the best possible output with clear limitations:

## Partial Output (Based on Domain Knowledge)

*Note: The following content is derived from general domain knowledge rather than the requested source materials.*

[Insert best-effort content here]

**Confidence Level**: Low - content has not been verified against source documents
**Recommendation**: Verify all claims against original source materials when available

3. Avoid Claiming Success

Never state the task is complete when core deliverables are missing or unverified:

Incorrect:

"Task completed successfully."

Correct:

"Task partially completed. Core deliverable [X] could not be produced due to tool failures. Minimal viable output provided with disclaimers. Manual review or alternative data sources recommended."

4. Provide Actionable Next Steps

Suggest concrete actions for human operators or alternative approaches:

Read the full file on GitHub · 144 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. 3mo ago First seen · 144 lines · 20 tokens per session scan B 4ed370ecac47

Subscribe to this mod's changes

graceful-tool-failure is a skill published in the GitHub repository HKUDS/OpenSpace (8,146 stars, last pushed 18d ago), licensed MIT. It adds 20 tokens to every session and 1,042 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

graceful-tool-failure compared with skills from other repositories

graceful-tool-failure next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
graceful-tool-failureHKUDS/OpenSpaceSkill8.1k18d agoMITB20Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill101ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill395ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill330k2d agoMITA21Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill14kyesterdayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code