agentleFS
kaeawckaeawc/auto-mobile/skills/dead-code/SKILL.md

dead-code

Skill56 starsChanged 34 days agoApache-2.0View on GitHub

Use this skill to detect and clean up dead code in this repo, starting with the project’s TypeScript dead-code scripts and validating that removals do not regress behavior.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this when the user wants dead-code analysis or cleanup.

    line 8
  2. Distinctive:

    Start with detection, not deletion.

    line 12
  3. Distinctive:

    Check callers, tests, generated code, and dynamic entry points before deleting anything.

    line 15
  4. Distinctive:

    Remove dead code in small batches so regressions are easy to isolate.

    line 16
  5. Very specific:

    Prefer repo scripts and bun tasks over ad hoc dead-code tools.

    line 21
  6. Very specific:

    Treat package.json dependency findings as suggestions until confirmed.

    line 22
  7. Distinctive:

    Do not remove code referenced by reflection, CLI wiring, generated schemas, MCP registration, or platform build files without proof.

    line 23

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dead Code

Use this when the user wants dead-code analysis or cleanup.

Workflow

  1. Start with detection, not deletion.
  2. For TypeScript, run bash scripts/detect-dead-code-ts.sh, optionally writing reports to scratch/dead-code/.
  3. Review each candidate in full context before removing it. Unused exports in tooling output are often false positives.
  4. Check callers, tests, generated code, and dynamic entry points before deleting anything.
  5. Remove dead code in small batches so regressions are easy to isolate.
  6. Re-run the detector and the relevant validation after each batch.

Repo Rules

  • Prefer repo scripts and bun tasks over ad hoc dead-code tools.
  • Treat package.json dependency findings as suggestions until confirmed.
  • Do not remove code referenced by reflection, CLI wiring, generated schemas, MCP registration, or platform build files without proof.
  • Validate behavior after cleanup with the narrowest relevant commands.

Typical Validation

  • bun run lint
  • bun run build
  • bun test
  • bash scripts/validate-bun-test-timings.sh --run-unit-lane when test changes may affect the 100ms expectation, or pass an existing focused JUnit XML report to measure it directly

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.