Command
/plan-attest
Lock the current task_plan.md content with a SHA-256 attestation. Hooks then refuse to inject plan content if the file diverges from the attested hash, blocking silent tampering. Use --show to print the stored hash, --clear to remove the attestation. Available since v2.37.0.
One command from planning-with-files.
shell
$ npx -y skills add OthmanAdi/planning-with-files --agent claude-codeShips with planning-with-files. Installing the plugin gets this command.
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/plan-attest
Context preview
What this command does when you run it.
Lock the current task_plan.md content with a SHA-256 attestation. Hooks then refuse to inject plan content if the file diverges from the attested hash, blocking silent tampering. Use --show to print the stored hash, --clear to remove the attestation. Available since v2.37.0.
Stats
Stars25,655
Forks2,157
LanguagePython
LicenseMIT
Ships with planning-with-files
Command definition
plan-attest.md
--- description: "Lock the current task_plan.md content with a SHA-256 attestation. Hooks then refuse to inject plan content if the file diverges from the attested hash, blocking silent tampering. Use --show to print the stored hash, --clear to remove the attestation. Available since v2.37.0." disable-model-invocation: true allowed-tools: "Bash" --- Run the plan attestation helper for the active plan. Steps: 1. Resolve the active plan: prefer `${PLAN_ID}` env var, then `.planning/.active_plan`, then newest `.planning/<dir>/`, then legacy `./task_plan.md`. 2. Compute the SHA-256 of the resolved `task_plan.md`. 3. Write the hex digest to `.planning/<active-plan>/.attestation` (parallel-plan mode) or `./.plan-attestation` (legacy mode). 4. Confirm to the user with the short hash (first 12 hex chars) and the storage path. Implementation: - On Linux/macOS/Git Bash: `sh ${CLAUDE_PLUGIN_ROOT}/scripts/attest-plan.sh` - On Windows PowerShell: `& "$env:USERPROFILE\.claude\skills\planning-with-files\scripts\attest-plan.ps1"` Flags: - `--show` — print the currently stored hash and where it lives. - `--clear` — remove the attestation (re-open the plan to free editing). After running this command, every UserPromptSubmit and PreToolUse hook fire compares `task_plan.md` against the stored hash. If they diverge, the hook emits `[PLAN TAMPERED — injection blocked]` instead of feeding plan content into the model. Re-run `/plan-attest` whenever you intentionally edit and re-approve the plan.
