usage

usage is a skill for Claude Code from FreePeak/LeanKG. It costs 27 tokens per session (374 once invoked), scanned A, original, Apache-2.0.

A set of tools for querying LeanKG, a knowledge graph that maps code elements and their relationships. It can help locate code and understand how files, functions, tests, and dependencies connect.

In plain words
What is it for?
Use it to find functions and files, inspect context, trace call chains and imports, check test coverage, and calculate a change's impact radius.
Why use it?
It reduces the need to search files manually and makes it easier to estimate what may be affected by a change.

Skill for Claude Code

Written for Claude Code: a Claude Code plugin manifest.

Part of the leankg plugin — 2 skills, 1 command, 2 hooks shipped together

Good fit Use it to find functions and files, inspect context, trace call chains and imports, check test coverage, and calculate a change's impact radius.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/freepeak/leankg/usage
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.

Any agent
npx skills add FreePeak/LeanKG --skill usage
Clone the repo
git clone --depth 1 https://github.com/FreePeak/LeanKG

Made for: Claude Code.

Or install leankg, the plugin that ships this one along with the rest of its 2 skills, 1 command, 2 hooks.

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 usage

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/freepeak/leankg/usage"><img src="https://agentmods.dev/badge/skills/freepeak/leankg/usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 374 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00027 $0.00374
Opus 5.5 $0.00011 $0.00150
Sonnet 5.5 $0.00005 $0.00075
Haiku 4.5 $0.00003 $0.00037

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

Security

Grade A, and why

usage 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 2mo 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-plugin/skills/usage/SKILL.md · 23 lines

What it actually says

Use LeanKG tools to explore and understand code:

  • mcp_status - Check if LeanKG is initialized
  • mcp_init - Initialize LeanKG for a project: mcp_init { path: "<project>/.leankg" }
  • mcp_index - Index a directory: mcp_index { path: "<project>/src" }
  • search_code - Find code elements: search_code { query: "<function_name>" }
  • find_function - Locate a function: find_function { name: "<name>" }
  • query_file - Find files: query_file { query: "<filename>" }
  • get_impact_radius - Calculate blast radius: get_impact_radius { file: "<path>", depth: <n> }
  • get_dependencies - Get imports: get_dependencies { file: "<path>" }
  • get_dependents - Get dependents: get_dependents { file: "<path>" }
  • get_context - Get file context: get_context { file: "<path>" }
  • get_call_graph - Get call chains: get_call_graph { file: "<path>" }
  • get_tested_by - Get test coverage: get_tested_by { file: "<path>" }

Rule: Use LeanKG first, before grep/ripgrep.

LeanKG auto-initializes on first use. If .leankg does not exist, it creates one automatically. If index is stale (>5 min since last git commit), it re-indexes automatically.

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. 2mo ago First seen · 23 lines · 27 tokens per session scan A c8061aae09c2

Subscribe to this mod's changes

usage is a skill published in the GitHub repository FreePeak/LeanKG (222 stars, last pushed 8d ago), licensed Apache-2.0. It adds 27 tokens to every session and 374 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

potpie-cli

Use when the task is centered on running, explaining, configuring, or troubleshooting the potpie command: doctor, login, pot management, source registration, resolve/search/record, graph workbench reads/writes, resource (document payload) commands, and pot scope behavior.

potpie-ai/potpie · 60 tokens

potpie-debug-memory

Use while debugging or troubleshooting failures, flaky tests, incidents, production alerts, CI failures, local dev setup issues, repeated bugs, prior fixes, failed attempts, and verification history.

potpie-ai/potpie · 41 tokens

omnigraph

Operate OmniGraph graphs and deployments. Use for .pg schemas, .gq queries, OmniGraph CLI commands, file:///s3:///az:// graph URIs, cluster.yaml, operator config, bearer-authenticated servers, graph-backed knowledge or memory, Blob values, embeddings, branches, commits, and change feeds. Apply especially before schema…

ModernRelay/omnigraph · 94 tokens

code-graph

This skill should be used when understanding code structure, finding dependencies between functions/classes, tracing call graphs, or exploring code relationships. Trigger phrases include 'code graph', 'call graph', 'who calls', 'what calls', 'find dependencies', 'code structure', 'inheritance', 'find paths'.

FalkorDB/code-graph · 64 tokens

ops-metrics-analysis

A guided procedure for analyzing 180 days of daily network-operations metrics from a CSV file. It compares service areas and checks connection rate, drop rate, latency, alerts, tickets, SLA performance, and satisfaction.

zj-unicom-ai/UniEmployee · 55 tokens

analyze-type-infer

A compiler analysis step that infers a symbol's type from its assignments. A type describes what kind of value something holds, such as a number, text, or Boolean value.

FuRongJun-1999/dsh-memory · 121 tokens