debug-leashd

debug-leashd is a skill for Claude Code, Codex from vmehera123/leashd. It costs 49 tokens per session (3,204 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 CodeCodex

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.

agentmods
npx agentmods add skills/vmehera123/leashd/debug-leashd
Any agent
npx skills add vmehera123/leashd --skill debug-leashd
Clone the repo
git clone --depth 1 https://github.com/vmehera123/leashd

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/vmehera123/leashd/debug-leashd.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.svg" alt="Measured on agentmods" 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,204 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00049 $0.03204
Opus 5 $0.00024 $0.01602
Sonnet 5 $0.00010 $0.00641
Haiku 4.5 $0.00005 $0.00320

Measured 4d ago against content hash 722d838fa613, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 · 314 lines

How it starts

The opening of the file, as written. The whole thing — 314 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 · 314 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. 4d 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 10d ago), licensed Apache-2.0. It adds 49 tokens to every session and 3,204 once invoked, about $0.0002 per session on Opus 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

orloj-generator

Interactive scaffold generator for Orloj multi-agent systems. Use this skill whenever someone wants to create, set up, scaffold, bootstrap, or generate an Orloj agent system, pipeline, swarm, or hierarchy. Also trigger when users mention "orlojctl init", ask how to get started with Orloj, want to build a multi-agent…

OrlojHQ/orloj · 168 tokens

spec

Draft a Workflow Phase 4 technical spec from an intake (and optionally a BRD + scout + research memo). The spec defines how the system will change: design (C4 + UML + dependency graph in PlantUML), data, APIs, tests, rollout, rollback. Output lives at docs/specs/ .md. Never self-approves — approval happens via…

friedbotstudio/baseline · 0 tokens

chore

Workflow track for tasks that need no TDD — documentation edits, governance count bumps, vendored-skill content updates, configuration tweaks, formatting, typo fixes, dependency bumps where no project code changes. Skips /scenario and /implement (no failing test to drive) and runs the work directly. archive…

friedbotstudio/baseline · 183 tokens

design-ui

Orchestrates impeccable for every design task inside a workflow phase. Captures intent in natural language, classifies it (design / development / copy), translates design intents into a sequence of impeccable subcommand invocations, runs them in main context with state persistence at .claude/state/design/ .json, and…

friedbotstudio/baseline · 126 tokens

compliance-scan

Scans a Python AI project for EU AI Act compliance gaps using AIR Blackbox. Use when the user asks to check compliance, scan their code, audit their AI project, or mentions EU AI Act, Articles 9-15, or compliance checking.

airblackbox/airblackbox · 51 tokens

integrate

Workflow Phase 9 — Integration and Verification. Runs the full test suite, stamps the binding verdict at .claude/state/lasttestresult, optionally runs a cross-engine smoke check, and writes harnessstate so the harness auto-continues or yields. No subagent delegation.

friedbotstudio/baseline · 59 tokens