Codewright recipes (agent skill)
Search and render Codewright's curated, risk-classified terminal recipes instead of inventing shell commands from memory. This skill calls Codewright's public API — no auth, no local execution of anything until you explicitly run a rendered command.
When to use this
Before running a terminal command you didn't get from the user verbatim — especially one that's destructive, hard to undo, or you're not 100% sure of the exact flags for. Search first; only fall back to writing the command yourself if nothing matches.
Risk vocabulary
| Risk | Meaning |
|---|---|
| Read-only | Inspects state without changing anything. |
| Low risk | Reversible with a routine follow-up command. |
| Medium risk | Changes state; undo path documented. |
| Destructive | Deletes or overwrites; confirmation required. Always confirm with the user first — every destructive recipe has requires_confirmation: true. |
Workflow
Step 1
Search
Search for a recipe matching the task.
pnpm --filter @codewright/agent-skill recipe search "undo last commit"Step 2
Inspect
Read risk, requires_confirmation, and platforms from the search result before acting, or fetch the full document for parameters, verification steps, and undo instructions.
Step 3
Render
Render the recipe for the current platform and parameter values — this never executes anything, it only substitutes parameter values into command text and returns it.
pnpm --filter @codewright/agent-skill recipe render git.undo_last_commit macosStep 4
Confirm — non-negotiable
Before running any command from a render result, check whether it requires confirmation. If it does, stop and ask the user — do not run destructive commands on the agent's own judgment.
Step 5
Run, then verify
After running the rendered commands, run the recipe's own verification commands before reporting success. Don't assume a command worked because it exited 0.
Step 6
Undo if needed
Use the render result's undo path — either the undo commands, or, if there's no undo path, surface the honest note instead of guessing a rollback.
Configuration
Points at production by default (https://codewright.tools/api/v1). Override with CODEWRIGHT_API_BASE_URL to hit a staging deployment or local dev server.
Installing into Claude Code
.claude/skills/ (or the user-level ~/.claude/skills/) as codewright-recipes/, keeping SKILL.md at its root — Claude Code discovers skills by the SKILL.md frontmatter (name, description).