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/corbym/memoryweb/claude-mdgit clone --depth 1 https://github.com/corbym/memorywebWhat 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.04390 | $0.04390 |
| Opus 5 | $0.02195 | $0.02195 |
| Sonnet 5 | $0.00878 | $0.00878 |
| Haiku 4.5 | $0.00439 | $0.00439 |
Grade A, and why
memoryweb CLAUDE.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 — 351 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md — coding agent instructions for memoryweb
Read this before touching any file in this repo.
What this repo is
memoryweb is a MCP (Model Context Protocol) server written in Go. It stores knowledge as a graph of nodes (concepts/decisions) connected by typed, narrative edges. It communicates over stdin/stdout using JSON-RPC 2.0.
The binary is long-lived: one process per MCP session. All state lives in a single SQLite file (WAL mode). There is no HTTP server, no daemon — just a loop reading lines from stdin and writing responses to stdout.
Package layout
db/ and tools/ are split by concern, one file per area — not one monolithic
file per package. When adding a new Store method or tool handler, put it in the
file for its concern; create a new file only for a genuinely new concern.
main.go JSON-RPC 2.0 wire loop (stdin → dispatch → stdout)
db/store.go Store type, New/Close (checkpoints WAL on close), Backup (VACUUM INTO snapshot), schema/version/stats queries, init()
db/migrations.go migration type, the migrations slice, migrate() — append-only, see below
db/embeddings.go Ollama embedding client, storeEmbedding, BackfillEmbeddings
db/nodes.go Node struct, AddNode/GetNode/UpdateNode/ArchiveNode/RestoreNode/ListArchived, batch variants
db/edges.go Edge struct, AddEdge/AddEdgesBatch/DeleteEdge, collectEdges
db/search.go SearchNodes/SearchNodesExact, LIKE + semantic search paths
db/graph.go FindPath/FindConnections/GetNodeNeighbourhood/GetDomainGraph, SuggestEdges
db/timeline.go RecentChanges(Scoped), Timeline, GetHistoryForMemoryID
db/significance.go GetSignificance and its memory_id/tags variants
db/audit.go FindDrift/CountStaleDrift/FindDisconnected
db/domains.go Alias CRUD, RenameDomain, MergeDomains, ListDomains
db/purge.go Purge — the one hard-delete path; CLI-only, never an MCP tool, kept visually separate
db/util.go slug(), shortID(), tagFilter, scanNodeRow(s), and the generic helpers below
tools/tools.go Handler type, CallTool dispatch switch, Instructions const, shared small helpers
tools/definitions.go ListTools() — the full MCP tool schema
tools/lean.go Shared lean-entry helpers (leanEntry, toLeanEntry, truncateWhy, ...)
tools/remember.go remember tool (addNode + batch)
tools/revise.go revise tool (updateNode + batch)
tools/connect.go connect/disconnect/suggest_connections
tools/search.go search tool
tools/recent.go recentChanges handler (history order=modified path; no MCP tool)
tools/history.go history tool
tools/significance.go significance tool
tools/orient.go orient tool (cross-domain snapshot, topic mode, full domain summary)
tools/domains.go domains tool
tools/archive.go forget/forget_all, audit tool, drift
tools/graph.go why_connected, visualise
cmd/ CLI-only subcommands (not MCP tools)
stats/ WKD session scoring and stats logging
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 · 351 lines · 4,390 tokens per session scan A 1fecc9db4a59
memoryweb CLAUDE.md is an instructions file published in the GitHub repository corbym/memoryweb (12 stars, last pushed 3d ago), licensed MIT. It adds 4,390 tokens to every session, about $0.0219 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
no-mistakes AGENTS.md
AGENTS.md instructions for kunchenguid/no-mistakes, covering agents.md and maintaining this file.
trpc-agent-go AGENTS.md
AGENTS.md instructions for trpc-group/trpc-agent-go, covering agents.md, project overview, engineering principles, go design conventions and implementation workflow.
azure-sdk-for-go go-code.instructions.md
Instructions for Azure/azure-sdk-for-go: All code should follow the guidelines from the Azure Go SDK Guidelines. This document is a summary of the most important guidelines to follow when contributing to the Azure Go SDK.
stackql AGENTS.md
Instructions for stackql/stackql, covering repository guidelines, project structure & module organization, build, test, and development commands, coding style & naming conventions and testing guidelines.
goai AGENTS.md
Instructions for zendev-sh/goai, covering agents.md - goai, commands, architecture, key rules and adding providers.
go-agent-skills copilot-instructions.md
Instructions for eduardo-sl/go-agent-skills, covering go agent skills, installation, skills catalog, code quality and architecture & design.