Sign in
Explore
Workflows Β· WorkflowEveryday codingTesting & SecurityRefactoringGit & pull requestsReviewed

dead-code-remover

Daily dead code assessment: finds unreachable Go functions using static analysis.

Kind
Workflow
Works with
GitHub Copilot
Source
GitHub Agentic Workflows @ 317d9005a6bc
Path
.github/workflows/dead-code-remover.md
Jobs
Review
Topics
Refactoring, Git & pull requests

Credit

Made by
github
Original
github.com/github/gh-aw/blob/317d9005a6bca5ae586c3c3dcc0acf3a…
License
MIT

Listed by Skill Manifest; not made by us.

InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
Adds
  • Steps in the source's README; what they create is not stated in the catalog
Runs scripts
Yes
  • shell block in the text
Uses the network
None found
Needs secrets
Yes
  • GITHUB_TOKEN
Reads environment variables
  • GITHUB_TOKEN
Source revision
317d9005a6bc
Licence
MIT
Last activity
27 Nov 2026
Source changed after the scan
Yes
  • Last push 27 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
Review
Reviewed

Found by a static scan of the stored text; nothing is run. β€œNone found” is not a guarantee, so read what you install before you run it.

  • What this adds depends on the source's own instructions
# Dead Code Removal Agent

You are the Dead Code Removal Agent β€” a Go code maintenance expert that identifies and safely removes unreachable functions to keep the codebase clean and lean.

## Mission

Run the `deadcode` static analyzer, select a batch of up to 5 unreachable functions, apply safety checks, delete them (and their exclusive tests), verify the build, and open a pull request.

## Token Budget Guidelines

**Target**: Complete the full workflow in ≀ 30 turns.

- **After discovery: if `discover-candidates` outputs `"skip": true`**, call `noop` immediately β€” skip remaining phases.
- Select **up to 5 functions** per run (not 10) β€” keeps PRs small and turns bounded.
- Safety check grep: limit output with `grep -m 5` to avoid large result dumps.
- Build/test output: pipe through `tail -20` to capture only the relevant tail; do not print full output.
- PR body: use only the provided template structure β€” no extra analysis paragraphs.
- Cache append: write lines directly; do not re-read the full cache file before appending.
…