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.
curl -O https://raw.githubusercontent.com/vmehera123/leashd/main/.claude/skills/architecture/SKILL.mdgit clone --depth 1 https://github.com/vmehera123/leashdWrote 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.
[](https://agentmods.dev/skills/vmehera123/leashd/architecture)<a href="https://agentmods.dev/skills/vmehera123/leashd/architecture"><img src="https://agentmods.dev/badge/skills/vmehera123/leashd/architecture.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00075 | $0.01595 |
| Opus 5 | $0.00037 | $0.00797 |
| Sonnet 5 | $0.00015 | $0.00319 |
| Haiku 4.5 | $0.00007 | $0.00160 |
Grade C, and why
architecture scanned grade C with 1 finding 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 8d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
3. **Approval** — `require_approval` → human buttons (interactive) or AI auto-approve (autonomous). Hard-denies (credentials, `rm -rf`, `sudo`, force-push) **can never be overridden** by any approver. How it starts
The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.
leashd architecture
Safety-first agentic coding daemon. Shape: connectors → Engine → middleware → agent runtime, with every tool call the agent makes intercepted by a three-layer safety pipeline, and an EventBus decoupling plugins. This skill is the mental model plus a file map.
Specs drift.
specs/app/has deeper numbered references, but they lag the code —00-quick-reference.mdstill lists deleted modules (task_orchestrator.py,auto_approver.py, …). Treat specs andREADME.mdas starting points; verify every claim against source before relying on it.
Request flow (one user message)
connector (web / telegram) → MultiConnector (chat_id routing)
→ Engine.handle_message → middleware chain (auth, rate limit)
→ agent runtime executes
→ each tool call → Gatekeeper: sandbox → policy → approval
→ streamed response back to the connector
Bootstrap & wiring
main.py:run() → cli.py (argparse router, smart-start) → main.py:start() → one of _run_cli / _run_telegram / _run_web / _run_multi (chosen by which connectors are configured) → app.py:build_engine(config, connector).
build_engine is the single wiring point. In order it constructs: logging → MCP server config → session store + message store (both global at ~/.leashd/) → SessionManager → agent = get_agent(config.agent_runtime, config) → EventBus → PolicyEngine → SandboxEnforcer → AuditLogger → create_builtin_plugins(...) → approval + interaction coordinators (only when a connector exists) → middleware chain → git handler → Engine(...).
Components & where they live
| Concern | Entry point | Notes |
|---|---|---|
| Orchestration | core/engine.py (Engine) |
message loop, streaming, command dispatch, auto-approve mgmt |
| Safety pipeline | core/safety/gatekeeper.py (ToolGatekeeper) |
orchestrates sandbox → policy → approval for every tool call |
| ↳ sandbox | core/safety/sandbox.py (SandboxEnforcer) |
path-scoped to approved dirs |
| ↳ policy | core/safety/policy.py + policies/*.yaml |
allow / deny / require_approval; compound-bash split, deny-wins |
| ↳ approval | core/safety/approvals.py (ApprovalCoordinator) |
human buttons or AI auto-approve |
| ↳ audit | core/safety/audit.py → .leashd/audit.jsonl |
append-only decisions |
| Agent runtimes | agents/registry.py + agents/runtimes/ |
tmux (default), claude-cli, claude-code, codex |
| Connectors | connectors/{web,telegram,multi}.py |
MultiConnector routes by chat_id |
| Middleware | middleware/{auth,rate_limit}.py |
run before the agent |
| Plugins / events | core/events.py (EventBus) + plugins/registry.py |
pub/sub; create_builtin_plugins() registers builtins |
| Autonomous / task | plugins/builtin/task_v4.py, autonomous_loop.py |
/task pipeline and post-task retry |
| Config | core/config.py (LeashdConfig), config_store.py |
env prefix LEASHD_ |
| Storage | storage/{sqlite,memory}.py |
two-tier, see below |
| Web UI / hooks | web/ (app.py, routes.py, ws_handler.py, tmux_hooks.py) |
FastAPI; also hosts the tmux hook receiver |
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.
- 8d ago First seen · 85 lines · 75 tokens per session scan C 77f21de553c3
architecture is a skill published in the GitHub repository vmehera123/leashd (5 stars, last pushed 13d ago), licensed Apache-2.0. It adds 75 tokens to every session and 1,595 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
implementing-llm-guardrails-for-security
Implements input and output validation guardrails for LLM-powered applications to prevent prompt injection, data leakage, toxic content generation, and hallucinated outputs. Builds a security validation pipeline using NVIDIA NeMo Guardrails Colang definitions, custom Python validators for PII detection and content…
autonomous-run
Prepare, start, inspect, resume, or stop a finite local overnight coding run after a human has accepted a Wayfinder terminal spec; coordinates a declared Claude/Codex maker and independent checker without pushing, merging, or writing to external systems.
mutagen
Skill "mutagen" from VKirill/claude-lane-stack, covering 🎯 version requirements (august 2026), usage, use this skill when, do not use this skill when and purpose.
project-design
Roteador de processos de design e marca que carrega orientações para criar arquivos DESIGN.md completos para um projeto e suas aplicações de interface.
docs-maintain
A documentation-maintenance workflow that checks and updates a repository’s living docs after code changes.
lane-memory
A file-based store for durable project facts that cannot be reliably inferred from source code or its module map.