leashd: Skill for Claude Code

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

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

A troubleshooting guide for leashd, including its SQLite databases, audit records, and application logs.

In plain words
What is it for?
Investigating broken behavior, checking sessions and messages, reviewing tool approvals, and diagnosing application requests or bugs.
Why use it?
It helps trace what happened during a request, including tool decisions, approvals, sessions, and errors, instead of guessing from the final symptom.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; mentions Claude Code.

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 →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/vmehera/projects/nodenova/leashd.

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-leashd/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-leashd

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

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

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

Security

Grade A, and why

debug-leashd 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-leashd/SKILL.md · 320 lines

How it starts

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

Debugging leashd

leashd uses two-tier storage:

  • Session store — {leashd_root}/.leashd/sessions.db (fixed, never switches). Tracks user→directory mapping, session IDs, costs.
  • Per-project store — {project}/.leashd/messages.db (switches with /dir). Stores messages and conversation history.
  • Audit log — {project}/.leashd/audit.jsonl (per-project)
  • App logs — {project}/.leashd/logs/app.log (per-project)

The leashd root is the directory containing the leashd/ package (i.e., the repo root).

First: Determine which project to inspect

If the user provides a project directory as an argument, use that. Otherwise, ask:

  1. Check the session store to find which directories have active sessions:
uv run python -c "
import sqlite3, pathlib
db = pathlib.Path('__file__').resolve().parent.parent / '.leashd' / 'sessions.db'
# Fallback: try common locations
for candidate in [db, pathlib.Path('.leashd/sessions.db')]:
    if candidate.exists():
        conn = sqlite3.connect(str(candidate))
        conn.row_factory = sqlite3.Row
        for r in conn.execute('SELECT user_id, chat_id, working_directory, last_used, is_active FROM sessions ORDER BY last_used DESC LIMIT 10'):
            print(dict(r))
        break
else:
    print('No sessions.db found')
"
  1. Use the working_directory from the session to locate per-project files.

1. SQLite Session Store (sessions.db)

Fixed at {leashd_root}/.leashd/sessions.db. Default storage backend is sqlite.

Sessions table — one row per user+chat pair:

user_id TEXT, chat_id TEXT, session_id TEXT, working_directory TEXT,
claude_session_id TEXT, created_at TEXT, last_used TEXT,
total_cost REAL, message_count INTEGER, is_active INTEGER
PRIMARY KEY (user_id, chat_id)

Common queries

Recent sessions (run from leashd repo root):

uv run python -c "
import sqlite3
conn = sqlite3.connect('.leashd/sessions.db')
conn.row_factory = sqlite3.Row
for r in conn.execute('SELECT user_id, chat_id, session_id, working_directory, message_count, total_cost, last_used, is_active FROM sessions ORDER BY last_used DESC LIMIT 10'):
    print(dict(r))
"

Read the full file on GitHub · 320 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 · +6 lines da66a8cd1b40
  2. 2mo ago First seen · 314 lines · 49 tokens per session scan A 722d838fa613

Subscribe to this mod's changes

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