update

$npx mdskill add trailofbits/calcifier/update

Re-runs the calcify pipeline against the current SKILL.md content (without writing to disk), then unified-diffs the result against the existing `.calcifier/recipe.py`. Surfaces both the SKILL.md sha drift and the recipe textual diff so the user can decide whether to regenerate the recipe.

SKILL.md

.github/skills/updateView on GitHub ↗
---
name: update
description: Re-calcify a SKILL.md and unified-diff the result against the on-disk recipe. Use when the user asks to "check calcifier drift", "diff a recipe against its skill", or "update a calcified recipe".
allowed-tools: Bash
---

# calcifier:update — detect drift

Re-runs the calcify pipeline against the current SKILL.md content (without writing to disk), then unified-diffs the result against the existing `.calcifier/recipe.py`. Surfaces both the SKILL.md sha drift and the recipe textual diff so the user can decide whether to regenerate the recipe.

## When to invoke

- The user says "check drift", "did the recipe drift", "update the calcifier recipe", or "is this recipe stale".
- After a SKILL.md edit, before running `calcifier exec` again.

## Procedure

1. Confirm the CLI: `calcifier --version`.
2. Locate the SKILL.md and its `.calcifier/recipe.py`. If the recipe is missing, tell the user there is nothing to update and recommend `calcifier:calcifier` instead.
3. Run:
   ```
   calcifier update <abs-path-to-SKILL.md> --compiler compiler --agent-config <agents.json>
   ```
   This operation generates only in a temporary staging directory and reads the
   on-disk recipe; it does not overwrite the recipe.
4. The CLI prints:
   - `verdict: STABLE` (no drift) — exit 0.
   - `verdict: DRIFT` with the SKILL sha mismatch and a unified diff of the recipe body — exit 1.
5. If `DRIFT`, summarize the meaningful changes for the user. The diff is plain Python; common drifts:
   - New / renamed `@step` functions.
   - Changed `@step` return annotations (the JSON schema sent to the LLM changes with the type).
   - Added or removed control flow inside the `@recipe` body.
   - Changed semantic roles, budgets, parallel fan-out, or subrecipe hashes.
6. Ask the user whether to overwrite. Do not overwrite unless they confirm. The overwrite is `calcifier calcify <skill>` again.

## Output

`STABLE` or `DRIFT` verdict plus the unified diff. Exit code reflects drift (0 stable, 1 drift, 2 error).

More from trailofbits/calcifier