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/mansio/mscodebase-intelligence/agents-mdgit clone --depth 1 https://github.com/ManSio/mscodebase-intelligenceWhat 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.07439 | $0.07439 |
| Opus 5 | $0.03719 | $0.03719 |
| Sonnet 5 | $0.01488 | $0.01488 |
| Haiku 4.5 | $0.00744 | $0.00744 |
Grade D, and why
mscodebase-intelligence AGENTS.md scanned grade D with 3 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.
Hidden instructionshighPrompt injection
Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.
<!-- stale-ignore --> Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
r = httpx.post('http://127.0.0.1:8080/v1/embeddings', Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- **NEVER** use `subprocess.run(capture_output=True)` in daemon threads — pipe buffer deadlock on Windows. How it starts
The opening of the file, as written. The whole thing — 471 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Project Agent Rules — MSCodeBase Hybrid Architecture (64 Registered Tools)
Global system prompt / context injection for the AI Agent in Zed IDE. Applied across all projects. Optimized for the hybrid model: 16 Intel Layer + 31 Core MCP (включая
codebasehub + 6 LSP +predict_change) + 13 Inline/Diagnostic + 4 Dev Tools = 64 registered (+1execute_scriptприMSCODEBASE_EXECUTE_SCRIPT_ENABLED=true→ 65)
*
execute_scriptотключён по умолчанию. Включить:MSCODEBASE_EXECUTE_SCRIPT_ENABLED=trueв.env.
0. FIRST STEP IN ANY SESSION
-
Check File-Contract: Артефакты MCP живут ВНЕ проекта (Задача 4/5). progress.json — в системной папке:
<MSCODEBASE_DATA_DIR | %LOCALAPPDATA%/mscodebase | ~/.cache/mscodebase>/projects/<hash8>/progress.json, где<hash8>= md5(normalized project path)[:8] (lower,\\→/). Быстрый способ узнать путь —intel_get_runtime_status(полеprogress_file) илиpython -c "from src.core.artifact_paths import get_progress_file; print(get_progress_file(Path('.').resolve()))". Легаси-путь.mscodebase/progress.jsonв проекте — больше не пишется. -
Read the Diary + Wisdom: Review the first 5 entries in
AGENT_DIARY.mdand readWISDOM.mdцеликом (если существуют) — WISDOM.md загружается всегда, это дистиллят фактов, а не архив. -
Determine MCP Context:
- If
intel_*tools orsearch_codeare available → MCP-FIRST MODE (§0.2). IDE grep/read — только fallback. - If absent → MCP server offline. Work exclusively with
grep,read_file,terminal.
- If
-
Runtime Check (MCP pipe): Call
debug_runtime_passport()— единственная команда проверки «жив ли MCP-процесс».- Ответ с RUN_ID / BUILD_ID / PID → MCP подключён, продолжаем.
- Transport error / «Not connected» → MCP offline, fallback на grep.
- НЕ использовать
intel_get_runtime_statusдля проверки связи — он проверяет embedder/индекс, а не pipe.
-
Load Project Memory: Call
intel_get_project_memory()to learn ADRs, known issues, tech debt. -
⚠️ MULTI-WINDOW CHECK:
intel_get_runtime_status().project_path— ЭТОТ проект видит MCP. Если пользователь говорит о ДРУГОМ проекте (лежит рядом, открыт в другом окне) — НЕ ДОВЕРЯЙ даннымget_index_status()для этого проекта. Вместо этого:- Проверь, открыт ли проект:
ls <путь> - Предупреди пользователя: «Сейчас MCP показывает проект X. Хотите, переключусь на Y?»
- Используй
intel_explain_project_stateдля проверки другого проекта
- Проверь, открыт ли проект:
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 · 471 lines · 7,439 tokens per session scan D ac6982fdf1fb
mscodebase-intelligence AGENTS.md is an instructions file published in the GitHub repository ManSio/mscodebase-intelligence (2 stars, last pushed 3d ago), licensed MIT. It adds 7,439 tokens to every session, about $0.0372 per session on Opus 5. A static security scan graded it D with 3 findings (hidden instructions, sends data to an external url, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
cocoindex AGENTS.md
AGENTS.md instructions for cocoindex-io/cocoindex, covering agents.md, build and test commands, building, testing and code formatting and linting.
moss AGENTS.md
Instructions for usemoss/moss, covering agents.md, what this repo is, repository layout, integrations & cookbooks and framework cookbooks (examples/cookbook/).
memex AGENTS.md
Instructions for nicosuave/memex, covering agents and before committing.
ClawMem CLAUDE.md
Instructions for yoloshii/ClawMem: Claude Code reads CLAUDE.md natively (not AGENTS.md), so this file imports the root SSOT.
Snaptium AGENTS.md
Instructions for jetyu/Snaptium, covering snaptium agent instructions, reference rule files, core behavior, snaptium architecture rules and typescript rules.
grove CLAUDE.md
Instructions for jmilinovich/grove, covering grove, architecture rules, running locally, code conventions and what not to do.