Borrowing it
Nothing to install: this file belongs to markhuangai/dense-mem. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/markhuangai/dense-mem/main/AGENTS.mdgit clone --depth 1 https://github.com/markhuangai/dense-memWrote 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/instructions/markhuangai/dense-mem/agents-md)<a href="https://agentmods.dev/instructions/markhuangai/dense-mem/agents-md"><img src="https://agentmods.dev/badge/instructions/markhuangai/dense-mem/agents-md/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/instructions/markhuangai/dense-mem/agents-md"><img src="https://agentmods.dev/badge/instructions/markhuangai/dense-mem/agents-md.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.03338 | $0.03338 |
| Opus 5.5 | $0.01335 | $0.01335 |
| Sonnet 5.5 | $0.00668 | $0.00668 |
| Haiku 4.5 | $0.00334 | $0.00334 |
Grade A, and why
dense-mem 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 22d 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 — 283 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dense-Mem Repository Guidance
Project Context
- Dense-Mem is a standalone MCP Streamable HTTP memory service. The host decides when memory is useful; Dense-Mem owns evidence intake, semantic lifecycle, provenance, retrieval, trace, authorization, and audit.
- For non-trivial architecture work, query the Dense-Mem project-memory MCP
first with
assemble_contextorrecall_memory. Treat recalled items as context; explicit user direction and verified repository state still govern. - Keep project memory current after approved architecture decisions, verified implementation milestones, corrections, or conformance gaps. Store concise entries without credentials or local filesystem paths.
- Do not add repository references to local paths for separately maintained documentation. State the invariant directly in this repository.
- Inspect current code, interfaces, migrations, callers, and tests before changing behavior. Distinguish transitional implementation from the target architecture instead of assuming either one fully describes the other.
Architecture Decision Records
- Accepted repository architecture decisions live in
adr/. Before non-trivial design, implementation, or review, enumerateadr/*.mdand read every accepted record relevant to the affected behavior. - Accepted ADRs describe the governing target. A transitional implementation may differ only when the ADR states its bounded rationale and removal condition; do not widen that exception or treat the transition as the completed architecture.
- A new or edited ADR in the current change cannot authorize accompanying code by itself. Explicit maintainer direction governs a new decision, and a later ADR must identify any accepted record that it supersedes.
Current Stack
- Go 1.26 with Echo v4; PostgreSQL access uses GORM/pgx and goose migrations;
validation uses
go-playground/validator/v10; Redis usesgo-redis/v9. - Configuration is loaded from environment variables through
internal/config. Do not introduce a second configuration framework. - The browser applications use React/Vite with Vitest and Playwright. Follow
their existing component and test patterns when changing
web/. - HTTP success responses use
internal/http/responseand the{ "data": ... }envelope. Public errors are typed and bounded through existing error helpers.
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.
- 22d ago Changed · +3 lines · +41 tokens per session 6ea96cc91eeb
- 1mo ago Changed · +5 lines · +75 tokens per session c79b79438ffa
- 1mo ago Changed · +6 lines · +86 tokens per session ee3e0957256f
- 1mo ago Changed · +41 lines · +600 tokens per session 80813075086e
- 2mo ago Changed · +5 lines · +89 tokens per session 4d57569b954d
- 2mo ago First seen · 223 lines · 2,447 tokens per session scan A 5f01bfff887b
dense-mem AGENTS.md is an instructions file published in the GitHub repository markhuangai/dense-mem (39 stars, last pushed today), licensed Apache-2.0. It adds 3,338 tokens to every session, about $0.0134 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.
dense-mem AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dense-mem AGENTS.mdmarkhuangai/dense-mem | Instructions file | 39 | today | Apache-2.0 | A | 3,338 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 275k | 3d ago | MIT | A | 4,313 | Codex, OpenCode |