tool-failure-diagnostic

Convert tool execution failures into diagnostic events with corrective actions.

2|2|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/codysumpter-cloud/buddy-brain --skill tool-failure-diagnostic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tool-failure-diagnostic
Source: https://github.com/codysumpter-cloud/buddy-brain/tree/main/skills/tool-failure-diagnostic
Command: npx skills add https://github.com/codysumpter-cloud/buddy-brain --skill tool-failure-diagnostic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the issue of tool execution failures by converting them into diagnostic events, enabling the agent to enter a specialized recovery mode instead of halting.

Core Features & Use Cases

  • Diagnostic Loop: Captures symptoms, audits context, generates hypotheses, and applies corrective actions.
  • Symptom Capture: Extracts stderr and exit_code.
  • Context Audit: Checks working directory, dependency existence, and filesystem permissions.
  • Hypothesis Generation: Determines if the failure is transient, configuration-related, or logical.
  • Corrective Action: Retries, updates configurations, or proposes patches.
  • Verification: Re-runs the original command to confirm the fix.
  • Use Case: When a command like gh fails, the skill can automatically check if it's installed and attempt to fix the issue.

Quick Start

Trigger the diagnostic loop for a failed command by using the tool-failure-diagnostic skill.

Frequently Asked Questions about tool-failure-diagnostic

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle tool execution failures automatically without halting the script?

To handle tool execution failures automatically, you can use a diagnostic loop that captures stderr and exit codes, audits execution context, and applies corrective actions like retries or configuration updates for autonomous recovery.

What is a diagnostic loop for autonomous recovery from scripting errors?

A diagnostic loop for autonomous recovery is a process that converts tool failures into diagnostic events by capturing symptoms, generating failure hypotheses, and applying corrective actions like patches or config updates before verifying the fix.

How do I troubleshoot transient or configuration-related tool failures during execution?

To troubleshoot transient or configuration-related tool failures, audit the working directory, check dependency existence and filesystem permissions, then generate a hypothesis to determine if the issue requires a retry, configuration update, or patch.

Can I automatically verify if a corrective action fixed a failed command execution?

Yes, you can automatically verify a corrective action by re-running the original failed command after applying the fix, which confirms whether the transient, configuration, or logical failure has been successfully resolved.

Does this autonomous recovery approach work for missing dependencies like the gh command?

Yes, this autonomous recovery approach works for missing dependencies like the gh command by auditing context for dependency existence, classifying the failure, and automatically attempting to install or fix the missing component.

What are the limitations of using a diagnostic loop for tool failure recovery?

The diagnostic loop for tool failure recovery requires scripting and diagnostic capabilities to function, and it is limited to failures where context audit, hypothesis generation, and corrective actions like retries or patches can logically resolve the issue.