leashd: Skill for Claude Code

.claude/skills/debug-task/SKILL.md

debug-task is a skill for Claude Code from vmehera123/leashd. It costs 51 tokens per session (5,375 once invoked), scanned A, original, Apache-2.0.

A debugging guide for autonomous coding tasks that query task state, phase details, costs, tool decisions, messages, and application logs. It uses task IDs to trace what happened.

In plain words
What is it for?
Investigating task runs, checking phase errors and outcomes, tracing tool approvals or denials, reading agent messages, and finding application-log errors.
Why use it?
It brings evidence from several records together when a task fails, stalls, escalates, or behaves unexpectedly. It also explains where the centralized audit log is stored.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; positional $N argument.

This is vmehera123/leashd's own configuration. It tells Claude Code how to work on leashd itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything leashd configures →

Reuse

Borrowing it

Nothing to install: this file belongs to vmehera123/leashd. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/vmehera123/leashd/main/.claude/skills/debug-task/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/vmehera123/leashd

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/vmehera123/leashd/debug-task"><img src="https://agentmods.dev/badge/skills/vmehera123/leashd/debug-task.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,375 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.00051 $0.05375
Opus 5.5 $0.00020 $0.02150
Sonnet 5.5 $0.00010 $0.01075
Haiku 4.5 $0.00005 $0.00537

Measured 6d ago against content hash 17e494757e02, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

debug-task 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 6d 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.

.claude/skills/debug-task/SKILL.md · 473 lines

How it starts

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

Debugging Autonomous Tasks

Data sources

Surface Location Content
Task runs ~/.leashd/sessions.db → task_runs table Phase state, outcome, costs, context, pipeline, timestamps (24 columns)
Sessions ~/.leashd/sessions.db → sessions table mode, task_run_id link back to task_runs
Audit log <approved_directories[0]>/.leashd/audit.jsonl (pinned/centralized) Tool-gating decisions (allow/deny/require_approval), all sessions
App logs {working_directory}/.leashd/logs/app.log Structured events: task_phase_changed, task_phase_error, task_terminal, etc.
Messages ~/.leashd/messages.db (centralized) Agent messages during the task's session

audit.jsonl is centralized, not per-working-directory. Since v0.9.0 it is pinned to approved_directories[0] (the first entry in ~/.leashd/config.yaml) — NOT {working_directory}/.leashd/audit.jsonl, which will look stale for any task that ran outside that dir. The audit queries below resolve the pinned path automatically.

$ARGUMENTS is the task_id — full 16-char hex or first 8 chars from /tasks output.

Current tasks run the linear implement → verify → [review] pipeline (plugins/builtin/task_orchestrator.py). Older rows in task_runs may carry v2/v3/v4 phases (explore, plan, retry, pr, …); check phase_pipeline in Step 1 to tell which.

Quick diagnosis (run all 5 steps)

Step 1: Load task state

Query task_runs by run_id. Try exact match first, then prefix match.

uv run python -c "
import sqlite3, pathlib, sys, json
db = pathlib.Path.home() / '.leashd' / 'sessions.db'
if not db.exists():
    print('ERROR: sessions.db not found at', db)
    sys.exit(1)
conn = sqlite3.connect(str(db))
conn.row_factory = sqlite3.Row
tid = '$ARGUMENTS'.strip()
if not tid:
    print('No task_id provided. Listing recent tasks...')
    for r in conn.execute('SELECT run_id, phase, outcome, task, created_at, total_cost FROM task_runs ORDER BY created_at DESC LIMIT 20'):
        d = dict(r)
        d['task'] = d['task'][:80]
        print(d)
    sys.exit(0)
# Exact match
row = conn.execute('SELECT * FROM task_runs WHERE run_id = ?', (tid,)).fetchone()
if not row:
    # Prefix match
    row = conn.execute('SELECT * FROM task_runs WHERE run_id LIKE ?', (tid + '%',)).fetchone()
if not row:
    print(f'No task found matching: {tid}')
    sys.exit(1)
d = dict(row)
# Pretty-print key fields
for k in ['run_id','phase','previous_phase','outcome','error_message','retry_count','max_retries',
          'created_at','started_at','phase_started_at','completed_at','last_updated',
          'total_cost','working_directory','session_id','user_id','chat_id','task']:
    print(f'{k:>20}: {d.get(k)}')
print(f\"{'phase_pipeline':>20}: {json.loads(d.get('phase_pipeline','[]'))}\")
print(f\"{'phase_costs':>20}: {json.loads(d.get('phase_costs','{}'))}\")
"

Read the full file on GitHub · 473 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. 6d ago Changed 17e494757e02
  2. 28d ago Changed · -1 lines 86ca61ff0361
  3. 2mo ago First seen · 474 lines · 51 tokens per session scan A ef8ddbc56ad1

Subscribe to this mod's changes

debug-task is a skill published in the GitHub repository vmehera123/leashd (5 stars, last pushed 7d ago), licensed Apache-2.0. It adds 51 tokens to every session and 5,375 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-08-31.

Related

Other skills, from other repositories

nio-scan

Nio code/skill execution-risk scanner. Use when the user wants to scan a file, repo, directory, or skill for execution risks — e.g. "scan this code for risks", "is this file/plugin dangerous", "check this repo for malicious code", "run nio scan on ". Focused single-purpose skill; for other Nio operations use /nio.

core0-io/nio · 81 tokens

nio-doctor

Nio config validator + connectivity check. Use when the user wants to validate their Nio setup — e.g. "run nio doctor", "is my nio config valid / working", "test my OAuth / external endpoint / LLM connectivity", "why isn't my scorer firing". Focused single-purpose skill; for other Nio operations use /nio.

core0-io/nio · 75 tokens

deep-code-review

Use when reviewing current branch for bugs before pushing or merging, when wanting a thorough multi-agent review of local changes, or when preparing work for human review.

Peaky8linders/eu-ai-act-scanner · 34 tokens

pact-bug

Log a bug investigation using PACT's structured bug tracker.

jonathanmr22/pact · 11 tokens

ai-slop-cleaner

Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode.

Yeachan-Heo/oh-my-claudecode · 25 tokens

hns-lsel-curator

Local Self-Evolution Loop (LSEL) curator — the CLUSTER + drain engine for the GOOS-local PROPOSE→APPLY seam closure (SPEC-LSEL-LOCAL-EVOLUTION-001). Companion-offset drain of .moai/lessons-inbox.jsonl with a drain-side severity filter that drops the 65% Bash-timeout/sandbox noise, eventkey clustering with a frequency…

modu-ai/moai-adk · 135 tokens