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.
npx agentmods add instructions/freepeak/leankg/claude-mdgit clone --depth 1 https://github.com/FreePeak/LeanKGWrote 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/instructions/freepeak/leankg/claude-md)<a href="https://agentmods.dev/instructions/freepeak/leankg/claude-md"><img src="https://agentmods.dev/badge/instructions/freepeak/leankg/claude-md.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.02396 | $0.02396 |
| Opus 5 | $0.01198 | $0.01198 |
| Sonnet 5 | $0.00479 | $0.00479 |
| Haiku 4.5 | $0.00240 | $0.00240 |
Grade A, and why
LeanKG CLAUDE.md scanned grade A 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 today.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
1. `curl http://localhost:9699/health` — Docker MCP up? How it starts
The opening of the file, as written. The whole thing — 208 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LeanKG - AI Agent Context
Project Overview
LeanKG is a lightweight knowledge graph for codebase understanding. It indexes code, builds dependency graphs, calculates impact radius, and exposes everything via MCP for AI tool integration.
Tech Stack: Rust + PostgreSQL/pgvector + tree-sitter + MCP
Quick Start
# Index a codebase
cargo run -- init
cargo run -- index ./src
# Calculate impact radius
cargo run -- impact src/main.rs 3
# Start MCP server
cargo run -- serve
Development Workflow
When implementing features, follow: docs/workflow-opencode-agent.md
Pattern: Update Docs → Implement → Test → Commit → Push → Bump Version → Tag
- Update docs first - Consolidated PRD+HLD (
docs/prd.md) → README as needed - Implement - Follow patterns in
docs/workflow-opencode-agent.md - Build & test -
cargo build && cargo test - Commit -
git commit -m "feat: description"(one feature per commit) - Push -
git pull --rebase && git push - Bump version - Update
versioninCargo.toml - Tag -
git tag -a v<version> -m "Release v<version>" && git push origin v<version>(after version bump)
Commit Message Rules
- NEVER add
Co-Authored-By: Claude Opus 4.6 <[email protected]>to commits - NEVER add
🤖 Generated with Claude Codeor similar AI attribution - NEVER add "Generated by" phrases in PR descriptions
Key Commands
IMPORTANT: Always use --release flag for builds. Debug builds are disabled.
cargo build --release # Build project (release)
cargo test # Run tests
cargo run --release -- <cmd> # Run CLI commands
Important Files
| File | Purpose |
|---|---|
src/lib.rs |
Module exports |
src/db/models.rs |
Data models (CodeElement, Relationship, BusinessLogic) |
src/graph/query.rs |
Graph query engine |
src/mcp/tools.rs |
MCP tool definitions |
src/mcp/handler.rs |
MCP tool handlers |
src/indexer/extractor.rs |
Code parsing with tree-sitter |
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.
- today Changed · +4 tokens per session c28f5eb5ba75
- 6d ago First seen · 208 lines · 2,392 tokens per session scan A 028cd759fa1b
LeanKG CLAUDE.md is an instructions file published in the GitHub repository FreePeak/LeanKG (216 stars, last pushed today), licensed Apache-2.0. It adds 2,396 tokens to every session, about $0.0120 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
m_flow AGENTS.md
AGENTS.md instructions for FlowElement-xinliuyuansu/m_flow, covering m-flow — developer & agent reference, 1. repository map, extension points, 2. local development and python backend (requires python 3.10 – 3.13).
omnigraph AGENTS.md
AGENTS.md instructions for ModernRelay/omnigraph, covering omnigraph agent guide, required reading, repository snapshot, documentation map and engineering rules.
samyama-graph CLAUDE.md
Claude Code instructions for samyama-ai/samyama-graph, covering claude.md, project overview, build & development commands, build and run tests (1814 unit tests).
kglite CLAUDE.md
Claude Code instructions for kkollsga/kglite, covering kglite — claude code conventions, build & test, architecture, the boundary principle (wrappers vs core) — summary and in-memory is the core product.
vellis AGENTS.md
AGENTS.md instructions for volantlabs/vellis, covering agents.md, repository purpose, startup checks, installing vellis for a user and model-first component workflow.
kivgraph AGENTS.md
AGENTS.md instructions for Luqueee/kivgraph, covering instrucciones de desarrollo de kivgraph, mapa de instrucciones, identidad del proyecto, qué pregunta contesta cada tool de kivgraph and la puerta delante de grep.