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 skills add iliaal/codesage --skill codesage-retrievalgit clone --depth 1 https://github.com/iliaal/codesageWrote 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/iliaal/codesage/codesage-retrieval)<a href="https://agentmods.dev/skills/iliaal/codesage/codesage-retrieval"><img src="https://agentmods.dev/badge/skills/iliaal/codesage/codesage-retrieval/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.
<a href="https://agentmods.dev/skills/iliaal/codesage/codesage-retrieval"><img src="https://agentmods.dev/badge/skills/iliaal/codesage/codesage-retrieval.svg" alt="Reviewed on agentmods" width="80" 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.00045 | $0.03841 |
| Opus 5.5 | $0.00018 | $0.01536 |
| Sonnet 5.5 | $0.00009 | $0.00768 |
| Haiku 4.5 | $0.00005 | $0.00384 |
Grade A, and why
codesage-retrieval 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 17d 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 — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CodeSage retrieval
Establish the project boundary
Use indexed retrieval when .codesage/index.db exists and codesage status succeeds in the repository under work. Otherwise use rg; onboard only when authorized. help works in any existing absolute directory. edit_check works in a Git repository without an index.
Pass the absolute repository root as project on every project-scoped MCP call. Keep repositories separate. The operator tool daemon_stats has daemon scope and no project argument. Reuse the global MCP registration; do not create duplicate project registrations. After upgrading, refresh the plugin and start a new host session if newly advertised tools are unavailable.
Choose by intent and target
Use CodeSage for behavior discovery and code-graph questions. Use find_symbol for definitions and find_references for structural uses. Use rg for literal occurrences, including configuration keys, test names, error messages, documentation, and generated files. Identifier spelling does not choose the tool: every occurrence of TIMEOUT needs literal search; its definition needs a symbol query. Prefer the smallest query that answers the question.
Entity tools take target, or targets for file sets. trace_call_path takes from and to. Accepted forms depend on the tool: sym:, file:, dir:, chunk:, and feat_ handles, indexed paths, path:line, qualified or bare names, route:METHOD path, and cmd:name. Use help to check a tool's allowed forms. Prefer returned handles and candidate choices. A handle identifies the intended entity, but name-based union tools can still return uses or similarity seeds shared by several definitions. Do not supply disagreeing legacy and current argument spellings.
Read freshness by evidence type
Inspect index.structural, index.dirty_paths, and completeness before acting on structural facts. Structural MCP queries can overlay changes to already indexed files with limits of 50 files and 2 MiB of source, and a cooperative 500 ms preparation budget. A successful overlay reports index.structural: "overlay"; changed definitions and source are current within that measured scope. The overlay does not discover newly untracked files. A bound or failure falls back to indexed facts with index.structural: "dirty" and index.overlay.reason; index.overlay.checked_all: false means even the dirty-file scan is incomplete. Follow the recovery command codesage index when the overlay cannot cover the required scope.
What ships with it
2 files 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.
- 17d ago Changed · +78 lines · -28 tokens per session scan B → A d4874936de85
- 24d ago Changed · +1 lines a1d5a7f437d8
- 25d ago Changed · +1 lines 6f800a8f5369
- 1mo ago Changed · +4 lines ab1bd25dab0a
- 1mo ago Changed · +11 lines 81ed18ae5873
- 1mo ago First seen · 67 lines · 73 tokens per session scan B 86372e8051ec
codesage-retrieval is a skill published in the GitHub repository iliaal/codesage (21 stars, last pushed today), licensed MIT. It adds 45 tokens to every session and 3,841 once invoked, about $0.0002 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.
Other skills, from other repositories
rawq
Context retrieval engine. Semantic + lexical hybrid search over codebases. Returns ranked code chunks with file paths, line ranges, scope labels, and confidence scores.
codemeridian-context
Gather minimal, graph-grounded CodeMeridian context before code changes, debugging or test planning, resolving target-folder project contexts and relevant cross-repository dependencies.
human-cognitive-seed
Preserve and strengthen the user's independent reasoning during design, strategy, learning, interpretation, hypothesis work, and consequential decisions, and preserve justified durable context with explicit provenance when supported. Use when a task benefits from human-led judgment, model-building, productive…
memtrace-decision-memory
Use Cortex decision memory through the normal Memtrace MCP tools. Trigger for free-text questions about what was decided, chosen, rejected, banned, or established as a convention; for why a symbol exists or which contracts constrain it; for whether a known decision held, drifted, or was violated; and for the…
memtrace-index
Index a source-code repo into the Memtrace knowledge graph and poll the job to completion. Use when the user asks to index, parse, ingest, reindex, watch, or prepare a source-code repo for Memtrace analysis, when code exploration needs an index, or when searches return 0/partial results for source paths under an…
memtrace-session-continuity
Catch up on everything that changed in an indexed source-code repo since the last session, using stored session anchors and Memtrace change memory. Use when the user asks to continue, catch up, resume, see what changed while away, recover prior context, or orient at session start without guessing timestamps. Do not…