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.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.svg" alt="Measured on agentmods" 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 $0.00016 $0.00543
Sonnet 5 $0.00007 $0.00217
Haiku 4.5 $0.00003 $0.00109

Measured 8d ago against content hash cd17650dac60, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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. 8d 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 1mo ago), licensed MIT. It adds 33 tokens to every session and 1,086 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-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

company-brain

Your team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so Claude can answer questions on your team's behalf. Team-scope sibling to second-brain (which is personal-scope). Seven modes — capture (drop something into the right structured dir), compile (process into wiki…

coreyhaines31/makerskills · 322 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 lessons and workflows, then proposes scoped CLAUDE.md edits. Use for save this lesson or add to context.

jamditis/claude-skills-journalism · 34 tokens

vastai

Vast.ai CLI to manage GPU instances, volumes, serverless endpoints, and billing.

vast-ai/vast-cli · 21 tokens

context-anchoring

Manage per-feature living documents that capture decisions, constraints, and reasoning across AI sessions during active development. Scoped to feature-level work — design, implementation, bugfix, refactor — not for codebase-wide assessments or product-wide specifications (those define their own document lifecycles).…

techygarg/lattice · 147 tokens