memory-context

A command that displays the memories currently loaded for a project or working folder. It can show them briefly, in detail, or filtered by category.

In plain words
What is it for?
For checking active project memories, viewing their scores and metadata, filtering conventions or other categories, and limiting the number shown.
Why use it?
It makes the agent’s available project context visible instead of leaving stored memories hidden.

Command for Claude Code

Install

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.

agentmods
npx agentmods add commands/runtimenoteslabs/memory-layer/memory-context
Clone the repo
git clone --depth 1 https://github.com/runtimenoteslabs/memory-layer

Made for: Claude Code.

Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 567 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00008 $0.00567
Opus 5 $0.00004 $0.00283
Sonnet 5 $0.00002 $0.00113
Haiku 4.5 $0.00001 $0.00057

Measured 2d ago against content hash a510494b2c00, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-context 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.

.claude/commands/memory-context.md · 99 lines

How it starts

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

Memory Context Command

Display the memories currently loaded in context for this project. This shows what the Memory Layer knows about your current working directory.

Usage

/memory-context [--detailed] [--category <cat>] [--limit N]

Options

Option Description Default
--detailed Show scores and metadata false
--category <cat> Filter by category all
--limit N Maximum memories to show 20
--format <fmt> Output format (brief/detailed/structured) brief

Examples

# Show current context
/memory-context

# Show detailed view with scores
/memory-context --detailed

# Show only conventions
/memory-context --category convention

# Show all with structured format
/memory-context --format structured --limit 50

Implementation

Display project context:

mem context --project "$PWD" --format brief

Output Formats

Brief (default)

# Memory Context

- [architecture] Microservices with API gateway pattern
- [convention] Use snake_case for Python, camelCase for JS
- [gotcha] Auth service rate limits at 100 req/min

Detailed

# Memory Context (detailed)

## [abc123] ARCHITECTURE
Microservices with API gateway pattern
Score: 0.45 | Used: 12x | Confidence: 0.9

## [def456] CONVENTION
Use snake_case for Python, camelCase for JS
Score: 0.60 | Used: 8x | Confidence: 1.0

Structured

# Memory Context

## Architecture (2)
- [abc123] Microservices with API gateway pattern [proven]
- [def456] Event-driven communication between services

## Convention (3)
- [ghi789] Use snake_case for Python... [proven]
- [jkl012] Imports ordered: stdlib, third-party, local

When Context is Loaded

Memory context is automatically loaded:

  1. SessionStart: Top 10 relevant memories injected
  2. On demand: When Agent Skills detect relevant queries
  3. Explicitly: When you run /memory-context or /recall

Managing Context

  • Memories with high outcome scores are prioritized
  • Project-specific memories take precedence over global
  • Recent memories get a slight boost
  • Use /outcome to improve future context relevance

Read the full file on GitHub · 99 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. 2d ago First seen · 99 lines · 8 tokens per session scan A a510494b2c00

Subscribe to this mod's changes

memory-context is a command published in the GitHub repository runtimenoteslabs/memory-layer (10 stars, last pushed 3mo ago), licensed MIT. It adds 8 tokens to every session and 567 once invoked, about $0.0000 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-31.