codescout CLAUDE.md

An instruction guide for CodeScout, a Rust server that helps AI assistants navigate and search source code by symbols and meaning. It also covers the project’s development and live-server workflow.

In plain words
What is it for?
Developing CodeScout, running formatting, linting, and tests, building its release version, and updating the live MCP server.
Why use it?
It tells the agent which commands and build target to use, helping changes reach the server being tested.

Instructions file

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.

agentmods
npx agentmods add instructions/mareurs/codescout/claude-md
Clone the repo
git clone --depth 1 https://github.com/mareurs/codescout
Per session 10,376 This file is loaded in full into every session.
When invoked 10,376 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
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 $0.10376 $0.10376
Opus 5 $0.05188 $0.05188
Sonnet 5 $0.02075 $0.02075
Haiku 4.5 $0.01038 $0.01038

Measured 2d ago against content hash f0db7bb8b4f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

codescout CLAUDE.md scanned grade B with 1 finding 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 2d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Auto-detects codescout from `.mcp.json` or `~/.claude/settings.json`
CLAUDE.md · 678 lines

How it starts

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

codescout

Rust MCP server giving LLMs IDE-grade code intelligence — symbol-level navigation, semantic search, git integration. Inspired by Serena.

You are a proficient Rust developer. You follow all known good/scalable patterns. You are honest and recognize your limits and your mistakes, you own them. If you are not sure, you always ask me for feedback.

Development Commands

See codescout memory development-commands for the full command reference.

Always run cargo fmt, cargo clippy, and cargo test before completing any task.

On our current stack the release build is cargo rb, not cargo build --release (the latter is the lean default repo cloners get). See the development-commands memory for what the alias compiles in and why.

To test changes via the live MCP server, run cargo rb, then restart the server with /mcp. The MCP server launches ~/.cargo/bin/codescout (see the command in ~/.claude/.claude.json), which is a symlink → target/release/codescout, so a release build alone updates the live binary — no cargo install needed. Dev builds (cargo test/cargo build) are a separate artifact and are NOT picked up.

If the symlink is missing (e.g. after cargo clean removed target/, or a fresh checkout), recreate it once:

ln -sf "$(pwd)/target/release/codescout" ~/.cargo/bin/codescout

Without the symlink, ~/.cargo/bin/codescout is a stale installed copy and /mcp reconnects keep loading old code even after a successful build. (Symlink, not hardlink: cargo build rename-replaces the file, so a hardlink would resolve to the old inode.)

Bug Tracking

Per-file bug tracking lives in docs/issues/. Every bug noticed during work gets its own file, copied from docs/issues/_TEMPLATE.md.

  • Path: docs/issues/YYYY-MM-DD-<slug>.md for active bugs; docs/issues/archive/ only after the fix has shipped to master (verify via git branch --contains <fix-sha>).
  • Slug: short kebab-case noun-phrase (3–6 words), e.g. edit-code-insert-mid-function, reindex-cascade-delete-data-loss.
  • Status field in frontmatter: open | investigating | fixed | mitigated | wontfix | zombie (semantics in _TEMPLATE.md's header comment). zombie = no longer observed, root cause unconfirmed; pair with last_observed: and a re-open trigger.
  • closed: date in frontmatter alongside any of fixed / mitigated / wontfix.

Read the full file on GitHub · 678 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. 2d ago First seen · 678 lines · 10,376 tokens per session scan B f0db7bb8b4f9

Subscribe to this mod's changes

codescout CLAUDE.md is an instructions file published in the GitHub repository mareurs/codescout (21 stars, last pushed 2d ago), licensed MIT. It adds 10,376 tokens to every session, about $0.0519 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.