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/markhuangai/dense-mem/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.svg" alt="Measured on agentmods" 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 | $0.02447 | $0.02447 |
| Opus 5 | $0.01223 | $0.01223 |
| Sonnet 5 | $0.00489 | $0.00489 |
| Haiku 4.5 | $0.00245 | $0.00245 |
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 4d 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 — 223 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.
- 4d 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 2,447 tokens to every session, about $0.0122 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-30.
Other instructions, from other repositories
crystalline CLAUDE.md
Claude Code instructions for jordiboehme/crystalline, covering crystalline, purpose, vocabulary, workspace and commands.
plur CLAUDE.md
Claude Code instructions for plur-ai/plur, covering claude.md, what is plur, development, package dependency and version bumps.
honcho CLAUDE.md
Claude Code instructions for plastic-labs/honcho, covering claude.md, honcho overview, what is honcho?, core concepts and peer paradigm.
llm-wiki-memory AGENTS.md
Instructions for ctxr-dev/llm-wiki-memory, covering agents.md, development discipline (.agents/), layout, tests and conventions.
mfs CLAUDE.md
Instructions for zilliztech/mfs, covering claude.md, what this is, commands, architecture that spans files and connector config: four sources, one source of truth.
dakera-cli CLAUDE.md
Instructions for Dakera-AI/dakera-cli, covering dakera-cli, key commands, architecture and conventions.