mode: delta reports newly dead code without changing files; mode: prune produces a verified cleanup PR.
Generate a workflow
created .github/workflows/shrike.yml with an advisory delta workflow. The default is fail-on: never and permissions: contents: read. Nothing is committed, pushed, or analyzed by the installer.
The installer is conservative:
- It refuses absolute paths,
.., paths outside.github/workflows/, and symlinks that escape the repository. - An identical workflow is
unchanged. A different file isskippedwith exit2unless you pass--force. - It never edits another workflow file, including
.github/workflows/ci.yml. - It never runs analysis, project scripts, or network requests, and never uses secrets.
The generated workflow references
getshrike/shrike/packages/action@v1. The Action resolves a project-local getshrike install (or SHRIKE_CLI). Keep getshrike in the project’s devDependencies, or add an install step before the Action, so the workflow can run.--gate, the generated workflow sets fail-on: newly-dead and permissions become:
Action inputs and outputs
Delta mode
Delta mode is read-only. It runs the CLI’sdelta command with --json --allow-dirty --fail-on never, writes .shrike/action-delta.json, and posts a step summary. It exits 1 when max-items is exceeded or when fail-on: newly-dead finds anything. It never opens a PR or changes source files.
Grant only
contents: read for delta mode. The advisory default writes a step summary and artifact, not a PR comment.Prune mode
Prune mode runsshrike prune --base <base> --json --pr, opens a draft PR with gh, and writes receipts. It refuses fork pull requests with exit 2 because the write token is not trusted; a missing or unreadable event file on a PR also fails closed.
Fork pull requests
- Delta mode is read-only and safe to run with the default read token on fork PRs.
- Prune mode refuses fork PRs rather than using an untrusted write token. Run cleanup from a branch in the main repository, or have a maintainer run it locally.
pull_request_target to work around this: it gives a workflow write access in the context of the base repository, which is unsafe for untrusted PR content.
Next
- Agent integrations — install the skill and hook.
- Exit codes — what the Action returns in CI.