code-context

A repository search skill for finding relevant code across many files using keywords and meaning, with tools for searching, counting, and refreshing the index. A repository is the project’s stored source code.

In plain words
What is it for?
Finding where a feature is handled, understanding how a concept works across a project, ranking related files, and aggregating code topics.
Why use it?
It helps answer broad codebase questions without manually opening every file or needing to know the exact wording used in the code.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/infino-ai/code-context/code-context
Any agent
npx skills add infino-ai/code-context --skill code-context
Clone the repo
git clone --depth 1 https://github.com/infino-ai/code-context

Made for: Claude Code, Codex.

Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,176 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00103 $0.01176
Opus 5 $0.00051 $0.00588
Sonnet 5 $0.00021 $0.00235
Haiku 4.5 $0.00010 $0.00118

Measured yesterday against content hash 28702c9aca7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-context 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 yesterday.

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.

skills/code-context/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

code-context: ranked search over the repository

code-context maintains a local index of the repository (in .infino/ at the repo root) and exposes three MCP tools. The more a question spans the repo, the more one ranked pass beats crawling files into context.

If the tools are deferred

When the tool names appear in a deferred-tools listing but their schemas are not loaded, load all three in ONE ToolSearch call before the first use, e.g. query +code-context search sql reindex (or select: with the exact listed names, comma-separated). Never load them one call at a time.

Choosing the right tool

Situation Use
One known identifier, literal string, or file plain grep / file tools
"How does X work", "where is Y handled", concept without exact name search
Counts, rankings, GROUP BY across the repo ("which files have the most code about X") sql
Working tree changed a lot mid-session reindex (usually unnecessary - see lifecycle)
  • Pass terms, a phrase, or a plain-language description; one pass fuses BM25 keyword matching with semantic similarity, so it works whether or not you know the exact words.
  • One good search beats several narrow ones - put both the identifiers you know and the intent into a single query.
  • Every hit carries path, startLine-endLine, and the chunk content with a relevance score. Answer from the chunk content when it suffices, citing the path:line ranges; open a file only for what the chunks don't show.
  • If a hit is marked truncated, Read exactly its start-end range (offset/limit), not the whole file.
  • k (default 10, max 50) bounds hits; raise it for survey-style questions.
  • Until the index's vector stage finishes, results say they are keyword-ranked; they are still real, cited hits.

sql

One read-only SELECT/WITH statement over the table chunks(path, start_line, end_line, lang, symbol, content[, embedding]). Search functions are callable as table-valued relations, so one query can rank AND aggregate:

Read the full file on GitHub · 108 lines

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. yesterday First seen · 108 lines · 103 tokens per session scan A 28702c9aca7c

Subscribe to this mod's changes

code-context is a skill published in the GitHub repository infino-ai/code-context (26 stars, last pushed 4d ago), licensed Apache-2.0. It adds 103 tokens to every session and 1,176 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

grepai

Replaces ALL built-in search tools. You MUST invoke this skill BEFORE using WebSearch, Grep, or Glob. NEVER use the built-in Grep tool - use grepai instead.

yoanbernabeu/grepai · 43 tokens

graph

Whole-codebase structural map of the codanna index as one self-contained HTML disc. Wedges per top-level module, concentric rings with hubs at the centre, hover or click a symbol to light its edge web, search, hide or highlight modules, brush a date range on the ribbon timeline (symbols dated by git blame), heatmap of…

bartolli/codanna · 131 tokens

recall

Recall this repository's OwnMem local memory before changing code, and keep it healthy. Use when a repository contains .ownmem/, when past debugging lessons could apply ("have we hit this before", "why is it done this way"), or when the user mentions ownmem, project memory, or recalling across sessions.

grpcer/ownmem · 66 tokens

weave

Parallel strand orchestration — decompose a task into 3+ independently scoped strands, fan out real subagents (worktree-isolated when they write files), and coordinate through a session file and Insight Capsules. Use ONLY when the user explicitly invokes it by name or slash command.

entropyvortex/meta-llm-charter · 59 tokens

init

Install or update OwnMem in the current repository. Use when the user asks to set up OwnMem, add local project memory for coding agents, or refresh an existing OwnMem installation after a version bump.

grpcer/ownmem · 43 tokens

mcp-media-inbox-triage

Find media, partnership, and high-intent requests buried in a shared Gmail inbox, summarize the useful ones, and route them to the right owner through Zapier MCP.

zapier/gtm-cheat-codes · 43 tokens