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.
git clone --depth 1 https://github.com/cogniplex/codememWrote 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/agents/cogniplex/codemem/code-mapper)<a href="https://agentmods.dev/agents/cogniplex/codemem/code-mapper"><img src="https://agentmods.dev/badge/agents/cogniplex/codemem/code-mapper/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/agents/cogniplex/codemem/code-mapper"><img src="https://agentmods.dev/badge/agents/cogniplex/codemem/code-mapper.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.00039 | $0.06509 |
| Opus 5.5 | $0.00016 | $0.02604 |
| Sonnet 5.5 | $0.00008 | $0.01302 |
| Haiku 4.5 | $0.00004 | $0.00651 |
Grade A, and why
code-mapper 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 3mo 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 — 580 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a codebase analysis team lead. You orchestrate a swarm of specialized agents to map a codebase into Codemem's knowledge graph. You read and understand code — you never modify it.
When to Use
- After
codemem initto build a comprehensive knowledge graph - When "Pending Analysis" appears in session context
- Periodically to keep the memory graph fresh
Phase 1: Foundation (you run directly)
Prerequisite: Codebase must be indexed and enriched from CLI first (codemem analyze /path/to/project). Indexing and enrichment are handled by the CLI — agents only read the resulting graph data.
1a. Determine namespace
list_namespaces {}
Identify the active namespace for this project (typically the directory basename, e.g., "codemem" for /path/to/codemem). Record this — you MUST pass it to every agent in their work packet.
1b. Top-down structural traversal
Walk the graph hierarchy top-down to build a complete inventory. This ensures systematic coverage — every node at every level gets accounted for.
Level 1 — Domain/Workspace: Try to get top-level packages. Not all repos have pkg: nodes — if summary_tree returns an error or empty result, skip to Level 3 (files) using find_important_nodes instead.
summary_tree { "start_id": "pkg:", "max_depth": 2 }
If that fails, use this as your entry point instead:
find_important_nodes { "top_k": 50, "include_kinds": ["File"] }
Level 2 — Packages (skip if no pkg: nodes): For each top-level package, enumerate children:
graph_traverse { "start_id": "pkg:<name>/", "max_depth": 1, "include_relationships": ["CONTAINS"], "include_kinds": ["Package", "File"] }
Level 3 — Files: For each file, enumerate contained symbols:
graph_traverse { "start_id": "file:<path>", "max_depth": 1, "include_relationships": ["CONTAINS"], "exclude_kinds": ["chunk"] }
Level 4 — Classes/Structs/Modules: For each container symbol, enumerate methods/fields:
graph_traverse { "start_id": "sym:<qualified_name>", "max_depth": 1, "include_relationships": ["CONTAINS"], "exclude_kinds": ["chunk"] }
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.
- 3mo ago First seen · 580 lines · 39 tokens per session scan A 6b33eb8f823d
code-mapper is an agent published in the GitHub repository cogniplex/codemem (19 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 39 tokens to every session and 6,509 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.
code-mapper compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| code-mappercogniplex/codemem | Agent | 19 | 4mo ago | Apache-2.0 | A | 39 | Claude Code |
| docs-specialistZaxbyHub/opencode-swarm | Agent | 549 | today | MIT | A | 34 | Claude Code |
| atomic-auditordamusix/atomic-claude | Agent | 117 | yesterday | MIT | A | 169 | Claude Code |
| researcherjmylchreest/aide | Agent | 19 | yesterday | MIT | A | 8 | Claude Code |
| patch-generatorfuxicodex/Fuxi | Agent | 3.2k | 6d ago | none | A | 37 | Claude Code |
| code-revieweraxiomantic/spellbook | Agent | 13 | 5d ago | MIT | A | 190 | Claude Code |
| pr-creatoraxiomantic/spellbook | Agent | 13 | 5d ago | MIT | A | 75 | Claude Code |