espalier-init

espalier-init is a skill for Claude Code, Codex from Junhanliu-dev/espalier-engineering. It costs 118 tokens per session (10,095 once invoked), scanned A, original, MIT.

A codebase analysis tool that discovers a project's patterns, architecture, and conventions, then records them in a structure for AI coding agents.

In plain words
What is it for?
Use it to set up Espalier in an existing repository, creating rules, skills, documentation, and a guided agent workflow.
Why use it?
It makes unwritten team practices explicit so generated code can match the repository more reliably.

Skill for Claude CodeCodex

Part of the espalier-engineering plugin — 2 skills, 3 agents shipped together

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/junhanliu-dev/espalier-engineering/espalier-init
Any agent
npx skills add Junhanliu-dev/espalier-engineering --skill espalier-init
Clone the repo
git clone --depth 1 https://github.com/Junhanliu-dev/espalier-engineering

Made for: Claude Code, Codex.

Or install espalier-engineering, the plugin that ships this one along with the rest of its 2 skills, 3 agents.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/junhanliu-dev/espalier-engineering/espalier-init.svg)](https://agentmods.dev/skills/junhanliu-dev/espalier-engineering/espalier-init)
Your own site
<a href="https://agentmods.dev/skills/junhanliu-dev/espalier-engineering/espalier-init"><img src="https://agentmods.dev/badge/skills/junhanliu-dev/espalier-engineering/espalier-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,095 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.00118 $0.10095
Opus 5 $0.00059 $0.05047
Sonnet 5 $0.00024 $0.02019
Haiku 4.5 $0.00012 $0.01009

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

Security

Grade A, and why

espalier-init 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 yesterday.

The scan reads SKILL.md. This mod also ships 21 executable files (hook-templates/check-layer-boundaries-go.sh, hook-templates/check-layer-boundaries-python.sh, hook-templates/check-layer-boundaries-typescript.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/espalier-init/SKILL.md · 617 lines

How it starts

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

Espalier Init

Discover the actual patterns, conventions, and architecture of an existing codebase, then generate a structured constraint system that ensures AI agents produce code matching those standards.

When to Use

  • "Set up Espalier for this project"
  • "Create Espalier structure for my codebase"
  • "Make AI code production-ready for this repo"
  • "Build agent constraints for this project"
  • "/espalier-init"

Philosophy

When an agent makes an error, engineer its elimination — not with prompt tweaks, but with files, rules, automated checks, and system structure.

Core insight: The problem isn't model intelligence. It's that models don't know the unwritten rules — patterns every experienced developer on the team knows but nobody documented.

This skill discovers those rules from the code itself, then encodes them as machine-enforceable constraints. Like an espalier trains a fruit tree to grow along a wall, this skill trains your AI coder to grow along the patterns already in your codebase.

File Layout of This Skill

espalier-init/
├── SKILL.md                       # this file — overview + phase index
├── templates/                     # markdown templates emitted into target project
│   ├── rules/                     # → espalier/rules/ in target
│   ├── skills/                    # → espalier/skills/<name>/SKILL.md
│   ├── agents/                    # → espalier/agents/ in target
│   ├── agent.md                   # → espalier/agent.md (orchestrator)
│   └── pipeline.md                # → espalier/pipeline.md
├── hook-templates/                # shell scripts emitted into espalier/hooks/
└── references/                    # deep-dive content read on demand
    ├── discovery-checklist.md     # Phase 1 detail
    ├── wiring.md                  # Phase 10 detail
    ├── validation.md              # Phase 11 detail
    └── wiki-templates.md          # Phase 6 wiki stubs

Rule: Every phase below tells you which template/reference to read. Open them with the Read tool when the phase fires — do NOT invent template content from memory.

Read the full file on GitHub · 617 lines

Files

What ships with it

52 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. yesterday Changed · +1 lines ee1a6a83a6fe
  2. 4d ago First seen · 616 lines · 118 tokens per session scan A b6a37217308c

Subscribe to this mod's changes

espalier-init is a skill published in the GitHub repository Junhanliu-dev/espalier-engineering (72 stars, last pushed yesterday), licensed MIT. It adds 118 tokens to every session and 10,095 once invoked, about $0.0006 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

codex

Offload heavy-duty implementation work to OpenAI Codex as a background worker, routing each task to the appropriate available GPT model—especially GPT-5.6 Sol, Terra, or Luna—while Claude stays the orchestrator and reviewer. Use when the user types /codex, asks to delegate/offload/route work to Codex or a GPT model…

luckeyfaraday/codex-router · 113 tokens

gan-zhong-xue

在你干真实开发时(边干边挖:搞懂 AI 正在做的这步,掌控方向)或干完提交后(事后挖: 回头搞懂一个甩手没懂的改动),就地陪你走一轮"先让你猜、再揭示、逼到原理"的回合制, 把黑盒变成你真懂、能复述、能迁移的东西。治的是 vibe-coding 的病:交付物在增加, 理解没跟上。触发词:"干中学"、"帮我搞懂 AI 正在做的这步"、"我刚才那段没懂"、 "这个 commit 我说不清"、"帮我真正搞懂刚才做的";掌舵(任务中途):"等等这步我没懂"、 "为什么这么改"、"这步我没跟上"。 English triggers: "learning by doing", "help me actually understand what…

ly8427/gan-zhong-xue · 288 tokens

google-go-style

Use when writing, reviewing, or refactoring Go code; when handling errors (fmt.Errorf, %w, sentinel, errors.Is, errors.As); when deciding between panic, error return, and log.Fatal; when writing tests (table-driven, t.Helper, t.Fatal vs t.Error, goroutines); when designing API surface (option struct, variadic options…

cicdteam/google-go-style · 110 tokens

concise

Concise communication mode. Cuts 60-70% of output tokens while keeping natural, readable English. Drops filler, hedging, and pleasantries but maintains grammar and sentence flow. Elaborate on request -- ask for detail and get it, then auto-return to concise. Use when user says "concise mode", "be concise", "less…

o4f6bgpac3/concise · 92 tokens

specdd

Spec-driven development orchestrator that turns vague, top-of-mind feature requests into production-grade specifications before any code is written. ALWAYS use this skill whenever the user describes a feature, change, capability, screen, flow, or new component in plain language — even if they don't explicitly ask for…

unboundinnov/specdd · 218 tokens

autoprompt

Explicit-only useful-first orchestration. Invoke /autoprompt to turn a mission into one executable roadmap, build dependency-safe lanes, and verify the result with independent reviewers. Never infer invocation from ordinary requests. Never resume from leftover artifacts without an explicit resume instruction.

Spielewoy/autoprompt-skill · 56 tokens