Verified means the project’s configured checks passed after removal, relative to a baseline. It does not prove the code is semantically unused in production, that the tests are adequate, or that external consumers cannot import it.
Start with the report
report always prints the deterministic plain report. Run npx getshrike with no arguments on an interactive terminal to open the read-only view; in CI, pipes, and agent sessions it falls back to plain output. npx getshrike report --base origin/main shows what this branch orphaned.
The headline metric is dead weight %: removable source lines divided by analyzed non-generated source lines. It is always shown with the raw fraction, never as a score.
What Shrike does
- Whole-graph orphan delta. Shrike compares the merge-base graph with the branch head graph, so it finds code that became unreachable anywhere in the repository — including files the change never touched.
- Verified deletion batches. Candidates are split into independent batches. Each batch is applied in a worktree, the project’s checks run against a baseline, and a regression is bisected so only the culprit is reverted.
- Portable receipt. A content-addressed JSON receipt records graph hashes, witnesses, patches, check results, build evidence, and the outcome.
- Agent and CI setup.
shrike installwrites a portable skill for coding agents, andshrike ci installwrites an advisory-by-default GitHub Actions workflow.
Who it is for
Shrike is for TypeScript and JavaScript projects — especially Next.js and React applications — that want to remove code orphaned by a change without guessing whether the project still builds. It is not a linter, a bundle optimizer, a type checker, a plugin catalogue, a cleanliness score, or a multi-language analyzer.Framework coverage
Shrike protects framework-invoked code so it is not mistaken for dead code. Framework entries are gated on the owning package declaring the dependency, so a file that merely looks like a route in an unrelated package stays analyzable.Start here
- Install Shrike — Node.js 22+ and the
getshrikenpm package. - Read the cleanup report — run
reportand interpret the metric. - Quickstart —
report,scan,delta, andplan. - Verified pruning — the batch, check, bisection, and receipt contract.
- Agent integrations and GitHub Action — put Shrike where you work.