Index of every page on this site: llms.txt
All skills
Run it yourself

Audits a repo or an area of it for drift, duplication, divergent flows, reimplemented code, over-engineering, dead code and visible waste, then applies approved fixes one behaviour-preserving step at a time. Use when asked to refactor, clean up, standardize, deduplicate, remove dead code, or make an area consistent. Not for a security audit - use security; not for reviewing one pull request - use `review`; not for a new feature or a bug fix - use coding.

  • 3 files
  • 10.5 KB
  • Updated 3 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/avik-creator/agent-skills/refactor

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesfindings.md

≈480 tokens on demand. Your agent reads this file only when SKILL.md points to it.

What counts as a finding

Read while auditing (SKILL.md "What to find"). Each item sharpens one kind of finding. A finding still cites its files and callers.

Rating risk and traffic

  • Risk comes from two things you can check: how many callers the code has, and whether a test runs the lines the step changes. Judge coverage on those lines, not on the package or repo average. Many callers and no test is high; few callers and a test that runs the lines is low.
  • High-traffic (P1) means the file changes often in git history (git log --format=%h -- <file>), or it has many callers. Say which one applies.
  • Give the basis with the rating, for example "risk high: 14 callers, no test reaches the branch".

Structure

  • An import cycle between modules is a structure finding. Its fix is usually a step that others depend on (safe-steps.md "Order").

Dead code

  • Commented-out code is dead code.
  • Before calling code dead or over-built, read why it exists: git log -L on the function, or blame. Put the reason in the finding when it changes the call, for example a workaround for a platform bug that still exists.

Standards drift

  • A call to an API that the installed version marks deprecated is drift. Fix it with the replacement that same version documents. Never fix it by upgrading, since an upgrade is a separate change the user asks for.

Over-engineering

  • An interface with one production implementation is not over-engineering when a test swaps in a stand-in. Check the tests before reporting it.
  • These are not simplifications: inlining a helper whose name explains a concept, or merging two functions that only look alike. The review signals in the review skill's simplify.md apply here too.

Performance waste

  • Report it only when the code shows it. Simplifying a path where speed matters needs a measurement showing it isn't slower; without one, leave the path alone.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at a0324a3. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 3 weeks ago

README badge

README badge for avik-creator/agent-skills/refactor