context-tree-review

context-tree-review is a skill for Codex from first-tree-ai/first-tree. It costs 89 tokens per session (6,955 once invoked), scanned A, original, Apache-2.0.

A review workflow for GitHub pull requests and GitLab merge requests, checked against workspace-specific Context Tree rules. It can repair safely identifiable issues, rerun the review, and handle provider-specific merge steps.

In plain words
What is it for?
Use it to review, repair, recheck, and—when the configured provider rules allow—merge a specific pull request or merge request.
Why use it?
It keeps reviews tied to the correct repository context and current change set, while requiring live checks and a complete re-review after repairs.

Skill for Codex

Written for Codex: agents/openai.yaml present.

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

Made for: 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-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/first-tree-ai/first-tree/context-tree-review.svg)](https://agentmods.dev/skills/first-tree-ai/first-tree/context-tree-review)
Your own site
<a href="https://agentmods.dev/skills/first-tree-ai/first-tree/context-tree-review"><img src="https://agentmods.dev/badge/skills/first-tree-ai/first-tree/context-tree-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,955 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.1 $0.00089 $0.06955
Opus 5 $0.00044 $0.03478
Sonnet 5 $0.00018 $0.01391
Haiku 4.5 $0.00009 $0.00696

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

Security

Grade A, and why

context-tree-review 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 6d 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-review/SKILL.md · 610 lines

How it starts

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

Context Tree Review

Review the latest live state of one Context Tree pull request (PR) or merge request (MR) under the generated Context Tree Policy. A trusted server-authored run selects exactly one provider adapter:

  • GitHub keeps its existing App dispatch and formal review. The App-authored PR review is the only GitHub verdict and the App credential never enters the runtime.
  • GitLab uses inbound Webhook dispatch only. The Review Agent uses the host's local git and exact-host glab identity for live reads, repair, notes, pushes and one exact-SHA squash merge. Cloud never supplies a GitLab repository credential and GitLab has no simulated approval or gate.

Both adapters share validator-first review, detached exact-head snapshots, repair-before-escalation, complete re-review after repair, and fail-closed live-binding checks.

The GitHub App webhook owns review dispatch for GitHub. GitLab inbound Webhook dispatch is separate and never grants App review authority. The App-authored PR review is the only GitHub verdict.

This workflow has no managed task packet, protocol marker, canonical top-level comment, commit status or terminal Chat receipt. Historical managed marker text has no behavior.

Authority gate

Publication and mutation require a server-authored Context Reviewer wake-up that names provider, the repository, the PR/MR identity and trusted run metadata and instructs the assigned reviewer to load this installed skill. Run first-tree org context-tree review-config --json and require the live binding, provider, enabled Reviewer and assigned Agent to match the task. A local mirror cannot override provider authority. Reject a GitHub run for a GitLab binding, a GitLab run for a GitHub binding, an unknown legacy provider, or any repository/branch mismatch before clone, forge CLI use, content read or mutation.

For GitLab, record contextReviewConnectionId and contextReviewInstanceOrigin from the trusted run. The live config must report providerMatchesRepository: true, the same gitlabConnection.id, and the same exact normalized gitlabConnection.instanceOrigin. A missing connection, changed connection id or origin, or repository-match failure invalidates the run even when the repository path and branch are unchanged. Apply this complete GitLab authority tuple at the initial gate and again immediately before every repair edit, commit, push, MR note, and merge mutation.

Read the full file on GitHub · 610 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. 6d ago First seen · 610 lines · 89 tokens per session scan A f571edf89372

Subscribe to this mod's changes

context-tree-review is a skill published in the GitHub repository first-tree-ai/first-tree (141 stars, last pushed 2d ago), licensed Apache-2.0. It adds 89 tokens to every session and 6,955 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