tree-ring-memory

tree-ring-memory is a skill for Claude Code, Codex from YangsonHung/awesome-agent-skills. It costs 33 tokens per session (1,086 once invoked), scanned A, original, MIT.

A local-first memory system for coding-agent work. It stores decisions, lessons, warnings, project conventions, user preferences, and future ideas with links to supporting evidence.

In plain words
What is it for?
Use it to save or retrieve project knowledge, record lessons from tests or incidents, audit stored memories, remove sensitive information, and consolidate older notes.
Why use it?
It helps an agent recall useful project history without treating the entire conversation as permanent memory. It also supports privacy controls, review, redaction, and deliberate forgetting.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it to save or retrieve project knowledge, record lessons from tests or incidents, audit stored memories, remove sensitive information, and consolidate older notes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yangsonhung/awesome-agent-skills/tree-ring-memory
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.

Any agent
npx skills add YangsonHung/awesome-agent-skills --skill tree-ring-memory
Clone the repo
git clone --depth 1 https://github.com/YangsonHung/awesome-agent-skills

Made for: Claude Code, Codex.

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/yangsonhung/awesome-agent-skills/tree-ring-memory/github.svg)](https://agentmods.dev/skills/yangsonhung/awesome-agent-skills/tree-ring-memory)
Your own site
<a href="https://agentmods.dev/skills/yangsonhung/awesome-agent-skills/tree-ring-memory"><img src="https://agentmods.dev/badge/skills/yangsonhung/awesome-agent-skills/tree-ring-memory/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 tree-ring-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/yangsonhung/awesome-agent-skills/tree-ring-memory"><img src="https://agentmods.dev/badge/skills/yangsonhung/awesome-agent-skills/tree-ring-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,086 The whole file, excluding the scripts and references it only reads on demand.
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.00033 $0.01086
Opus 5.5 $0.00013 $0.00434
Sonnet 5.5 $0.00007 $0.00217
Haiku 4.5 $0.00003 $0.00109

Measured 1mo ago against content hash cd17650dac60, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tree-ring-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 1mo 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.

skills/en/tree-ring-memory/SKILL.md · 141 lines

How it starts

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

Tree Ring Memory

Overview

Use this skill to operate Tree Ring Memory as a lifecycle-aware memory layer for AI agent work. Tree Ring Memory is for durable decisions, lessons, warnings, project conventions, user preferences, and future seeds. It is not a transcript dump or a background scraper.

The core idea is that agent memory should age deliberately:

  • fresh work can stay detailed while it is still active
  • older lessons should compress into stable summaries
  • important failures and warnings should remain visible
  • durable preferences and project truths should become high-confidence memory
  • speculative follow-ups should stay separate from confirmed facts
  • sensitive data should be blocked, redacted, or forgotten

When to Use

Use this skill when:

  • The user asks the agent to remember, recall, consolidate, redact, or forget.
  • A task depends on previous project decisions, preferences, or warnings.
  • The agent is starting or resuming work in a repository with Tree Ring Memory or a project-local .tree-ring directory.
  • A test, incident, PR, benchmark, or review produces a lesson that should help future work.
  • A source document such as AGENTS.md, DOX, or Revolve contains durable guidance that should be summarized into memory.
  • The agent needs to audit stored memory before a risky change.

Do not use

Do not use this skill as the primary guide for:

  • Short-lived scratch notes that should disappear after the task.
  • Raw chain of thought or hidden reasoning.
  • Secrets, credentials, tokens, private keys, payment details, or other sensitive values.
  • Saving entire conversations instead of concise lessons or decisions.
  • Treating unverified claims as durable project truth.
  • Replacing source documents, tests, issues, PRs, or release records.

Instructions

Follow the workflow below whenever Tree Ring Memory could improve continuity. For small tasks, recall narrowly and only write memory when the lesson is clearly durable. For higher-risk work, include source checks, evidence-linked capture, and a closeout review.

Read the full file on GitHub · 141 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. 1mo ago First seen · 141 lines · 33 tokens per session scan A cd17650dac60

Subscribe to this mod's changes

tree-ring-memory is a skill published in the GitHub repository YangsonHung/awesome-agent-skills (18 stars, last pushed 2mo ago), licensed MIT. It adds 33 tokens to every session and 1,086 once invoked, about $0.0001 per session on Opus 5.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 skills, from other repositories

docs-context

Super Base Context — project doc loader & synchronizer. Triggers even without explicit "load docs"/"sync docs." READ MODE — load architecture/modules/coding/decision docs when work references project state: code work (write/modify/remove); design (features/APIs/schemas/architecture); review (modules, past solutions)…

lujiafa/houtu-project-skills · 203 tokens

run-memory

Shared step of the marketing playbooks (analyze-performance, run-paid-campaigns, research-competitors, email-lifecycle): reads the last run's record, checks whether its recommendations were done and whether they worked, and saves a short record of this run for the next one. Loaded by those playbooks; not for direct…

gooseworks-ai/goose-skills · 72 tokens

company-brain

Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so an agent can answer on your team's behalf. Team-scope sibling to second-brain — personal notes go there, not here. Modes — capture, compile (wiki pages + INDEX.md), query (trust-weighted, saved to outputs/)…

coreyhaines31/makerskills · 230 tokens

claude-reflect

Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md. Use when discussing learnings, corrections, or when the user mentions remembering something for future sessions.

BayramAnnakov/claude-reflect · 46 tokens

compound-docs

Searchable Elixir/Phoenix/Ecto solution documentation system with YAML frontmatter. Builds institutional knowledge from solved problems. Use when consulting past solutions before investigating new issues.

oliver-kriska/claude-elixir-phoenix · 38 tokens

claude-md-updater

Scans the session for durable lessons and workflows, then proposes scoped project instruction updates. Use for save this lesson or add to context.

jamditis/claude-skills-journalism · 33 tokens