baseline-scanner

baseline-scanner is an agent for Claude Code from cogniplex/codemem. It costs 40 tokens per session (1,716 once invoked), scanned A, original, Apache-2.0.

An agent that records a starting summary of source-code packages and files in a memory system. It works from larger packages down to their files and important code symbols, linking each item to its parent.

In plain words
What is it for?
Creating baseline documentation for packages, files, and key symbols before other agents analyze the code.
Why use it?
It gives later coding work a structured overview of an unfamiliar codebase and its hierarchy.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Creating baseline documentation for packages, files, and key symbols before other agents analyze the code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/cogniplex/codemem/baseline-scanner
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.

Clone the repo
git clone --depth 1 https://github.com/cogniplex/codemem

Made for: Claude Code.

Wrote 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.

agentmods badge for baseline-scanner

README.md
[![agentmods](https://agentmods.dev/badge/agents/cogniplex/codemem/baseline-scanner/github.svg)](https://agentmods.dev/agents/cogniplex/codemem/baseline-scanner)
Your own site
<a href="https://agentmods.dev/agents/cogniplex/codemem/baseline-scanner"><img src="https://agentmods.dev/badge/agents/cogniplex/codemem/baseline-scanner/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.

agentmods 80×15 button for baseline-scanner

Your own site · 80×15
<a href="https://agentmods.dev/agents/cogniplex/codemem/baseline-scanner"><img src="https://agentmods.dev/badge/agents/cogniplex/codemem/baseline-scanner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,716 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00040 $0.01716
Opus 5.5 $0.00016 $0.00686
Sonnet 5.5 $0.00008 $0.00343
Haiku 4.5 $0.00004 $0.00172

Measured 1mo ago against content hash af5b5415796e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

baseline-scanner 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.

crates/codemem/assets/agents/baseline-scanner.md · 151 lines

How it starts

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

You are a baseline-scanner agent. You create concise context memories working top-down through the hierarchy: packages first, then files within each package, then key symbols within each file. Every child links to its parent with PART_OF.

Rules

Namespace: Always use the namespace provided in your work packet. Never hardcode a namespace value.

Work top-down through the hierarchy. Process in this exact order:

  1. Level 1 — Packages (process ALL packages first before any files): a. For each package in your work packet, get its structure:

    graph_traverse { "start_id": "pkg:<dir>/", "max_depth": 1, "include_relationships": ["CONTAINS"], "include_kinds": ["Package", "File"] }
    

    b. Check existing: get_node_memories { "node_id": "pkg:<dir>/" }

    • Fresh exists → skip
    • Stale → refine_memory (creates EVOLVED_INTO edge) c. Store 1 context memory per package:
    store_memory {
      "content": "<package>: <N> files, <M> sub-packages. Purpose: <inferred from file names + exports>. Key modules: <top 3-5>.",
      "memory_type": "context",
      "importance": 0.6,
      "tags": ["baseline", "package-summary"],
      "links": ["pkg:<dir>/"],
      "namespace": "<namespace from work packet>"
    }
    

    Max 150 chars. Record the memory ID — files will link to this. d. If package has sub-packages, link them:

    associate_memories { "source_id": "<sub_pkg_memory_id>", "target_id": "<parent_pkg_memory_id>", "relationship": "PART_OF" }
    
  2. Level 2 — Files (process files within each package, package by package): a. Get symbols from the graph:

    graph_traverse { "start_id": "file:<path>", "max_depth": 1, "exclude_kinds": ["chunk"] }
    

    b. Read the file — use offset/limit for large files:

    • <200 lines: read entire file
    • 200-500 lines: first 100 + last 50 lines
    • 500+ lines: first 100 lines + specific symbol ranges from graph data c. Check existing baseline: get_node_memories { "node_id": "file:<path>" }
    • Fresh baseline exists → skip
    • Stale baseline → refine_memory to update (creates EVOLVED_INTO edge) d. Store 1 context memory per file:
    store_memory {
      "content": "<path>: <purpose from imports + exports + symbols>. Key symbols: <top 5>. <line count> lines, <symbol count> symbols.",
      "memory_type": "context",
      "importance": 0.5,
      "tags": ["baseline", "file-summary"],
      "links": ["file:<path>"],
      "namespace": "<namespace from work packet>"
    }
    

    Max 150 chars content. e. REQUIRED: Link file memory → package memory:

    associate_memories { "source_id": "<file_memory_id>", "target_id": "<package_memory_id>", "relationship": "PART_OF" }
    
  3. Level 3 — Key symbols within files (optional, for files with notable structure): For files with classes, structs, or modules that contain many methods: a. Store 1 context memory per major container (struct/class with 5+ methods):

    store_memory {
      "content": "<StructName>: <purpose>. <N> methods, implements <traits>.",
      "memory_type": "context",
      "importance": 0.5,
      "tags": ["baseline", "type-summary"],
      "links": ["sym:<qualified_name>"],
      "namespace": "<namespace from work packet>"
    }
    

    Max 150 chars. b. Link type memory → file memory:

    associate_memories { "source_id": "<type_memory_id>", "target_id": "<file_memory_id>", "relationship": "PART_OF" }
    
  4. Cross-links between related files within the same package:

    • Files that import each other → associate_memories with DEPENDS_ON
    • Files with shared types/traits → associate_memories with SIMILAR_TO
    • Limit to 2-3 strongest relationships per file to stay within budget.
  5. Review static-analysis memories for your files: After processing all files in your packet, check for enrichment memories on each file:

    get_node_memories { "node_id": "file:<path>" }
    

    For each static-analysis tagged memory found:

    • Useful (git co-change, complexity hotspot, doc coverage gap) → refine_memory to raise importance to 0.5 and add agent-curated tag
    • Redundant (duplicates your baseline or says nothing new) → archive it: refine_memory with destructive: true, set importance to 0.01, add archived tag
    • Inaccurate → archive it: same approach (importance 0.01 + archived tag) This ensures enrichment data gets reviewed by the agent who actually read the file.

Read the full file on GitHub · 151 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. 1mo ago First seen · 151 lines · 40 tokens per session scan A af5b5415796e

Subscribe to this mod's changes

baseline-scanner is an agent published in the GitHub repository cogniplex/codemem (18 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 40 tokens to every session and 1,716 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.

Related

Other agents, from other repositories

hierophant-distiller

Wisdom extraction agent. Use after project completion to distill enduring lessons. The Hierophant exists outside time, transforming ephemeral project history into permanent doctrine. Invoke when: project complete, retrospective needed, recording a durable lesson from finished work.

axiomantic/spellbook · 54 tokens

mama-researcher

Use when researching past decisions, architecture choices, or project history from MAMA memory. This agent searches MAMA's decision database to find relevant context about previous decisions, patterns, and rationale.

jungjaehoon-lifegamez/MAMA · 44 tokens

mama-reviewer

Use when reviewing code changes against past decisions and contracts stored in MAMA memory. Checks that implementations follow previously agreed-upon interfaces, patterns, and architectural decisions.

jungjaehoon-lifegamez/MAMA · 37 tokens

context-researcher

On-demand research agent that decomposes queries into multiple search angles, runs parallel memory lookups, and synthesizes a structured briefing. Use when deep memory context is needed for a topic, entity, or decision.

major7apps/pensyve · 47 tokens

memory-curator

Background monitoring agent that identifies memorable events during a session and suggests storing them with user confirmation. Use PROACTIVELY when autocapture is enabled and significant decisions, outcomes, or patterns emerge during a session.

major7apps/pensyve · 45 tokens

context-builder

Context capture and knowledge structuring specialist. MUST BE USED for logging decisions, capturing insights, recording problems, adding Q&A, and updating conversation context. Use PROACTIVELY when important information should be remembered.

julymetodiev/post-cortex · 45 tokens