context-tree-audit

context-tree-audit is a skill for Claude Code, Codex from first-tree-ai/first-tree. It costs 77 tokens per session (1,593 once invoked), scanned A, original, Apache-2.0.

A review workflow for checking stored information in a Context Tree, a structured place where an agent keeps reusable project knowledge. It looks for conflicting, repeated, misplaced, incomplete, or poorly linked content.

In plain words
What is it for?
Use it to audit an entire Context Tree, a particular subject area, or selected paths for consistency, duplication, metadata, density, and relationships.
Why use it?
It helps find knowledge that has drifted out of date or conflicts with other stored information. It also identifies where each problem should be handled.

Skill for Claude CodeCodex

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/first-tree-ai/first-tree/context-tree-audit
Any agent
npx skills add first-tree-ai/first-tree --skill context-tree-audit
Clone the repo
git clone --depth 1 https://github.com/first-tree-ai/first-tree

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 context-tree-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/first-tree-ai/first-tree/context-tree-audit.svg)](https://agentmods.dev/skills/first-tree-ai/first-tree/context-tree-audit)
Your own site
<a href="https://agentmods.dev/skills/first-tree-ai/first-tree/context-tree-audit"><img src="https://agentmods.dev/badge/skills/first-tree-ai/first-tree/context-tree-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,593 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00077 $0.01593
Opus 5 $0.00039 $0.00796
Sonnet 5 $0.00015 $0.00319
Haiku 4.5 $0.00008 $0.00159

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

Security

Grade A, and why

context-tree-audit 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 4d 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/context-tree-audit/SKILL.md · 142 lines

How it starts

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

Context Tree Audit

Purpose

Audit a stable snapshot of stored normal content on the bound Context Tree's actual binding branch and route each evidence-backed finding to the smallest safe follow-up.

The workspace-generated AGENTS.md / CLAUDE.md Context Tree Policy is the only content-policy and authority baseline. Apply it directly; do not recreate its definitions or rules in this skill. If the policy or binding is missing, stop and report the environment gap.

Trigger Boundary

Use this skill only when a human explicitly asks for a broad stored-tree audit or names a domain or set of normal paths to audit. This trigger is exclusive: do not run first-tree-read first and expand a task-scoped read into an audit.

Do not use this workflow for a concrete source artifact that should be written to the tree, a Context Tree pull request or merge request review, ordinary task context, or an empty-tree setup. Those remain owned by their dedicated skills.

Choose the execution mode from the request:

  • Report-only (default): a request to audit, inspect, or report grants read-only authority. Perform no commit, push, pull request, merge request, issue, tracked ask, or other external mutation; report findings and recommended routes in the completion response.
  • Maintenance: select this only when the human explicitly asks to maintain, fix, or create follow-up artifacts. Mutation authority extends only to the requested artifact kinds. High-confidence local findings may produce one focused artifact per coherent finding group. Nothing is merged automatically.

Stable Snapshot

  1. Read .first-tree/workspace.json and the generated Tree Location section. Resolve the bound tree checkout, upstream, and actual binding branch. Use the branch declared in Tree Location; never assume main or substitute the checkout's current branch. Fail closed on a missing binding, repository mismatch, or ambiguous branch.
  2. From the bound checkout, inspect first-tree tree tree --help before using its current selectors.
  3. Fetch the bound upstream branch and resolve its exact remote HEAD SHA. If freshness cannot be confirmed because of network, permission, or remote identity failure, do not claim a current audit and do not create a semantic fix.
  4. Create a uniquely named, agent-owned detached worktree at that exact SHA. Never switch or edit the main tree checkout and never reuse an unowned path.
  5. Report the repository, branch, exact SHA, requested scope, and execution mode. Keep all discovery reads fixed to this snapshot.
  6. In the registered, clean detached worktree, run the selected first-tree tree tree --no-pull ... command and confirm its HEAD is still the exact audited SHA. Never resolve the audit scope from the mutable main checkout after the snapshot exists.
  7. In the detached worktree, run first-tree tree verify --json before any semantic node read. Record validator failures as mechanical findings and do not hide them inside semantic conclusions.
  8. If validation passes, read only the scoped normal nodes plus the minimum parent, sibling, relationship, and source evidence needed to judge them under the generated policy.
  9. Remove the detached worktree through git worktree remove when finished. Never use --force; a dirty snapshot is an integrity failure.

Read the full file on GitHub · 142 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 142 lines · 77 tokens per session scan A f4cbce427a70

Subscribe to this mod's changes

context-tree-audit is a skill published in the GitHub repository first-tree-ai/first-tree (140 stars, last pushed today), licensed Apache-2.0. It adds 77 tokens to every session and 1,593 once invoked, about $0.0004 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

github-scan

Operate the first-tree github scan CLI — the GitHub notification daemon and inbox runtime. Use whenever you need to run, start, stop, inspect, poll, or debug github-scan; view or respond to GitHub-triggered work from the terminal; or wire up the github-scan statusline hook.

first-tree-ai/first-tree-legacy · 68 tokens

first-tree-sync

Audit and repair drift between merged code and the Context Tree in both directions — tree→code (does code still support tree facts?) and code→tree (does the tree register everything code now contains?). Use when the tree may be stale, wrong, outdated, or missing coverage for recent code changes; after a large merge…

first-tree-ai/first-tree-legacy · 137 tokens

first-tree-github-scan

Agent skill for handling a single GitHub notification spawned by the First Tree github-scan daemon. Use when an agent needs to decide how to tag, comment on, escalate, or hand off a PR, issue, review request, mention, or CI event, and when it needs to choose between handling on GitHub or routing to first-tree-sync /…

first-tree-ai/first-tree-legacy · 113 tokens

first-tree-write

Write Context Tree updates from explicit source material — code PRs, design docs, meeting notes, raw text. Use when the user gives you a concrete source and wants the right durable tree change drafted, linked, and reviewed. This skill is source-driven and targeted; use first-tree-sync instead for broad drift audits…

first-tree-ai/first-tree-legacy · 73 tokens

first-tree

Canonical whitepaper and routing skill for First Tree. Explains what belongs in a Context Tree, how source or workspace roots, tree repos, and bindings relate, and how the current first-tree tree and first-tree github scan surfaces fit together. Use when you need shared First Tree concepts, need to choose between…

first-tree-ai/first-tree-legacy · 90 tokens

first-tree-onboarding

One-shot onboarding command for First Tree. Drives a repo or workspace from "no first-tree" all the way to "tree bound, real content drafted, daemon running, agent templates confirmed" — end to end, in one skill invocation. Trigger this skill when the user invokes /first-tree-onboarding, says "onboard this repo to…

first-tree-ai/first-tree-legacy · 165 tokens