memory

memory is a skill for Claude Code from martineserios/thebrana. It costs 36 tokens per session (3,066 once invoked), scanned A, original, MIT.

A knowledge-management command for recalling stored patterns, sharing useful patterns between clients, and reviewing documentation for contradictions or health problems.

In plain words
What is it for?
It is for querying learned patterns, transferring knowledge across clients, reviewing knowledge health, and checking documents for contradictions.
Why use it?
It helps developers find relevant past solutions and keep project knowledge consistent instead of relying on memory or searching files manually.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; mentions CLAUDE.md.

Part of the brana plugin — 56 skills, 4 commands, 14 agents, 13 hooks shipped together

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 skills/martineserios/thebrana/memory
Any agent
npx skills add martineserios/thebrana --skill memory
Clone the repo
git clone --depth 1 https://github.com/martineserios/thebrana

Made for: Claude Code.

Or install brana, the plugin that ships this one along with the rest of its 56 skills, 4 commands, 14 agents, 13 hooks.

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 memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/martineserios/thebrana/memory.svg)](https://agentmods.dev/skills/martineserios/thebrana/memory)
Your own site
<a href="https://agentmods.dev/skills/martineserios/thebrana/memory"><img src="https://agentmods.dev/badge/skills/martineserios/thebrana/memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,066 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.1 $0.00036 $0.03066
Opus 5 $0.00018 $0.01533
Sonnet 5 $0.00007 $0.00613
Haiku 4.5 $0.00004 $0.00307

Measured 2d ago against content hash 73b19d2acf1a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

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

system/skills/memory/SKILL.md · 261 lines

How it starts

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

Memory

Unified interface for the knowledge system. Replaces /pattern-recall, /cross-pollinate, and /knowledge-review.

Subcommand Routing

Parse $ARGUMENTS for the subcommand:

  • /brana:memory recall [query] or /brana:memory [query] — search patterns (default)
  • /brana:memory pollinate [query] — cross-client pattern transfer
  • /brana:memory review — monthly knowledge health audit
  • /brana:memory review --audit [doc] — cross-doc contradiction detection
  • /brana:memory audit — surface lint+heal report and approve merges

If no subcommand recognized, default to recall with the full arguments as query. If no arguments at all, infer query from current project context.

Setup

source "$HOME/.claude/scripts/cf-env.sh"

recall — Query Learned Patterns

  1. Use the query from $ARGUMENTS (after stripping the recall subcommand). If empty, infer from current project context (tech stack, current task, recent errors).

  2. Primary path (ruflo available): Run cd $HOME && $CF memory search --query "$QUERY" to search the memory DB. Parse JSON values to extract confidence, transferable, and recall_count fields.

  3. Fallback path (ruflo unavailable): Search ~/.claude/projects/*/memory/ for relevant MEMORY.md files. Grep for keywords from the query.

3a. Local per-pattern files (fallback when ruflo unavailable): Scan ~/.claude/projects/{project-hash}/memory/pattern_*.md. For each file whose body matches query keywords, surface it as a pattern result with its confidence frontmatter field. These are local-only patterns not yet indexed in ruflo (git-durable, no cap). Note: ~/.claude/memory/patterns.md is retired — do not read it for new sessions.

3b. Local knowledge-staging.md (always): Read ~/.claude/memory/knowledge-staging.md. For each ## slug section matching the query, surface the claim and its **Promote to:** destination. Label clearly as "staging — not yet promoted."

  1. Group results by confidence tier:

Read the full file on GitHub · 261 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 · 261 lines · 36 tokens per session scan A 73b19d2acf1a

Subscribe to this mod's changes

memory is a skill published in the GitHub repository martineserios/thebrana (3 stars, last pushed yesterday), licensed MIT. It adds 36 tokens to every session and 3,066 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

ucai-patterns

Use when the user asks about Claude Code best practices, how to write agents, how to use hooks, how to manage context, or how to work effectively with Claude Code's native systems.

Joncik91/ucai · 42 tokens

context-doctor

Reduces token waste in Claude Code sessions across two axes — context footprint (auto-generates .claudeignore, guides over-read files and /clear timing) and command output (routes to a command-output proxy/hook such as rtk to trim verbose CLI stdout). In hub environments, regularly audits bloated…

chrono-meta/forge-harness · 91 tokens

verify-bidirectional

A skill that immediately updates the baseline and reflects it in the next session when the user raises a counter-argument to an AI recommendation. Triggered by "is that right?", "re-examine this", "something seems off here". Explicit /verify-bidirectional call also possible.

chrono-meta/forge-harness · 62 tokens

salience-splitter

Splits an over-loaded always-loaded context asset (SKILL.md, CLAUDE.md, memory index) into a lean resident layer plus an on-demand layer, by when content is needed rather than by length, linked by imperative pointers. Alias: skill-splitter. Triggers: "SKILL.md too large", "split this skill", "skill is bloated", "skill…

chrono-meta/forge-harness · 96 tokens

memory-curator

Use at session-close when a session captured several new memories, or on-demand, to consolidate, deduplicate, prune, and structure the beads memory store. Triggers on "curate memories", "clean up memories", "memory sweep".

DollarDill/beads-superpowers · 52 tokens

orient

Use when user invokes /orient with a topic keyword, entity type, project name, time qualifier, or combination. Also triggers on "what do we know about X", "remind me about X", "where did we leave off on X". Provides targeted context loading — searches the MCP Memory Server graph, knowledge files, journal entries, and…

harnessprotocol/harness-kit · 80 tokens