tree-ring-memory

tree-ring-memory is a skill for Claude Code, Codex from TerminallyLazy/tree-ring-memory-claude-plugin. It costs 38 tokens per session (5,093 once invoked), scanned B, a copy of tree-ring-memory, MIT.

Guidance for using Tree Ring Memory, a project memory system that keeps useful decisions, preferences, warnings, and future ideas over time.

In plain words
What is it for?
It helps capture and retrieve durable lessons, manage memory over its lifecycle, and check that the project’s memory tool is correctly available.
Why use it?
It helps an agent remember important project knowledge without treating every past conversation as permanent or storing sensitive information by default.

Skill for Claude CodeCodex

Part of the tree-ring-memory plugin — 1 skill, 7 commands 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/terminallylazy/tree-ring-memory-claude-plugin/tree-ring-memory
Any agent
npx skills add TerminallyLazy/tree-ring-memory-claude-plugin --skill tree-ring-memory
Clone the repo
git clone --depth 1 https://github.com/TerminallyLazy/tree-ring-memory-claude-plugin

Made for: Claude Code, Codex.

Or install tree-ring-memory, the plugin that ships this one along with the rest of its 1 skill, 7 commands.

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 tree-ring-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/terminallylazy/tree-ring-memory-claude-plugin/tree-ring-memory.svg)](https://agentmods.dev/skills/terminallylazy/tree-ring-memory-claude-plugin/tree-ring-memory)
Your own site
<a href="https://agentmods.dev/skills/terminallylazy/tree-ring-memory-claude-plugin/tree-ring-memory"><img src="https://agentmods.dev/badge/skills/terminallylazy/tree-ring-memory-claude-plugin/tree-ring-memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,093 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin 94% copy Near-identical to another mod 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.00038 $0.05093
Opus 5 $0.00019 $0.02547
Sonnet 5 $0.00008 $0.01019
Haiku 4.5 $0.00004 $0.00509

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

Security

Grade B, and why

tree-ring-memory 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 3d 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.

Asks the agent to reveal its instructionsmediumSystem prompt leakage

Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.

# Set and export TREE_RING_COORDINATOR_TOKEN with a history-safe, no-echo prompt
Origin

This is a copy

94% identical to tree-ring-memory — 30 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/tree-ring-memory/SKILL.md · 526 lines

How it starts

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

Tree Ring Memory

Use Tree Ring Memory as a lifecycle-aware memory layer, not as a transcript dump.

Tree Ring Memory preserves meaningful agent learning like tree rings:

  • fresh work stays detailed
  • older learning compresses into stable rings
  • important warnings remain visible as scars
  • durable truths become heartwood
  • speculative future work stays as seeds
  • sensitive data is blocked, redacted, or kept out by default

Runtime Bootstrap And Updates

Resolve the actual project root before running Tree Ring. Never initialize a plugin cache, downloaded package directory, home directory, or arbitrary working directory by accident.

  1. If <project-root>/.tree-ring/bin/tree-ring exists, prefer that binary for this project. Otherwise check command -v tree-ring and run tree-ring --version.

  2. Read existing <project-root>/.tree-ring/SKILL.md and CLI.md when present.

  3. This package targets Tree Ring Memory CLI 0.15.0 or newer. If no compatible CLI is available and the user's request already authorizes Tree Ring setup, install the verified current release project-locally from the project root. Otherwise explain the exact operation and obtain permission before the network download or software installation. Download the official, version-pinned v0.15.0/install.sh installer to a temporary file, verify its SHA-256 is ef0d5eb8f09cbe2e4c3abe80ee9a98a56759c89ad4ddd103d6c68314cd653ade, inspect it, and only then run:

    cd <project-root>
    sh <verified-installer-path> --project --init --release latest --no-animation
    

    Do not pipe a network response directly to a shell. The installer verifies the selected release archive against its published SHA-256 before placing the binary at <project-root>/.tree-ring/bin/tree-ring.

  4. For an existing global CLI, initialize from the project root with tree-ring --root .tree-ring init. For a project-local CLI, use .tree-ring/bin/tree-ring --root .tree-ring init. This must place memory.sqlite, AGENTS.md, SKILL.md, and CLI.md under that project's .tree-ring/ directory.

  5. Verify the created paths and run the same binary with --root .tree-ring integrations status. Initialization creates safe local guidance and bridge material; it is not receipt-backed activation proof.

Read the full file on GitHub · 526 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. 3d ago First seen · 526 lines · 38 tokens per session scan B 874f5bb44a43

Subscribe to this mod's changes

tree-ring-memory is a skill published in the GitHub repository TerminallyLazy/tree-ring-memory-claude-plugin (0 stars, last pushed 9d ago), licensed MIT. It adds 38 tokens to every session and 5,093 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks the agent to reveal its instructions). It is 94% identical to tree-ring-memory, differing in 30 lines, and is treated as a copy.

Related

Other skills, from other repositories