espalier-init

espalier-init is a skill for Claude Code from Junhanliu-dev/espalier-engineering. It costs 118 tokens per session (11,337 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 Code

Written for Claude Code: ${CLAUDE_SKILL_DIR} variable. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is # bootstrap-espalier.sh sits at the plugin root (../../scripts/); its.

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

Good fit Use it to set up Espalier in an existing repository, creating rules, skills, documentation, and a guided agent workflow.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Junhanliu-dev/espalier-engineering
agentmods
npx agentmods add skills/junhanliu-dev/espalier-engineering/espalier-init

Made for: Claude Code.

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/github.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/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 espalier-init

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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 11,337 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 warn 7 Sept 2026
SkillSpector: 10 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 112
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 399
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 113
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 401
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 114
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 117
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 118
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 400
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 402
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Rogue Agent · line 472
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.00118 $0.11337
Opus 5.5 $0.00047 $0.04535
Sonnet 5.5 $0.00024 $0.02267
Haiku 4.5 $0.00012 $0.01134

Measured 4d ago against content hash c85b48db435e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 4d ago.

The scan reads SKILL.md. This mod also ships 23 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 · 677 lines

How it starts

The opening of the file, as written. The whole thing — 677 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"
  • "/espalier-init --outside" — install with the espalier/ tree OUTSIDE the repo (nothing espalier-related committed)

Flags

Flag Effect
--outside[=<dir>] Outside mode (v0.30). The espalier/ tree lives at <dir>/<name>/espalier/ — default <dir> is the project's PARENT directory + /espalier-main, created if missing — with its own local git repo (no remote). The project root gets a RELATIVE symlink espalier -> ../espalier-main/<name>/espalier, excluded via .git/info/exclude. Hooks go to .claude/settings.local.json, the instruction section to CLAUDE.local.md, every wiring path to the exclude file: the project repo never tracks anything espalier-related, and Stage 7 commits records into the outside repo instead of opening an espalier PR. Fresh installs only — an existing inside install moves with /espalier-repot.
--outside-name=<n> Outside mode: the folder name under <dir> (default: the project's basename). Pass it when two projects share a basename — init refuses to adopt a root whose .espalier-origin names another project.

Outside mode has ONE extra step, and it comes FIRST. Phase 2 writes espalier/rules/…, espalier/agents/… and the rest by path, so the symlink must exist before any of those writes — otherwise they create a real directory inside the repo. Immediately after Phase 0's questions, before Phase 1:

# ${CLAUDE_SKILL_DIR} = this skill's directory. Append --main=<dir> when
# --outside=<dir> was given, --name=<n> when --outside-name=<n> was given.
bash "${CLAUDE_SKILL_DIR}/hook-templates/espalier-outside.sh" prepare .

Read the full file on GitHub · 677 lines

Files

What ships with it

60 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 Changed · +57 lines c85b48db435e
  2. 6d ago Changed cecfae4657f1
  3. 1mo ago Changed · +1 lines 55638bc3b7c8
  4. 1mo ago Changed · +2 lines 4953ccb9ea98
  5. 1mo ago Changed · +1 lines ee1a6a83a6fe
  6. 1mo 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 (69 stars, last pushed 5d ago), licensed MIT. It adds 118 tokens to every session and 11,337 once invoked, about $0.0005 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.