Claude-Mind: Skill for Claude Code

.claude/skills/reflect-tree-update/SKILL.md

reflect-tree-update is a skill for Claude Code from zkysar1/Claude-Mind. It costs 93 tokens per session (1,778 once invoked), scanned A, original, MIT.

A shared process for updating a hierarchical knowledge tree after reflection. It changes the relevant entry, passes important signals to parent entries, and records capability events.

In plain words
What is it for?
Use it after reflecting on results or personal patterns when a knowledge-tree entry and its parent entries need updating.
Why use it?
It keeps broader knowledge areas aligned when a detailed insight changes, instead of leaving related entries outdated.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

This is zkysar1/Claude-Mind's own configuration. It tells Claude Code how to work on Claude-Mind itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Claude-Mind configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node=$(bash core/scripts/tree-find-node.sh --text "{hypothesis.category}" --leaf-only --top 1).

Reuse

Borrowing it

Nothing to install: this file belongs to zkysar1/Claude-Mind. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/zkysar1/Claude-Mind/main/.claude/skills/reflect-tree-update/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/zkysar1/Claude-Mind

Made for: Claude Code.

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 reflect-tree-update

README.md
[![agentmods](https://agentmods.dev/badge/skills/zkysar1/claude-mind/reflect-tree-update/github.svg)](https://agentmods.dev/skills/zkysar1/claude-mind/reflect-tree-update)
Your own site
<a href="https://agentmods.dev/skills/zkysar1/claude-mind/reflect-tree-update"><img src="https://agentmods.dev/badge/skills/zkysar1/claude-mind/reflect-tree-update/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 reflect-tree-update

Your own site · 80×15
<a href="https://agentmods.dev/skills/zkysar1/claude-mind/reflect-tree-update"><img src="https://agentmods.dev/badge/skills/zkysar1/claude-mind/reflect-tree-update.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,778 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.00093 $0.01778
Opus 5 $0.00046 $0.00889
Sonnet 5 $0.00019 $0.00356
Haiku 4.5 $0.00009 $0.00178

Measured 9d ago against content hash 7f15bf849188, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

reflect-tree-update 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 9d 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.

.claude/skills/reflect-tree-update/SKILL.md · 124 lines

How it starts

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

/reflect-tree-update — Tree Update Protocol

This sub-skill implements the shared Tree Update Protocol used by /reflect-on-outcome (Hypothesis mode) and /reflect-on-self (Patterns mode). It is invoked after any reflection that updates memory tree nodes, to propagate new insights upward through the tree hierarchy. After EVERY reflection, update the memory tree to propagate new insights upward.

Step 0: Load Conventions

Step 0: Load ConventionsBash: load-conventions.sh with each name from the conventions: front matter. Read only the paths returned (files not yet in context). If output is empty, all conventions already loaded — proceed to next step.

Step 1: Identify Affected Node (Dynamic Lookup)

Use dynamic lookup to find the right node — never hardcode category->path:

node=$(bash core/scripts/tree-find-node.sh --text "{hypothesis.category}" --leaf-only --top 1)
# Returns: {key, score, file, depth, summary, node_type}
target_file = node.file

Also update performance nodes as needed:

  • Pattern/violation discovery → bash core/scripts/tree-find-node.sh --text "pattern-extraction" --top 1
  • Calibration insight → bash core/scripts/tree-find-node.sh --text "calibration-analysis" --top 1
  • Accuracy change → bash core/scripts/tree-find-node.sh --text "hypothesis-accuracy" --top 1

Step 2: Update Target Node (Depth-Generic)

Behavior depends on whether the target node is a leaf or interior node:

If target is a LEAF node AND insight is substantial (>1 sentence) AND depth < D_max (20):

  1. Create a NEW child .md file under the leaf's directory
  2. Register child and convert former leaf to interior: echo '{"key":"","summary":""}' | bash core/scripts/tree-update.sh --add-child --encoding-source reflect-tree-update

    --encoding-source attributes the new child to the Shared Tree Update Protocol

    in meta/l1-pick-log.jsonl (S9). Auto-logging fires regardless; this enriches

    the entry. Pass --encoding-reason "" when there's a 1-line

    semantic justification worth capturing.

    The add-child enforces a pre-create dedup gate (Phase 2 curation).

    On exit 3 (summary overlap with an existing sibling under the new parent),

    read the rejected JSON from stderr for sibling_key and UPDATE that sibling

    in place with the new insight — do NOT retry with a different key.

    Exit 2 (exact key match) signals the new-child name collides with a sibling.

    bash core/scripts/tree-update.sh --set node_type interior
  3. Move the original leaf content into a child if needed, then add the new child
  4. Invoke /tree validate to check the structural change

Read the full file on GitHub · 124 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. 9d ago First seen · 124 lines · 93 tokens per session scan A 7f15bf849188

Subscribe to this mod's changes

reflect-tree-update is a skill published in the GitHub repository zkysar1/Claude-Mind (5 stars, last pushed yesterday), licensed MIT. It adds 93 tokens to every session and 1,778 once invoked, about $0.0005 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-31.