junhanliu-dev/espalier-engineering/espalier-init
Claude Code and agent skill by junhanliu-dev/espalier-engineering
- community
Checking that the SKILL.md file is still in the repository.
Analyze any existing codebase, discover its patterns and best practices, and generate an Espalier structure (rules, skills, wiki, pipeline) so AI coders produce code matching that project's language and conventions. Greenfield repos take the two-pass Decide-Then-Bind path (/espalier-map charts the conventions, init binds them); boilerplate repos run init normally, then map the product. Wires into Claude Code, Codex, and/or GitHub Copilot (.claude/, .agents/skills/ + .codex/, .github/).
Install
npx vskill@latest install junhanliu-dev/espalier-engineering/espalier-initSKILL.md
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:
It prints the outside root. Exit 3 means the default root already belongs to another project or holds foreign content: surface the message and ask the user for --outside-name=<other>; do not proceed. Pass the same flags to bootstrap in Phase 3 (--outside[=<dir>], --outside-name=<n>) — bootstrap re-runs prepare (idempotent) and writes every wiring file in its outside-mode form. Re-runs auto-detect the mode from the symlink.
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
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.
Output Structure in Target Project (after full setup)
Outside mode (`--outside`) changes WHERE, not WHAT: project-root/espalier is a relative symlink to <parent>/espalier-main/<project-basename>/espalier/ (that root also holds .espalier-origin — the project's absolute path — and a .git/ of its own, no remote). The .claude/ wiring is identical but excluded via .git/info/exclude; CLAUDE.md → CLAUDE.local.md; .claude/settings.json → .claude/settings.local.json; no .gitignore, .gitattributes or CODEOWNERS edits. espalier/.espalier-config carries outside-root: <abs path>.
Skill Naming Invariant (CRITICAL — read before creating any skill)
Claude Code's skill loader compares the folder name against the SKILL.md name: frontmatter. If they differ, the skill emits a warning and may fail to register.
Rule: every skill folder MUST be named identically to its name: frontmatter value.
When you generate a skill:
- Choose the
name:value first (must be globally unique, kebab-case, descriptive — prefix withespalier-for child skills inside this install; the main pipeline owns the bare nameespalier). - Use the SAME string as the folder name.
- Symlinks in
.claude/skills/<name>then resolve to a same-named source folder — no mismatch possible.
This applies to all skill folders generated by this skill: espalier-coding, espalier-review, espalier-security, espalier-testing, espalier-requirements, espalier-grill, espalier (main), espalier-fix, espalier-prune, espalier-doctor, espalier-ask, espalier-audit, espalier-map, espalier-maprun, espalier-simplify, espalier-repot, and any additional ones added later.
Phase Dependency Note (parallel execution)
Phases 0-2 are sequential by necessity (Phase 0 prompt blocks; Phase 1 produces DISCOVERY blob consumed by Phase 2). Within Phase 1 and Phase 2, work is parallel. Phases 3+ are bundled into a single bootstrap-espalier.sh invocation.
Rule: run Phases 0 → 1 → 2 → 3 in order. Each step batches parallel work to minimize sequential tool calls (~5-7 batched turns total).
Phase 0: Setup Decisions (front-loaded)
Issue ONE AskUserQuestion with FOUR questions in the multi-question form (under Codex there is no AskUserQuestion tool — ask the same questions in chat and wait for answers; see "Running under Codex" below):
Q1 — Squash-merge strategy
ONE question, EXACTLY these 4 options (AskUserQuestion caps options at 4; the two overflow values are reachable by typing them into Other):
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/espalier-init/SKILL.md
Popularity
- Repository stars
- 72
- Repository forks
- 9
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/junhanliu-dev/espalier-engineering/espalier-init)