context-mem: Instructions file for Claude Code

CLAUDE.md

context-mem CLAUDE.md is an instructions file for Claude Code from JubaKitiashvili/context-mem. It costs 1,038 tokens per session, scanned A, original, MIT.

A project instruction file for context-mem, a tool that stores useful project context between coding sessions. It defines which strategic documents to read and which decisions, experiments, benchmarks, and file changes to record.

In plain words
What is it for?
Use it when answering strategic questions, changing search behavior, running benchmarks, recording experiment results, or modifying files in the context-mem project.
Why use it?
It reduces the chance that important findings or decisions disappear when work moves between sessions. It also sets rules for protecting uncommitted code during Git operations.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is JubaKitiashvili/context-mem's own configuration. It tells Claude Code how to work on context-mem itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything context-mem configures →

Reuse

Borrowing it

Nothing to install: this file belongs to JubaKitiashvili/context-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.

Copy the file
curl -O https://raw.githubusercontent.com/JubaKitiashvili/context-mem/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/JubaKitiashvili/context-mem

Made for: Claude Code.

Wrote 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.

agentmods badge for context-mem CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/jubakitiashvili/context-mem/claude-md/github.svg)](https://agentmods.dev/instructions/jubakitiashvili/context-mem/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/jubakitiashvili/context-mem/claude-md"><img src="https://agentmods.dev/badge/instructions/jubakitiashvili/context-mem/claude-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.

agentmods 80×15 button for context-mem CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/jubakitiashvili/context-mem/claude-md"><img src="https://agentmods.dev/badge/instructions/jubakitiashvili/context-mem/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,038 This file is loaded in full into every session.
When invoked 1,038 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.01038 $0.01038
Opus 5 $0.00519 $0.00519
Sonnet 5 $0.00208 $0.00208
Haiku 4.5 $0.00104 $0.00104

Measured 10d ago against content hash 4b810bd7c371, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

context-mem 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 10d 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.

CLAUDE.md · 81 lines

How it starts

The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.

context-mem Project Instructions

Strategic Context (read first)

The source of truth for direction, positioning, pricing, fundraising, roadmap is:

📍 docs/superpowers/plans/2026-04-17-1b-company-architecture.md

Read it before answering any strategic question. Update the Decision Log (§9) whenever a strategic call is made. Plans navigation: docs/superpowers/plans/INDEX.md.

Current phase: v3.4.0 "LLM Wiki Preview" shipped (2026-04-18). Next: v4.0.0 "Cognition" (target 2026-05-22) — full synthesis pages, Obsidian plugin, 8 IDE integrations, Context Protocol v1 RFC, and the post-migration benchmark re-run to backfill docs/benchmarks/synonym-migration-2026-04.md.

Auto-Observe Rule

When working on this project, use mcp__context-mem__observe to store:

  • Every benchmark result (scores, per-category breakdown)
  • Every decision about search strategy changes
  • Every file modification with before/after scores
  • Every failed experiment (what was tried, why it failed)

This ensures nothing is lost between sessions.

Git Safety

  • ALWAYS commit before any git checkout, revert, or stash operation
  • Never overwrite uncommitted working files
  • When experimenting, commit each iteration separately

Benchmark Commands

npm run bench          # quick mode
npm run bench:full     # full benchmarks
node benchmarks/longmemeval.js /tmp/longmemeval-data/longmemeval_s_cleaned.json
node benchmarks/locomo.js /tmp/locomo/data/locomo10.json
node benchmarks/convomem.js --category all --limit 50
node benchmarks/membench.js /tmp/membench-data/MemData/FirstAgent --limit 500
node benchmarks/beam.js /tmp/beam/chats/100K
node benchmarks/lmeb.js /tmp/lmeb/eval_data

Core Search Architecture (v3.2)

BM25 (src/plugins/search/bm25.ts) runs 8 strategies:

  1. AND-mode (weight 2.0) — high precision
  2. Phrase matching (1.9) — consecutive keyword pairs
  3. Entity-focused (1.8) — proper nouns, dates
  4. Sanitized FTS5 (1.5) — default tokenization
  5. Relaxed AND (1.2) — entity + top keywords
  6. OR-mode with synonym expansion (1.0) — broad recall
  7. Individual keywords (0.5) — long-tail catch 7b. Individual synonym search (0.2) — semantic gap bridge (e.g., "siblings" → "brother")
  8. Temporal resolution (1.6) — relative dates → absolute keywords

Read the full file on GitHub · 81 lines

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.

  1. 10d ago First seen · 81 lines · 1,038 tokens per session scan A 4b810bd7c371

Subscribe to this mod's changes

context-mem CLAUDE.md is an instructions file published in the GitHub repository JubaKitiashvili/context-mem (19 stars, last pushed 4mo ago), licensed MIT. It adds 1,038 tokens to every session, about $0.0052 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.

Related

Other instructions, from other repositories

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,153 tokens

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).

microsoft/vscode · 6,785 tokens

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).

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,735 tokens