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 skills/adamw7/tools/context-findernpx skills add adamw7/tools --skill context-findergit clone --depth 1 https://github.com/adamw7/toolsWrote 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/adamw7/tools/context-finder)<a href="https://agentmods.dev/skills/adamw7/tools/context-finder"><img src="https://agentmods.dev/badge/skills/adamw7/tools/context-finder.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 | $0.00118 | $0.01523 |
| Opus 5 | $0.00059 | $0.00762 |
| Sonnet 5 | $0.00024 | $0.00305 |
| Haiku 4.5 | $0.00012 | $0.00152 |
Grade A, and why
context-finder 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.
How it starts
The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context Finder Skill
Use code/context to answer "which classes does this file actually need?" and
"how many tokens will that cost?" — the module behind the project_tree,
find_context, estimate_tokens and okf_bundle MCP tools.
The core contract
public interface Context {
Set<ClassContainer> find(ClassContainer root, int depth);
}
A ClassContainer is just a className (the file name) plus its
originalCode. depth bounds a breadth-first expansion, so nearest
dependencies come first — which is what makes budgeting meaningful.
Load a project's sources with new ProjectSources(Language.JAVA).load(root),
which returns Map<Path, ClassContainer>. Languages: JAVA (.java),
KOTLIN (.kt), SCALA (.scala).
Pick the right finder
| Finder | Resolves by | Use when |
|---|---|---|
Finder |
simple file name, indexed once at construction | one class per simple name; fastest |
PackageAwareFinder |
package + import declarations |
two classes share a simple name in different packages |
PackageAwareFinder prefers, in order: an explicit import, the referencing
file's own package, a wildcard import, then a sole project-wide candidate — and
leaves a genuinely ambiguous reference unresolved rather than guessed. Both
strip comments and string/character literals before matching, so a class name
mentioned in a comment is not reported as a dependency. The
package/import grammar is shared by all three languages.
Budgeting
BudgetedContext decorates any Context: it keeps the delegate's breadth-first
order and accepts containers until the next one would exceed the budget, so you
keep the highest-priority prefix of the graph.
Context context = new BudgetedContext(new Finder(containers), new SubwordTokenEstimator(), 8_000);
Estimators implement TokenEstimator: SubwordTokenEstimator (respects word
and symbol boundaries — the better default) and HeuristicTokenEstimator.
Project tree
ProjectTreeBuilder(contextFactory, language, depth).build(root) returns a
ProjectTreeNode. Serialize with a ProjectTreeSerializer:
ProjectTreeJsonSerializer (the MCP default), …Markdown…, …Dot… (Graphviz),
…Mermaid…, or print with ProjectTreePrinter. The builder takes a
ContextFactory, so a different finder can be substituted without touching the
builder — add a serializer or a factory rather than branching inside the
builder.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 4d ago First seen · 116 lines · 118 tokens per session scan A 9492c162b777
context-finder is a skill published in the GitHub repository adamw7/tools (11 stars, last pushed yesterday), licensed MIT. It adds 118 tokens to every session and 1,523 once invoked, about $0.0006 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-30.
Other skills, from other repositories
ccxt-java
CCXT cryptocurrency exchange library for Java developers. Covers both REST API (standard) and WebSocket API (real-time). Helps install CCXT, connect to exchanges, fetch market data, place orders, stream live tickers/orderbooks, handle authentication, and manage errors in Java projects. Use when working with crypto…
fin-data-acquisition
根据REFINEDDESIGN.md中的变量定义,自动获取所需数据并生成可执行的回归分析脚本(Python/Stata)。.
agent-guidance-boundary-guard
Use when auditing SHAFT agent guidance, host adapters, hooks, guidance budgets, or retrieval setup.
load-tests
Run the VibeTags benchmark harness in load-tests/ and report the numbers honestly — annotation-volume and memory sweeps, JMH hot-path and cache-hit microbenchmarks, the processor-tax control — then record a release baseline under load-tests/results/. Use when the user says "load tests", "benchmarks", "capture a…
fruit-pi
全球水果价格收集与查询。管理水果池,自动采集榴莲/荔枝/樱桃等水果每日批发价,支持国内外报价,RMB/公斤换算。Fruit price tracker for global fruits, wholesale market data, agricultural commodity prices.
llmquant-data
Router skill for LLMQuant Data primitive workflows. Use when the user needs SEC filings, 13F holders, macro snapshots, or source-grounded macro briefs.