tools: Skill for Claude Code

.claude/skills/context-finder/SKILL.md

context-finder is a skill for Claude Code from adamw7/tools. It costs 118 tokens per session (1,523 once invoked), scanned A, original, MIT.

A guide for selecting the code files an AI agent needs as context, finding class dependencies, building project trees, and estimating token use. It supports Java, Kotlin, and Scala projects and can create Open Knowledge Format (OKF) bundles, which package project context for reuse.

In plain words
What is it for?
Use it to gather dependencies for a file, build a project tree, estimate prompt size, find relevant context, or create an OKF bundle.
Why use it?
It reduces irrelevant code in an agent's input and helps avoid exceeding a model's context limit. It also chooses more accurate class matches when different packages contain classes with the same name.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

This is adamw7/tools's own configuration. It tells Claude Code how to work on tools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tools configures →

View source ↗ adamw7/tools
Reuse

Borrowing it

Nothing to install: this file belongs to adamw7/tools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/adamw7/tools/main/.claude/skills/context-finder/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/adamw7/tools

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 context-finder

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/adamw7/tools/context-finder"><img src="https://agentmods.dev/badge/skills/adamw7/tools/context-finder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,523 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 115
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
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.00118 $0.01523
Opus 5.5 $0.00047 $0.00609
Sonnet 5.5 $0.00024 $0.00305
Haiku 4.5 $0.00012 $0.00152

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

Security

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 1mo 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/skills/context-finder/SKILL.md · 116 lines

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.

Read the full file on GitHub · 116 lines

Files

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.

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. 1mo ago First seen · 116 lines · 118 tokens per session scan A 9492c162b777

Subscribe to this mod's changes

context-finder is a skill published in the GitHub repository adamw7/tools (11 stars, last pushed today), licensed MIT. It adds 118 tokens to every session and 1,523 once invoked, about $0.0005 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

sales-forecast

Forecast sales from historical data using trend and seasonality, with confidence bands, scenarios, sensitivity analysis and an assumptions note, delivered as an Excel workbook.

genspark-ai/genoffice · 33 tokens

startup-ceo

CEO coordinator that dispatches research, strategy, finance, and writer specialists via A2A and synthesizes their findings into a GO/NO-GO investment briefing. Use for multi-agent advisory workflows.

Atmosphere/atmosphere · 44 tokens

finance-agent

Financial analyst for startup economics — TAM/SAM/SOM, revenue projections, burn rate, runway, and break-even. Use when building financial models or evaluating investment cases.

Atmosphere/atmosphere · 37 tokens

billing-agent

Billing specialist for invoices, payments, refunds, and plan changes. Use when customers ask about charges, billing inquiries, or subscription management; typically reached via handoff from the support agent.

Atmosphere/atmosphere · 40 tokens

fsc-data-model

Use when designing, querying, or troubleshooting the Financial Services Cloud data model — including managed-package (FinServ namespace) and Core FSC (standard objects, no namespace) object structures, household relationship modeling, financial account ownership, and the FSC rollup framework. Trigger keywords: FSC…

skillmds/skillmd · 139 tokens

802-regulations-dora

Use when reviewing, designing, or modifying Java enterprise systems that may support financial entities, critical ICT services, third-party ICT provider integrations, or operational resilience obligations under DORA. This should trigger for requests such as Review a Java platform for DORA ICT risk controls; Design…

jabrena/plinth · 97 tokens