gza-task-debug

gza-task-debug is a skill for Claude Code from mhawthorne/gza. It costs 31 tokens per session (2,538 once invoked), scanned A, original, MIT.

A diagnostic tool for failed Gza tasks. It examines task details, logs, code changes, repeated agent behavior, and comparisons with recently completed tasks.

In plain words
What is it for?
Investigating failed or maximum-turn tasks and producing recommendations for fixing the underlying issue. It requires a full task ID, such as gza-1234.
Why use it?
It helps identify whether a failure came from a loop, an implementation change, or another task-running problem.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument; mentions AGENTS.md.

Good fit Investigating failed or maximum-turn tasks and producing recommendations for fixing the underlying issue. It requires a full task ID, such as gza-1234.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mhawthorne/gza/gza-task-debug
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 mhawthorne/gza --skill gza-task-debug
Clone the repo
git clone --depth 1 https://github.com/mhawthorne/gza

Made for: Claude Code.

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 gza-task-debug

README.md
[![agentmods](https://agentmods.dev/badge/skills/mhawthorne/gza/gza-task-debug/github.svg)](https://agentmods.dev/skills/mhawthorne/gza/gza-task-debug)
Your own site
<a href="https://agentmods.dev/skills/mhawthorne/gza/gza-task-debug"><img src="https://agentmods.dev/badge/skills/mhawthorne/gza/gza-task-debug/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 gza-task-debug

Your own site · 80×15
<a href="https://agentmods.dev/skills/mhawthorne/gza/gza-task-debug"><img src="https://agentmods.dev/badge/skills/mhawthorne/gza/gza-task-debug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,538 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 pass 7 Sept 2026
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.00031 $0.02538
Opus 5.5 $0.00012 $0.01015
Sonnet 5.5 $0.00006 $0.00508
Haiku 4.5 $0.00003 $0.00254

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

Security

Grade A, and why

gza-task-debug 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 1mo 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.

src/gza/skills/gza-task-debug/SKILL.md · 270 lines

How it starts

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

Gza Task Debug

Diagnose why a gza task failed by analyzing logs, detecting agent loops, comparing against baselines, and providing actionable recommendations.

Process

Step 1: Get task ID

The user should provide a full prefixed task ID (for example, gza-1234). Extract it from the input.

Step 2: Query task from database

Run a Python one-liner to get all task details as JSON:

uv run python -c "from gza.db import get_task; import json; print(json.dumps(get_task(<ID>), indent=2, default=str))"

Note the following fields for analysis:

  • status — should be failed or max_turns (or possibly completed if user suspects partial failure)
  • num_turns — number of agent turns used
  • duration_seconds — total wall-clock time
  • cost_usd — API cost
  • log_file — provider conversation transcript path; also inspect the sibling <stem>.ops.jsonl file for runner lifecycle, preflight, command, outcome, and stats events
  • report_file — path to the report (if any)
  • branch — git branch the task worked on

Step 3: Baseline comparison

Compare the failed task's metrics against the last 20 completed tasks:

uv run python -c "from gza.db import get_baseline_stats; import json; print(json.dumps(get_baseline_stats(20)))"

Calculate how far the failed task deviates:

  • If num_turns is 2x+ the average → flag as high turns
  • If cost_usd is 3x+ the average → flag as high cost
  • Report the ratio (e.g., "3.2x more turns than average completed tasks")

Step 4: Loop detection from logs

Do NOT just read the tail — scan the full log for repeated patterns.

If log_file is set, run these grep-based checks against the conversation log first. Then inspect the sibling ops log for infrastructure/preflight/outcome clues:

ops_log="${log_file%.log}.ops.jsonl"

Repeated file opens (same file opened 5+ times):

grep -o 'Reading file: [^ ]*\|reading.*["\x27][^"'\'']*["\x27]\|open.*["\x27][^"'\'']*["\x27]' <log_file> | sort | uniq -c | sort -rn | head -20

Read the full file on GitHub · 270 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. 1mo ago First seen · 270 lines · 31 tokens per session scan A e95164cab70b

Subscribe to this mod's changes

gza-task-debug is a skill published in the GitHub repository mhawthorne/gza (12 stars, last pushed 6d ago), licensed MIT. It adds 31 tokens to every session and 2,538 once invoked, about $0.0001 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

Other skills, from other repositories

sentry-fix-issues

Find and fix issues from Sentry using MCP. Use when asked to fix Sentry errors, debug production issues, investigate exceptions, or resolve bugs reported in Sentry. Methodically analyzes stack traces, breadcrumbs, traces, and context to identify root causes.

openclaw/clawhub · 58 tokens

debugging-executions

Debug failed or wrong-output workflow executions using executions tools. Load when the user reports execution failures, unexpected node output, empty parameter values after a successful run, or a node showing a red or failed expression error. Also load when a live run you started for the user fails with an error from…

n8n-io/n8n · 86 tokens

audit

Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.

fengshao1227/ccg-workflow · 54 tokens

n8n-docs-assistant

Answers n8n product, setup, credential, node, hosting, API, and usage questions from current n8n docs. Use when the user asks how to configure, set up, troubleshoot, or understand n8n behavior, especially credential setup questions — including which OAuth scopes or permissions a provider app needs.

n8n-io/n8n · 71 tokens

dorodango

Polishes working code through successive quality passes in fresh subagents. Use after tests pass when code needs multi-dimension refinement before release.

athola/claude-night-market · 31 tokens

sentry-sdk-upgrade

Upgrade the Sentry JavaScript SDK across major versions. Use when asked to upgrade Sentry, migrate to a newer version, fix deprecated Sentry APIs, or resolve breaking changes after a Sentry version bump.

getsentry/sentry-for-ai · 48 tokens