leashd CLAUDE.md

leashd CLAUDE.md is an instructions file for Claude Code from vmehera123/leashd. It costs 1,826 tokens per session, scanned A, original, Apache-2.0.

A repository instruction file for leashd, a Python project with a web interface, tests, and command-line tools. It documents commands for setup, testing, formatting, type checking, and browser-based checks.

In plain words
What is it for?
It helps install dependencies, run selected or complete tests, measure coverage, lint and format code, check types, and run end-to-end browser tests.
Why use it?
It gives contributors a repeatable verification routine, including checks that catch code errors and failures in the web interface.

Instructions file for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

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 instructions/vmehera123/leashd/claude-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 leashd CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/vmehera123/leashd/claude-md.svg)](https://agentmods.dev/instructions/vmehera123/leashd/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/vmehera123/leashd/claude-md"><img src="https://agentmods.dev/badge/instructions/vmehera123/leashd/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,826 This file is loaded in full into every session.
When invoked 1,826 The same file — it is already loaded in full.
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.1 $0.01826 $0.01826
Opus 5 $0.00913 $0.00913
Sonnet 5 $0.00365 $0.00365
Haiku 4.5 $0.00183 $0.00183

Measured 6d ago against content hash 2a7603e076a1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

leashd CLAUDE.md 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.md · 102 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

See @README.md for project overview. Detailed docs in @docs/index.md.

Commands

# Install dependencies
uv sync

# Run tests (single file / specific test / all)
uv run pytest tests/test_policy.py -v
uv run pytest tests/test_policy.py::test_function_name -v
uv run pytest tests/

# Run tests with coverage
uv run pytest --cov=leashd tests/

# Lint + format
uv run ruff check --fix . && uv run ruff format .

# Type check
uv run mypy leashd/

# Full check (lint + format + mypy + tests) — ALWAYS run after implementation work
make check

# E2E tests (Playwright, real browser vs WebUI) — NOT included in `make check`
uv run playwright install chromium   # one-time setup
uv run pytest -m e2e -v
make check-all                       # = make check + E2E

# JS unit tests (WebUI utils.js, Vitest) — NOT included in `make check`
cd tests/js && npm install && npm test

CLI commands are discoverable via leashd --help and leashd <subcommand> --help.

Specs

Before exploring the codebase, read the relevant spec in specs/app/. Start with specs/app/00-quick-reference.md for the file-to-class map, then consult the numbered spec for whichever subsystem you're working on. These are detailed technical references that save significant exploration time. Always verify spec information against the actual source code — specs can drift from the implementation, so treat them as a starting point, not the source of truth.

Code Exploration

For structural "where does this live / what calls it / what shape is it" questions, reach for codebase-memory-mcp first (a SessionStart hook re-injects its tool list each session, so it isn't repeated here). The graph tells you where; it can lag the working tree, so always Read the file to confirm against disk before you Edit — that validation step is mandatory for any non-trivial change. Skip the graph and go straight to Read/Grep/Glob for non-code files (Markdown, YAML, config) and when you already know the path.

Read the full file on GitHub · 102 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 First seen · 102 lines · 1,826 tokens per session scan A 2a7603e076a1

Subscribe to this mod's changes

leashd CLAUDE.md is an instructions file published in the GitHub repository vmehera123/leashd (5 stars, last pushed 11d ago), licensed Apache-2.0. It adds 1,826 tokens to every session, about $0.0091 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.