first-tree

first-tree is a skill for Claude Code, Codex from first-tree-ai/first-tree-legacy. It costs 90 tokens per session (637 once invoked), scanned A, original, Apache-2.0.

A guide to First Tree, a way to record decisions, ownership, constraints, and links between code repositories. It explains how workspaces, the repository holding this information, and their connections fit together.

In plain words
What is it for?
Use it when connecting a workspace to First Tree, checking whether recorded information matches merged code, updating the tree from source material, or handling GitHub scan work.
Why use it?
It helps an agent choose the right First Tree workflow and keep shared project knowledge separate from day-to-day implementation details.

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

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 first-tree

README.md
[![agentmods](https://agentmods.dev/badge/skills/first-tree-ai/first-tree-legacy/first-tree.svg)](https://agentmods.dev/skills/first-tree-ai/first-tree-legacy/first-tree)
Your own site
<a href="https://agentmods.dev/skills/first-tree-ai/first-tree-legacy/first-tree"><img src="https://agentmods.dev/badge/skills/first-tree-ai/first-tree-legacy/first-tree.svg" alt="Measured on agentmods" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 637 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.00090 $0.00637
Opus 5 $0.00045 $0.00318
Sonnet 5 $0.00018 $0.00127
Haiku 4.5 $0.00009 $0.00064

Measured 5d ago against content hash 8341f0c9c93d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

first-tree 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 5d 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/first-tree/SKILL.md · 64 lines

How it starts

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

First Tree

This is the single source of truth for First Tree methodology and routing. Load it before any of the task-specific skills.

Core Model

First Tree revolves around three objects:

  1. source/workspace root — where the team or agent does implementation work
  2. tree repo — the Git repo that stores durable decisions and ownership
  3. binding — the metadata that connects the source/workspace root to the tree repo

Use the tree for decisions, constraints, ownership, and cross-repo relationships. Keep execution detail in source systems.

Skill Map

Use the skill that matches the job:

  • first-tree-onboarding for connecting a repo or workspace to First Tree
  • first-tree-sync for auditing drift between merged code and tree content
  • first-tree-write for writing tree updates from explicit source material
  • first-tree-github-scan for handling a single GitHub notification inside the daemon path
  • github-scan for human/operator work on the GitHub scan daemon itself

If you are unsure which one applies, stay here and read references/cli-manual.md.

CLI Map

The current public CLI surface is:

  • first-tree tree — tree lifecycle, bindings, validation, publish, and skill maintenance
  • first-tree github scan — GitHub inbox runtime and daemon operations

Do not invent new top-level CLI groups when acting on the current repo. If a workflow needs more automation than the CLI already offers, keep the orchestration inside the skill until the shared logic is worth extracting.

Working Rules

  • Read the relevant tree nodes before making cross-repo decisions.
  • Prefer first-tree-onboarding when the repo is not yet bound.
  • Prefer first-tree-sync for broad drift audits and first-tree-write for explicit sources.
  • Treat first-tree-github-scan as an agent behavior spec, and use github-scan for human/operator daemon work.

References

  • references/structure.md — tree objects, files, and binding shape
  • references/functions.md — what the tree is for
  • references/anti-patterns.md — what not to put in the tree
  • references/maintenance.md — update discipline and review flow
  • references/cli-manual.md — current CLI map and status
  • references/llms.txt — short machine-facing overview

Read the full file on GitHub · 64 lines

Files

What ships with it

8 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. 5d ago First seen · 64 lines · 90 tokens per session scan A 8341f0c9c93d

Subscribe to this mod's changes

first-tree is a skill published in the GitHub repository first-tree-ai/first-tree-legacy (47 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 90 tokens to every session and 637 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-30.