Junhanliu-dev/espalier-engineering / skills/espalier-init
espalier-init
VerifiedAnalyze 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/).
templates/skills/espalier-testing.md
View on GitHub---
name: espalier-testing
description: Test writing skill matching project's testing patterns
---
# Testing Skill
## Test Framework
{detected framework and assertion style}
## Project Testing Patterns
{how tests are structured in this project — derived from reading actual tests}
## Principles
1. Change-driven: test what you changed, at the boundary of the change
2. Real data preferred: use realistic inputs, not `"test"` / `123`
3. Match existing style: new tests should look like existing tests
## Test File Template
{derived from actual test files in the project}
## Mock/Fixture Conventions
{how this project does mocking — derived from existing tests}
## What to Test
- Every new public function/method
- Every changed public interface
- Edge cases for business logic
- Error paths (not just happy path)
## Security Abuse Tests (when a security contract is present)
When the change has an `espalier/changes/{type}/{slug}/security-contract.md` —
the `## Security-Sensitive Fields` block the orchestrator extracted from the
Stage 4 `harness-security` audit (if the file is absent, read the block from
`security-record.md`) — write a negative test for EACH field. The shape is always **tamper → assert
rejected → assert persistent store unchanged**:
- tamper the value (foreign id, `$0.01` price, `isAdmin=true`, illegal status)
- assert the request is rejected (403 / 404 / 422 per project convention)
- assert the persisted store did NOT change
A happy-path test does NOT satisfy the contract. See
`espalier/skills/espalier-security/SKILL.md` for the recipe. The coder
writes the abuse test for every sensitive field it classifies WITH the code
(Security-Aware Coding — a Stage 3 duty under folded test-mode); the
auditor's contract names such a test in its `covered_by:` line, and the
contract phase writes only the entries still uncovered. Enforced at the
contract delta review (serial test-mode: Stage 6) —
a contracted field with no abuse test is a P0.
## Failure-Mode Tests (every NEW external-call path)
Production code is proven by how it fails. For each external-call path the
change introduces (HTTP/RPC/DB/queue/third-party SDK), write at least one test
where the dependency fails — timeout, error response, or garbage payload — and
assert the DECIDED failure behaviour from `espalier/rules/production-standards.md`:
- the fallback is used, OR the error propagates with context (never swallowed)
- no partial write persisted (the store is unchanged or consistently rolled back)
- the failure is visible (error-level log emitted, per the project's logger)
Use the project's mock/fixture conventions above to simulate the failure.
Enforced at review (the Stage 4 panel under folded test-mode; Stage 6 in
serial) — a new external call with no failure-mode test is a P1.
## What NOT to Test
- Private internals (test via public interface)
- Framework behavior (trust the framework)
- Trivial getters/setters
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |