agentleFS
LinardsLiepenieksLinardsLiepenieks/honecode/skills/cleanup/SKILL.md

cleanup

Skill0 starsChanged 3 months agoMITView on GitHub

Removes dead code in the area the current prompt is about, verifying every callsite of what it touches first so nothing regresses. Read the ask, find what's actually unreachable, prove it, then delete. Use when the user says "cleanup", "remove dead code", or "tidy this up".

29 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use next, eval and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • VercelSkill

    next

    Next.js adapter for embedding emulators directly in a Next.js app via @emulators/adapter-next. Use when the user needs to embed emulators in Next.js, set up same-origin OAuth for Vercel preview deployments, create an emulate catch-all route handler, configure Auth.js/NextAuth with embedded emulators, add persistence to embedded emulators, or wrap next.config with withEmulate. Triggers include "Next.js emulator", "adapter-next", "embedded emulator", "same-origin OAuth", "Vercel preview", "createEmulateHandler", "withEmulate", or any task requiring emulators inside a Next.js app.

    Also in 4 projects that use this

  • qtzx06Skill

    eval

    Evaluate trained YOLO model accuracy with mAP metrics and per-class error analysis. Identifies failure cases for targeted improvement. Use after training.

    Also in 3 projects that use this

  • MicrosoftSkill

    worktree

    Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch. Use from any PR-scoped workflow that needs an isolated checkout to keep current code and build output untouched.

    Also in 3 projects that use this

  • BlockSkill

    plan

    Draft a TDD, PRD, or lightweight plan in the conversation without committing it.

    Also in 5 projects that use this

  • DockerSkill

    research

    Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".

    Also in 7 projects that use this

  • AWSSkill

    writing-for-agents

    Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 23 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the lint/test/typecheck gate for what you touched.

    line 15

“Common” is measured: kept by at least 6 in 10 of the 23 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

Clean up dead code

Work only the area the current prompt is about: files named, the diff just made, the thing being discussed. Don't sweep the repo.

  1. Read the ask to fix the scope. State in one line what's in bounds.
  2. Find the dead: unreachable branches, unused exports/params/props, orphaned files, commented-out blocks, stale comments describing code that no longer exists, config for features that shipped or died.
  3. Prove it before deleting. Grep every symbol and file path you plan to remove, across the whole repo, not just the module: imports, re-exports, dynamic/string references, tests, config, docs, other languages. A thing with one live callsite is not dead. If you can't prove it's unused, leave it and say why.
  4. Condense the comments. A comment describes the code as it is now: short, present tense, one line where one line does. Cut anything that narrates history instead of state: "was X, now Y", "changed to fix…", "previously handled by…", "keeping this for now", dates, PR/ticket numbers, before/after rationale. Git already has that. Cut restated code (// increment i) and stale text describing behavior that moved. Keep the non-obvious why (an invariant, a workaround for a real upstream bug, a load-bearing ordering constraint), trimmed to its point.
  5. Delete, don't rewrite. Removing is in scope; refactoring behavior is not. If something reads badly but is live, note it and move on.
  6. Run the lint/test/typecheck gate for what you touched.

Output: what you removed with file:line · what you left and the callsite that saved it · anything suspicious you couldn't prove either way, for the user to decide.

Frozen paths (legacy/, _experimental/, anything a project rule marks as retained-but-dormant) are never dead, so skip them.

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.