Borrowing it
Nothing to install: this file belongs to FedgeNo/conventions-mcp. 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/FedgeNo/conventions-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/FedgeNo/conventions-mcpWrote 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/fedgeno/conventions-mcp/claude-md)<a href="https://agentmods.dev/instructions/fedgeno/conventions-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/fedgeno/conventions-mcp/claude-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.1 | $0.05222 | $0.05222 |
| Opus 5 | $0.02611 | $0.02611 |
| Sonnet 5 | $0.01044 | $0.01044 |
| Haiku 4.5 | $0.00522 | $0.00522 |
Grade B, and why
conventions-mcp CLAUDE.md scanned grade B with 1 finding 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 6d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
Three hooks, configured in `~/.claude/settings.json` (not this repo — see How it starts
The opening of the file, as written. The whole thing — 348 lines — stays where its author put it; the contents beside it link to each section on GitHub.
conventions-mcp
A personal memory MCP server: local SQLite storage, local embeddings, hybrid
(vector + keyword) search, MCP over stdio. See README.md for the pitch and
setup steps — this file is guidance for Claude Code (or any agent) working on
the server's own code, plus how to wire the finished server into a client.
Architecture
src/db.js— SQLite (better-sqlite3) +sqlite-vec(vector search) + FTS5 (keyword search). Onethoughtstable; FTS5 stays in sync via triggers;sqlite-vecdoes not, sodeleteThoughtdeletes both rows explicitly in one transaction.hybridSearchmerges vector + FTS results with reciprocal rank fusion (1 / (k + rank)), not a raw score blend.DB_PATH(exported) resolves viaMEMORY_DB_PATH, elsedefaultDbPath():./data/memory.dbin a git checkout (detected by a sibling.gitdirectory — npm never publishes one), or~/.conventions-mcp/memory.dbotherwise, since an npm/npx install's own directory usually isn't user-writable and gets wiped on upgrade.getDb()creates that directory if missing, so nothing upstream needs tomkdirfirst. The DB runs in WAL mode withsynchronous=FULL, a bounded autocheckpoint, and a busy timeout. The WAL is part of the durable database state; writes do not force a checkpoint after commit because that can fail after a successful write or interfere with concurrent readers. Graceful shutdown checkpoints and closes the database. The database directory and files are private to the user on POSIX systems.backupDatabaseuses SQLite's online backup API, verifies the snapshot, and publishes it atomically without overwriting an existing file.src/load-env.js— side-effect module loading~/.conventions-mcp/.envintoprocess.env(without overriding anything already set), for entry points invoked without Node's own--env-fileflag — the installedconventions-mcpbin and the hook scripts run standalone. Import it FIRST in any file that readsprocess.envat module-load time, before importingdb.js; ES module static imports evaluate in file order, so a leading import guarantees this runs before those reads. Nothing in this codebase requires an env var —MEMORY_DB_PATHis the only one read, and it's optional.src/embeddings.js— local embedding model (Xenova/bge-small-en-v1.5, quantized), downloaded once, loaded lazily on first call, and held resident for the server process's lifetime. No GPU or hosted inference service.- Classification (type/topics/projectScoped) happens in the calling
agent, not the server —
capture_thought/update_thought's zodinputSchemainserver.js(CLASSIFICATION_FIELDS) carries the taxonomy via field descriptions, and the tool description instructs the caller to fill them in from the conversation the thought came from. The caller only judges whether a thought is scoped to the current project (projectScoped, defaulting tofalse/global unless the rule is specific to the current working directory) — it never has to name the project itself; seewithProjectStampinserver.js. There is no server-side classification step and no network call anywhere in the capture pipeline. db.js'slistRules({ project })— a plain deterministic SQL filter (project IS NULL OR project = ?), no embeddings, no LLM call. Backs thelist_rulesMCP tool — cheap enough to call on every turn.hooks/hooks.json— CodexSessionStartandPreToolUselifecycle configuration. The first runs the same fixed-size instruction used by Claude Code; the second denies every other tool until the agent callslist_rules. This avoids placing a potentially truncated rule set in hook output and reuses the same marker state on both clients.bin/session-rules.js(SessionStarthook),bin/prompt-reminder.js(UserPromptSubmithook), andbin/pre-tool-check.js(PreToolUsehook, matcher*) — see "Standing-rule hooks" below. None touch the database directly.session-rules.jsemits a short, fixed-size instruction telling the model to call thelist_rulesMCP tool itself; embedding the rule content directly in hook output doesn't scale — a large enough stored rule set gets silently truncated to a small preview before it ever reaches the model.pre-tool-check.jsis the enforcement layer: advisory instructions turned out to be ignorable in practice, so it denies any other tool call untillist_ruleshas run this session, tracked by a marker file. The gate fires once per session, not once per turn —session-rules.jsre-arms it (clears the marker) only after a compaction or/clear, the two events that drop the loaded rules from context.prompt-reminder.jsno longer touches the gate at all; it just re-anchors, every turn, "follow the loaded conventions, and capture only durable rules intended to govern future sessions or repeated work." Task-specific directions, temporary choices, status/history, one-job commands, and descriptions of how an individual job was completed remain in conversation context. Each script has a.cmdsibling (session-rules.cmd,prompt-reminder.cmd,pre-tool-check.cmd) that Windowssettings.jsonentries point at — see "Platform support" below.src/server.js— registers the seven MCP tools (capture_thought,update_thought,delete_thought,search_thoughts,list_thoughts,list_rules,thought_stats) and connects over stdio by default or localhost-only Streamable HTTP whenMCP_TRANSPORT=http.update_thoughtis a real SQLUPDATE(preserves the row's id), not delete-then- reinsert — it re-embeds against the new content and takes fresh classification fields from the caller, then replaces the row'sthoughts_vecentry in the same transaction (vec0 has no in-place UPDATE, so that part is delete+insert internally, unlike thethoughts/FTS side which is a real UPDATE synced by the existing trigger).withProjectStampconverts the caller'sprojectScopedboolean into a deterministicprojectfield before storage — seesrc/project.jsbelow for why that split exists.list_rulesandlist_thoughtsrender each row by its#id(list_rulesordered by id ascending), so the ids the user sees are exactly the ones they pass back toupdate_thought/delete_thought.src/project.js—getCurrentProject(cwd)derives a stable project id from the working directory: the absolute path with/turned into-(e.g./var/www/html→-var-www-html), the same string Claude Code uses for the per-project transcript directory under~/.claude/projects/. Used to stamp captures and to filterlist_rules, so "which project" is a deterministic lookup rather than free-text matching against whatever string an LLM happened to write.bin/cli.js— the npm"bin"entry (package.json's"bin": { "conventions-mcp": "bin/cli.js" }), so an installed copy resolves on PATH with no path management needed. Dispatches by subcommand (init-db,backup,warmup, the two hook commands, or nothing → starts the MCP server) via dynamicimport()of the same modules thenpm runscripts already use — each does its work as a top-level side effect on import, so no refactor into exported functions was needed just for this. No config bootstrap step — nothing here requires a.envto exist.
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.
- 6d ago First seen · 348 lines · 5,222 tokens per session scan B 270f11d130f9
conventions-mcp CLAUDE.md is an instructions file published in the GitHub repository FedgeNo/conventions-mcp (0 stars, last pushed 12d ago), licensed MIT. It adds 5,222 tokens to every session, about $0.0261 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.