first-tree-write

first-tree-write is a skill for Codex from first-tree-ai/first-tree. It costs 62 tokens per session (918 once invoked), scanned A, original, Apache-2.0.

A source-based workflow for storing durable project decisions and constraints in an agent's private Context Tree. A Context Tree is structured reusable knowledge, and the workflow uses an actual document, discussion, or other source as evidence.

In plain words
What is it for?
Use it to record lasting decisions, constraints, ownership facts, or cross-area relationships from a specific source artifact.
Why use it?
It prevents temporary implementation details or unsupported assumptions from becoming long-term project knowledge. It also checks that a fact matters beyond the immediate change and is likely to remain true.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to record lasting decisions, constraints, ownership facts, or cross-area relationships from a specific source artifact.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/first-tree-ai/first-tree/first-tree-write
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.

Any agent
npx skills add first-tree-ai/first-tree --skill first-tree-write
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 first-tree-write

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/first-tree-ai/first-tree/first-tree-write"><img src="https://agentmods.dev/badge/skills/first-tree-ai/first-tree/first-tree-write.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 918 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00062 $0.00918
Opus 5.5 $0.00025 $0.00367
Sonnet 5.5 $0.00012 $0.00184
Haiku 4.5 $0.00006 $0.00092

Measured 1mo ago against content hash b85179178d3a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

first-tree-write 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 1mo 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.

skill-variants/local-context/first-tree-write/SKILL.md · 96 lines

How it starts

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

First Tree Write — Local Context

Purpose and authority

Reflect a concrete source artifact into the current Agent's private Local Context. This payload is the managed Local variant of first-tree-write; its public name and routing description intentionally match the Remote payload.

Local Context is not Team-approved truth and has no Git, forge, PR/MR, Reviewer, Audit, Seed, Cloud Tree IO, or Web workflow. Any current Chat, human decision, design document, PR/MR, Issue, meeting note, or other inspectable material can be a source. Never manufacture organization facts from model memory. The generated Context Tree Policy remains the content-model baseline.

Source gate and Double Test

Write only when the source establishes or changes a durable decision, constraint, ownership fact, or cross-domain relationship. It must both matter to future choices and remain true if the triggering implementation is rewritten. Implementation detail, refactors, request shapes, fixtures, build configuration, and one-off fixes stay in their source system.

If nothing passes, write nothing and explain why.

Workflow

  1. Identify the exact source, smallest existing target, parent, relevant normal soft_links, and ownership-adjacent member content. New top-level domains, owners changes, and decisionLocksCode changes still require explicit human-owner authority.

  2. Run:

    <firstTreeInvocation> --json tree local resolve --ensure --intent write
    

    Use only the returned data.path. The guard accepts no caller path and rechecks runtime identity, fixed containment, limits, latch, and Server binding. repairOnly: true means the live Tree is invalid: repair existing mechanically provable content before any expansion. If correct business content cannot be determined from the files and source, stop and ask a human; do not delete or invent facts just to pass validation.

  3. Read the source and surrounding live Tree. Then edit the live root directly with native file tools. Do not create a lock, snapshot, candidate, fingerprint, worktree, journal, rollback state, approval diff, commit, or PR/MR. Local V0 accepts last-write-wins and moving reads.

Read the full file on GitHub · 96 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. 1mo ago First seen · 96 lines · 62 tokens per session scan A b85179178d3a

Subscribe to this mod's changes

first-tree-write is a skill published in the GitHub repository first-tree-ai/first-tree (157 stars, last pushed 8d ago), licensed Apache-2.0. It adds 62 tokens to every session and 918 once invoked, about $0.0002 per session on Opus 5.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

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

mnemon

Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.

mnemon-dev/mnemon · 25 tokens

mnemon

Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.

mnemon-dev/mnemon · 25 tokens

mnemon

Persistent memory for MiniMax Code. Recall durable context, store important facts and decisions, and link related memories with the mnemon CLI.

mnemon-dev/mnemon · 30 tokens