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/kunickiaj/codemem/agents-mdgit clone --depth 1 https://github.com/kunickiaj/codememWhat 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.00972 | $0.00972 |
| Opus 5 | $0.00486 | $0.00486 |
| Sonnet 5 | $0.00194 | $0.00194 |
| Haiku 4.5 | $0.00097 | $0.00097 |
Grade A, and why
codemem 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 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.
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 — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.
codemem
- Public repo: never add secrets, internal hostnames, private identifiers, or local artifact paths. Keep
.tmp/,.venv/,*.sqlite,packages/*/dist/,packages/viewer-server/static/, and.opencode/package-lock.jsonout of git. - Default to the TypeScript toolchain: this repo is a pnpm workspace on Node 24 / pnpm 10.33.0.
What runs where
- CLI entrypoint:
packages/cli/src/index.ts(pnpm run codemem ...). - Shared store/search/sync logic and exported version:
packages/core/src/index.ts. - Viewer HTTP API + SPA host:
packages/viewer-server/src/index.ts. - Viewer UI source:
packages/ui/src/. - OpenCode plugin source of truth:
packages/opencode-plugin/.opencode/plugins/codemem.js. packages/cli/.opencode/plugins/codemem.jsand repo-root.opencode/plugins/codemem.jsare wrappers/re-exports, not the main implementation.packages/cloudflare-coordinator-worker/is its own worker package with separate tests.
Commands worth using
- Install:
pnpm install - Full local gate / CI order:
pnpm run tsc && pnpm run lint && pnpm run test(pnpm run check) - Build everything:
pnpm run build - Run CLI from source:
pnpm run codemem --help - Run one vitest file:
pnpm exec vitest run packages/cli/src/commands/serve.test.ts - Run one package script:
pnpm --filter codemem test,pnpm --filter @codemem/ui build,pnpm --filter @codemem/cloudflare-coordinator-worker test:worker - E2E smoke:
CODEMEM_E2E_BUILD=1 CODEMEM_E2E_JSON=1 pnpm run e2e:smoke -- --json(artifacts land in.tmp/e2e-artifacts)
Gotchas agents usually miss
pnpm run lintonly checks files included bybiome.json(mostlypackages/**TS/TSX/JS/JSON and root TS config). Docs likeAGENTS.mdare outside Biome.pnpm run testis workspace vitest; rootvitest.config.tspoints atpackages/*/vite.config.ts.- The viewer server throws if
packages/viewer-server/static/index.htmlis missing. If you change UI or viewer assets, runpnpm buildor at leastpnpm --filter @codemem/ui build. packages/viewer-server/static/is generated and ignored. Do not hand-edit it. UI build stagespackages/ui/static/there alongside the builtapp.jsbundle.- Plugin smoke tests rely on nested
.opencoderuntime deps. CI installs@opencode-ai/plugininsidepackages/cli/.opencodeandpackages/opencode-plugin/.opencodebefore running smoke tests. - CLI work should follow
docs/cli-design-conventions.md: max 2 nesting levels, noun-based groups, shared--db-path/--config/--jsonhelpers, and no uncaught throws from command handlers. - The repo is TS-first; trust
package.json, package scripts, and CI over older migration-era docs/checklists. .github/PULL_REQUEST_TEMPLATE.mdis TS-first now; usepnpm run tsc,pnpm run lint, andpnpm run testfor normal 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.
- 2d ago First seen · 48 lines · 972 tokens per session scan A a9f913a1b52c
codemem AGENTS.md is an instructions file published in the GitHub repository kunickiaj/codemem (62 stars, last pushed 3d ago), licensed MIT. It adds 972 tokens to every session, about $0.0049 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
engram CLAUDE.md
Instructions for techtheist/engram, covering engram — context for claude code, hard rules (locked — don't relitigate without reason), where things go, workflows & sharp edges and now / next (keywords).
deja-vu GEMINI.md
Instructions for vshulcz/deja-vu: This file is loaded in every session the extension is enabled in, so it stays short. The detail lives in the tool descriptions.
vexic AGENTS.md
Instructions for PyroDonkey/vexic, covering vexic agent instructions, project, architecture boundaries, package boundary and host ports.
memofs AGENTS.md
Instructions for memo-fs/memofs, covering memofs — agent guidelines, monorepo architecture, core behavioral principles and workspace rules.
signetai AGENTS.md
AGENTS.md instructions for Signet-AI/signetai, covering working in signet, start with the checkout, find the right context, durable data contracts and verification.
signetai CLAUDE.md
Claude Code instructions for Signet-AI/signetai, a project described as: Sync and store memories, shared identity files (AGENTS.md, CLAUDE.md), session transcripts, institutional knowledge, and secrets between all of your favorite harnesses and models.