Monthly scan that finds unused exports, unreachable files, and unused dependencies, verifies each candidate against the actual codebase, and opens a single reviewable pull request removing only the subset the agent is confident about. Set your repository on the Clone step after importing.
- Identifier
dead-code-sweep- Version
- 1.0.2
- Steps
- 3
- Triggers
- 1
- cleanup
- maintenance
- scheduled
- refactoring
- automated
When it runs
schedule.monthly- Schedule
- Day 1 of each month at 04:00 UTC
0 4 1 * * - Timezone
- UTC
The pipeline
The graph below is the one the workflow opens with in the builder — same steps, same layout, drawn on the same canvas. The run playing through it is a simulation; the branches and conditions are real.
- 01Monthly Schedule (1st 04:00 UTC)
triggerThe event that starts the run.
- 02Clone Repository ⚠️ SET YOUR REPO
git.cloneShallow-clones the repository at the right ref.
- 03Find & Remove Dead Code
agent.runOne agent works the task with its toolkit.
The agent
Dead Code Sweeper
- Base type
- Senior Developer
- Temperature
- 0.1
- Max iterations
- 50
- Tools
- 11
Filesystem · 4
read_fileRead File · readlist_dirList Directory · readdelete_fileDelete File · writeedit_fileEdit File · write
Git provider · 4
create_branchCreate Branch · writecreate_or_update_fileCreate or Update File · writecreate_pull_requestCreate Pull Request · writeadd_labelsAdd Labels · write
Terminal · 1
run_terminal_cmdRun Terminal Command · write
Code search · 1
code_searchCode Search · read
Status · 1
update_statusUpdate Status · write
Related playbooks
Flaky Test Detector
Runs the test suite five times on the same commit and files a ticket for every non-deterministic test.
API Deprecation Sweep
Monthly scan of deprecated endpoints, fields, and headers that files removal tickets for anything past its sunset date.
CI Duration Regression Watch
Weekly analysis of CI durations that identifies regressed jobs, opens the workflow definition, and proposes a specific cause and fix.