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.
npx skills add YangsonHung/awesome-agent-skills --skill tree-ring-memory-cngit clone --depth 1 https://github.com/YangsonHung/awesome-agent-skillsWrote 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.
[](https://agentmods.dev/skills/yangsonhung/awesome-agent-skills/tree-ring-memory-cn)<a href="https://agentmods.dev/skills/yangsonhung/awesome-agent-skills/tree-ring-memory-cn"><img src="https://agentmods.dev/badge/skills/yangsonhung/awesome-agent-skills/tree-ring-memory-cn/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.
<a href="https://agentmods.dev/skills/yangsonhung/awesome-agent-skills/tree-ring-memory-cn"><img src="https://agentmods.dev/badge/skills/yangsonhung/awesome-agent-skills/tree-ring-memory-cn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.01275 |
| Opus 5 | $0.00022 | $0.00638 |
| Sonnet 5 | $0.00009 | $0.00255 |
| Haiku 4.5 | $0.00004 | $0.00128 |
Grade A, and why
tree-ring-memory-cn 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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Tree Ring Memory
Overview
使用本技能把 Tree Ring Memory 当作具备生命周期意识的 AI Agent 记忆层来操作。它适合保存长期有用的决策、经验、警告、项目约定、用户偏好和未来种子,而不是保存完整聊天记录,也不是后台自动抓取器。
核心思想是让 Agent 记忆有意地老化:
- 仍在进行的工作可以保留较多细节
- 较旧经验应压缩成稳定摘要
- 重要失败和警告应保持可见
- 持久偏好和项目事实应成为高置信记忆
- 尚未确认的后续想法应与事实分开
- 敏感信息应默认阻止、脱敏或遗忘
何时使用
在以下场景使用本技能:
- 用户要求记住、召回、合并、脱敏或遗忘。
- 当前任务依赖过去的项目决策、偏好或警告。
- Agent 正在开始或恢复一个带有 Tree Ring Memory 或项目本地
.tree-ring目录的仓库。 - 测试、事故、PR、基准、评审或运行记录产生了对未来有用的经验。
AGENTS.md、DOX 或 Revolve 等来源文档包含应汇总进记忆的长期指导。- Agent 需要在高风险改动前审计已保存的记忆。
不要使用
以下场景不要把本技能作为主要指南:
- 任务结束后就应消失的短期草稿。
- 原始思维链或隐藏推理。
- 密钥、凭据、令牌、私钥、支付信息或其他敏感值。
- 保存完整对话,而不是简洁经验或决策。
- 把未经验证的说法当作持久项目事实。
- 替代来源文档、测试、Issue、PR 或发布记录。
使用说明
当 Tree Ring Memory 能改善连续性时,按下面的流程执行。简单任务中只做窄范围召回,并且只有经验明显具备长期价值时才写入记忆。高风险任务中应加入来源检查、证据化记录和收尾复盘。
工作流程
- 当历史上下文可能影响任务时,先召回再行动。
- 优先使用窄范围、项目级查询,避免泛泛的全局召回。
- 如果存在来源文档,必须直接读取;记忆不能替代
AGENTS.md、项目文档、测试、Issue、PR 或发布记录。 - 只保存未来确实有帮助的简洁经验、决策、警告和偏好。
- 如果经验来自经过审查的运行、评估、检查点、事故、分支、PR、Issue 或测试产物,优先使用证据化记录。
- 对过时或敏感记忆执行脱敏、替换或删除,不要保留已知错误的上下文。
命令参考
先查看本地帮助,确保命令与当前安装版本一致:
tree-ring --help
tree-ring evidence --help
tree-ring dox sync --help
tree-ring revolve sync --help
如果项目有本地 Tree Ring 配置,先读取 .tree-ring/SKILL.md 和 .tree-ring/CLI.md,不要直接假设全局配置适用于当前仓库。需要显式指定项目存储时,使用本地 root:
tree-ring --root .tree-ring recall --query "release decisions"
tree-ring --root .tree-ring evidence --help
写入来源适配器摘要前先使用 dry-run:
tree-ring dox sync --source-root . --dry-run
tree-ring revolve sync --source-root revolve --dry-run
tree-ring integrations scan --source-root .
只有当摘要简洁、有用、带来源且隐私安全时,才执行实际写入。
年轮模型
用年轮模型判断保留强度:
cambium:当前活跃任务上下文outer:近期决策和经验inner:较旧的压缩项目知识heartwood:高置信、长期稳定的事实和偏好scar:重要失败、回归、被否定方案和警告seed:未解决想法、假设和后续事项
不要把证据薄弱的内容提升到 heartwood。在用户确认或证据足够强之前,优先使用 outer 或 seed。
隐私守门规则
永远不要保存:
- 密钥、凭据、令牌、私钥或支付信息
- 原始思维链
- 临时草稿
- 未验证却被当作持久事实的说法
- 未经用户明确指示的敏感健康、财务、法律或个人标识信息
- 超出短摘录范围的受版权保护文本
如果有用记忆包含敏感材料,只保留足够避免重复错误的脱敏操作摘要。
收尾清单
结束有意义的工作前,检查:
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.
- 10d ago First seen · 122 lines · 43 tokens per session scan A a51fd5902c5a
tree-ring-memory-cn is a skill published in the GitHub repository YangsonHung/awesome-agent-skills (18 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 1,275 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.
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)…
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…
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.
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.
vastai
Vast.ai CLI to manage GPU instances, volumes, serverless endpoints, and billing.
vastai-sdk
Vast.ai Python SDK — high-level API for GPU instances, volumes, serverless endpoints, and billing.