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 instructions/abdul-hamid-achik/codemap/agents-mdgit clone --depth 1 https://github.com/abdul-hamid-achik/codemapWrote 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/instructions/abdul-hamid-achik/codemap/agents-md)<a href="https://agentmods.dev/instructions/abdul-hamid-achik/codemap/agents-md"><img src="https://agentmods.dev/badge/instructions/abdul-hamid-achik/codemap/agents-md.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.10971 | $0.10971 |
| Opus 5 | $0.05486 | $0.05486 |
| Sonnet 5 | $0.02194 | $0.02194 |
| Haiku 4.5 | $0.01097 | $0.01097 |
Grade A, and why
codemap AGENTS.md 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 — 515 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Instructions for AI agents (and humans) working on the codemap codebase. This is the
canonical source-of-truth doc; CLAUDE.md defers to it. README.md is the public-facing
intro; product usage lives in docs/, including docs/configuration.md and the public
agent guide at docs/agents.md. The design rationale (architecture, why-it-is-what-it-is)
lives in the Obsidian vault at ~/notes/projects/codemap/design-rationale.md. Live work is
tracked in the vault's BACKLOG.md (~/notes/projects/codemap/BACKLOG.md) — not in the repo.
Project Overview
codemap is local-first code intelligence: it combines a structural code graph (LSP + stdlib parsers; tree-sitter remains planned and is not shipped) with semantic retrieval (local veclite plus an optional one-hop vecgrep fallback, or vecgrep as the explicit owner) and exposes both as a unified query layer for agents and people. It answers questions a grep or a single LSP call cannot — "who calls this and what tests cover it", "what's the blast radius of changing this type across all my projects", "find auth-like code, then show me what calls it."
Two surfaces over one structural store (semantic retrieval may be delegated to vecgrep):
- CLI — human commands and
--jsonmachine output for agents (Cobra). - MCP server —
codemap serve(stdio),codemap_*tools for agents.
Product docs for humans start at docs/quick-start.md; agent workflows at docs/agents.md and docs/mcp.md. The former Studio TUI is not shipped — use CLI + MCP instead (see docs/studio.md).
Key features:
- Structural graph — nodes (files, functions, types, methods, tests) +
calls/definesedges in pure-Go SQLite (Go, Ruby, and Lua call edges are name-based by default, Go exact viago/typeswith--precise; base TS/JS gets name-based JSX component-usage call edges, import edges, and Next.js framework-wiring references viatsscan, while plain TS/JS/Python function-call edges come only from--preciseviacallHierarchy; Vue SFC script blocks currently produce symbols +defines+ import edges but no call graph; Go callback/handler uses and TS/JS framework wiring are persisted asreferences; Go imports are package-scoped evidence, TS/JS/Vue/Ruby/Lua imports resolve file→file;implements/overridesremain reserved for planned backends). - Local semantic search — under the
local/fallbackbackend with embeddings enabled, node source text is embedded through the configured Ollama-compatible endpoint (http://localhost:11434andnomic-embed-text, 768-dim, by default) into veclite; vector + BM25 hybrid (RRF) search. A remote endpoint is explicit opt-in and receives the source text sent for embedding. - Hybrid queries —
codemap_context(one-call source + wiring + impact),codemap_impact(blast radius + test coverage),codemap_review(diff → impact + tests), and confidence-aware file dependency analysis. - Cross-project — the graph spans all registered projects.
- Incremental — hash-based reindex; embedding-profile guard forces rebuild on provider/model/dimensions/distance change.
- Offline structural queries — the stored graph remains queryable without LSP servers running; one-off precise callers/callees may launch the appropriate server, and semantic retrieval depends on whichever local or delegated backend is configured.
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 · 515 lines · 10,971 tokens per session scan A aee391d73bdd
codemap AGENTS.md is an instructions file published in the GitHub repository abdul-hamid-achik/codemap (2 stars, last pushed 6d ago), licensed MIT. It adds 10,971 tokens to every session, about $0.0549 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-31.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.