leaf-implementation

leaf-implementation is a skill for Claude Code, Codex from taniwhaai/arai. It costs 133 tokens per session (3,477 once invoked), scanned A, original, Apache-2.0.

A method for implementing one software module from a contract manifest. The implementor follows only that module's stated requirements and does not rely on the rest of the system's design or purpose.

In plain words
What is it for?
Use it when a module already has a contract and needs to be built independently. It helps implement and verify that module without adding unspecified connections.
Why use it?
Seeing the whole codebase can encourage accidental dependencies or invented behaviour. Working from one contract exposes missing requirements and keeps the module within its defined boundaries.

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/taniwhaai/arai/leaf-implementation
Any agent
npx skills add taniwhaai/arai --skill leaf-implementation
Clone the repo
git clone --depth 1 https://github.com/taniwhaai/arai

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/taniwhaai/arai/leaf-implementation.svg)](https://agentmods.dev/skills/taniwhaai/arai/leaf-implementation)
Your own site
<a href="https://agentmods.dev/skills/taniwhaai/arai/leaf-implementation"><img src="https://agentmods.dev/badge/skills/taniwhaai/arai/leaf-implementation.svg" alt="Measured on agentmods" height="20"></a>
Per session 133 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,477 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.00133 $0.03477
Opus 5 $0.00067 $0.01739
Sonnet 5 $0.00027 $0.00695
Haiku 4.5 $0.00013 $0.00348

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

Security

Grade A, and why

leaf-implementation 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.

.claude/skills/leaf-implementation/SKILL.md · 152 lines

How it starts

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

Leaf Implementation

Implement one module from one manifest. Do not exceed the contract. Do not infer the system's purpose. Do not reach beyond the manifest and shared vocabulary you were given.

Why this skill exists

Compartmentalisation is the property that makes large agent-built codebases tractable. When an implementing agent sees only its own module's contract — not the rest of the system, not the design doc, not adjacent modules — three things happen:

  1. The agent cannot invent coupling that does not exist. It has nothing to couple to.
  2. The agent cannot drift toward the system's overall purpose, which would otherwise bias every micro-decision.
  3. Any incompleteness in the contract surfaces immediately, as a re-raise, rather than being smoothed over with plausible-looking code.

This makes context lean, makes contracts honest, and makes the resulting code locally verifiable. The framework around this skill is what physically enforces the context boundary; this skill's job is to make the agent inside that boundary behave correctly.

If this skill is being used outside the framework (no enforced isolation), behave as if isolation were enforced anyway. Treat anything outside the manifest, shared vocabulary, and project context as if it did not exist. The discipline is what produces the value, not the wall.

What you have

You have been given exactly three things:

  1. A manifest for the module you are implementing. This contains the contract: inputs, outputs, side effects, error semantics, behavioural guarantees, dependencies, referenced data shapes, acceptance criteria. The manifest is language-neutral by design — it does not tell you which language to write in.
  2. A shared vocabulary file containing the data shapes and external systems your manifest refers to. Also language-neutral.
  3. A project context file (project_context.yaml). This is where language, toolchain, repository style, directory layout, test framework, and code conventions are recorded. The user authored this; it is authoritative for every choice the manifest deliberately leaves to you.

Read the full file on GitHub · 152 lines

Files

What ships with it

4 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 · 152 lines · 133 tokens per session scan A 5d76b1ef1acf

Subscribe to this mod's changes

leaf-implementation is a skill published in the GitHub repository taniwhaai/arai (7 stars, last pushed 22d ago), licensed Apache-2.0. It adds 133 tokens to every session and 3,477 once invoked, about $0.0007 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.

Related

Other skills, from other repositories

clean-code-review

Run a comprehensive Clean Code audit against the codebase — module size, function complexity, long parameter lists, TODO/FIXME markers, commented-out code, duplication (DRY), Boy Scout delta, dead exports, test smells, shell-parity (PS/Bash twins), dep boundaries (cross-package imports), frozen-arrays drift…

srnichols/plan-forge · 92 tokens

code-review

Plan-Forge-tuned comprehensive code review — runs public-surface diff, forge analysis, architecture / security / testing / patterns checks, plus Plan-Forge-specific gates (ACI compliance, dual-shell parity, branch model). Use before merging features or at the end of a phase. With --quorum, dispatches multi-model…

srnichols/plan-forge · 70 tokens

stakeholder-briefing

Generate a per-organisation stakeholder briefing for Plan Forge from the canonical template, optionally drafting the prospect-specific sections from a source directory of customer materials. Use when an internal champion needs to walk a colleague or VP through the decision to adopt Plan Forge.

srnichols/plan-forge · 55 tokens

azure-sweep

Runs the full 8-layer Azure governance sweep using the Azure Sweeper agent.

srnichols/plan-forge · 0 tokens

bug-fix

Guided end-to-end bug-fix workflow for Plan Forge tempering bugs — load → pre-fix review → write failing test → fix → validate → post-fix sweep → close. Composes /code-review, /clean-code-review, /forge-quench, and /test-sweep around the forgebug tool surface so a fix never closes without a regression check.

srnichols/plan-forge · 80 tokens

infra-deploy

Validate, what-if/plan, deploy, and verify Azure infrastructure using Bicep, Terraform, or azd. Use when deploying a completed infrastructure phase to an environment.

srnichols/plan-forge · 39 tokens