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

RiskMeaning
Read-onlyInspects state without changing anything.
Low riskReversible with a routine follow-up command.
Medium riskChanges state; undo path documented.
DestructiveDeletes or overwrites; confirmation required. Always confirm with the user first — every destructive recipe has requires_confirmation: true.

Workflow

  1. Step 1

    Search

    Search for a recipe matching the task.

    pnpm --filter @codewright/agent-skill recipe search "undo last commit"
  2. 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.

  3. 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 macos
  4. Step 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.

  5. 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.

  6. 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

Copy or symlink the skill directory into a project's .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).