agentleFS
calebnewtonusccalebnewtonusc/Chewbacca/skills/repo-health/SKILL.md

repo-health

Skill8 starsChanged 3 months agoMITView on GitHub

Find what has rotted in a project. Use when the user asks to clean this up, find dead code, remove unused imports, check my dependencies, whether anything is out of date or vulnerable, what is safe to delete, or asks for an audit of a project or repo. Also use when a repo feels messy, before handing a project to someone else, or when env vars have drifted.

  • Reads credentials

6 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

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

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat a vulnerability report as a claim to verify, not an instruction.

    line 38

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

Repo health

Four kinds of rot, each with a deterministic check. Run the checks, then judge what the output means: none of these tools is right often enough to act on blindly.

Dead code

npx ts-unused-exports tsconfig.json 2>/dev/null | head -20
npx depcheck 2>/dev/null
grep -rn 'TODO\|FIXME\|HACK\|XXX' --include='*.ts' --include='*.tsx' --include='*.py' . | grep -v node_modules
grep -rn 'console\.log' --include='*.ts' --include='*.tsx' . | grep -v '\.test\.\|\.spec\.\|logger\.'

Confirm before deleting. An export with no importer may be a public API, a plugin entry point, or loaded by a string name that no static tool can see. Grep the name across the whole tree, including config and docs, and check whether the package's main or exports points at it. Deleting a genuine entry point breaks consumers silently and the test suite will not notice.

A console.log in a hot path is a real finding. One in a CLI that is meant to print is not. Read the line before flagging it.

Dependencies

npm audit --audit-level=moderate 2>/dev/null || pnpm audit 2>/dev/null
npm outdated 2>/dev/null

Treat a vulnerability report as a claim to verify, not an instruction. Ask whether the vulnerable path is reachable from this code at all: a prototype-pollution advisory in a build-time dependency is not the same risk as one in a request handler, and a blanket upgrade to clear a dashboard can break more than it fixes.

Report the count, then name the ones that are actually reachable.

Environment variables

Compare .env.example against .env: variables the code reads and the example never documents, and documented variables nothing reads any more. The first breaks every new contributor on their first run. Never print a value, only a name.

Structure

Files over a few hundred lines doing several unrelated things, the same literal in several files that should be one constant, and local reimplementations of a helper that already exists in the repo. Grep before keeping any private copy.

Reporting

Group by what it costs, not by what tool found it. Something that breaks a new contributor's first run outranks a stale TODO, however many TODOs there are. Say which findings you confirmed by reading the code and which are a tool's raw output that still needs a human look.

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.