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 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.
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.
- 1mo ago First seen · 580 lines · 39 tokens per session scan A 6b33eb8f823d
code-mapper is an agent published in the GitHub repository cogniplex/codemem (18 stars, last pushed 2mo 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.
Other agents, from other repositories
atomic-auditor
Final gate for a finished implementation. Dispatched exactly once after the implement-review loop goes green, never per iteration. Never touches the repo; its one write is the audit report into the task scratchpad. Audits the delivered work as a whole: cumulative spec compliance, cross-iteration coherence…
researcher
External documentation and API research.
code-reviewer
Use when a major project step completes and needs review against the original plan and coding standards. Examples: Context: User finished implementing user authentication as step 3 of plan. user: "I've finished implementing the user authentication system as outlined in step 3 of our plan" assistant: "Let me use the…
patch-generator
Implements the fix for one finding inside a scratch workspace clone, staged for review and delivery as a patch file; dispatched by the fix job, not for direct invocation.
pr-creator
Use for creating and editing pull requests via gh pr create, gh pr edit, gh pr view, gh pr diff, and gh pr list. Does NOT merge or mark ready (use pr-merger for that). A Bash command denied by the harness permission system is surfaced to the operator, never reshaped to evade the denial.
semble-search
Code search agent for exploring any codebase. Use for finding code by intent, locating implementations, understanding how something works, or discovering related code. Prefer over shell/read tools for any semantic or exploratory question.