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/sourceastra/astra-code-map/agents-mdgit clone --depth 1 https://github.com/SourceAstra/astra-code-mapWhat 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.00679 | $0.00679 |
| Opus 5 | $0.00340 | $0.00340 |
| Sonnet 5 | $0.00136 | $0.00136 |
| Haiku 4.5 | $0.00068 | $0.00068 |
Grade A, and why
astra-code-map 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 yesterday.
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.
What it actually says
Repository Guidelines
项目结构
astramap/:核心 Go 实现,包括索引、Tree-sitter 解析、调用图、MCP 服务和 HTTP 服务。cmd/amap/:命令行入口,提供index、dashboard、serve等命令。astramap/web/:Dashboard 的 HTML、CSS 和 JavaScript 前端资源。docs/:设计文档和项目说明;README.md、QUICKSTART.md提供用户级使用文档。.astramap/:本地代码地图数据库和索引状态,不应提交生成数据。
构建、测试与开发
make build # 构建本地 amap 二进制
make test # 运行全部 Go 测试
make vet # 执行 go vet
./amap index --project . # 构建或更新当前项目索引
./amap dashboard --project . # 启动 Web Dashboard
发布 Linux 静态二进制使用 make build-static-linux;该命令要求构建机安装 musl-gcc。修改解析器或索引逻辑后,应重新运行 amap index --full 清理旧索引结果。
代码风格与命名
1.Go 代码使用 gofmt,保持制表符缩进;导出类型、函数和字段使用 PascalCase,内部变量使用 camelCase。错误应带上下文并向上传递。前端 JavaScript 使用现有模块和命名风格,避免引入重复的全局状态。提交前运行 gofmt -w 处理改动过的 Go 文件;
测试指南
测试框架使用 Go 标准库 testing,测试文件命名为 *_test.go,测试函数命名为 TestXxx。当前仓库测试数量较少;新增解析、索引或 API 行为时,应在对应包增加回归测试,并使用 go test ./... 验证。
提交与合并请求
提交信息采用简短的组件前缀和祈使式描述,例如 treesitter.go: narrow heuristic call resolution 或 trace.js: preserve qualified names。合并请求应说明问题、实现范围和验证命令;涉及 Dashboard 的改动附上截图,涉及索引数据的改动说明是否需要重新生成 .astramap 数据。不要提交本地数据库、构建产物或临时截图。
AstraMap 工具约定
询问代码结构时优先使用 AstraMap 工具,而不是 grep 或递归文件搜索:定义用 astramap_search,上下文用 astramap_explore,源码详情用 astramap_node,调用方/被调用方用 astramap_callers / astramap_callees,影响范围用 astramap_impact,调用路径用 astramap_trace,索引状态用 astramap_status。
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.
- yesterday First seen · 39 lines · 679 tokens per session scan A 792284356390
astra-code-map AGENTS.md is an instructions file published in the GitHub repository SourceAstra/astra-code-map (2 stars, last pushed 18d ago), licensed Apache-2.0. It adds 679 tokens to every session, about $0.0034 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
codegraph AGENTS.md
Instructions for lzehrung/codegraph, covering agent directives, general and path, cache, and review safety.
aSPARK-graph CLAUDE.md
Instructions for a-lottes/aSPARK-graph, covering claude.md — aspark-graph, what this is, layout & the one load-bearing convention, non-negotiables (each retired a real risk — don't regress) and using aspark-graph in /peer-review (this repo).
codegraph copilot-instructions.md
Instructions for lzehrung/codegraph: This repository keeps a single source of development guidance. Follow AGENTS.md: AGENTS.md.
codegraph CLAUDE.md
Instructions for lzehrung/codegraph, a project described as: Give your coding agent a map of the repository, not a pile of search results.
roam-code AGENTS.md
Instructions for Cranot/roam-code, covering agents.md — roam-code development guide, what this project is, documentation hub, where files go (private vs public) and quality discipline (from internal/dogfood/ + agi-in-md).
tree-sitter-analyzer CLAUDE.md
Instructions for aimasteracc/tree-sitter-analyzer, covering ruflo — claude code configuration, rules, test quality rules — locked (2026-06-28), t-1: no new test files for existing plugins (blocker) and t-2: no weak assertions — ratchet-enforced (blocker).