agentsclimarketplace

Refactor smell

Skill NSBen/skillfoundry/src/skillfoundry/data/starter_skills/refactor-smell

🔥 SkillFoundry (forge) — open, vendor-neutral toolchain for authoring, validating, testing & publishing AI agent skills. Works across Claude Code / Cursor / Codex / OpenCode / Cline. Ships 15 starter skills.

Install
npx -y skills add NSBen/skillfoundry --skill refactor-smell

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 14 days oldThe repository was created 14 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when code shows duplication, long functions, or confusing control flow and you want safe refactors that preserve behaviour.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

1.2 KB, as published. Nobody here has run it

Refactor Smell

When to use

Invoke this skill when reviewing code that is hard to read, duplicated, or risky to change.

Steps

  1. Name the smell: duplication, long method, god class, primitive obsession, shotgun surgery.
  2. Confirm there are tests; if not, add a characterization test first.
  3. Apply the smallest safe transform (extract, rename, move, replace conditional).
  4. Keep behaviour identical; verify with the test suite after each step.
  5. Stop when the code is clear; do not gold-plate or rewrite working logic.

Examples

  • "Refactor this 200-line function"
  • "Remove duplication between these two modules"

References

Refactor in small, committable steps with passing tests between each; never mix behavioural change with restructuring in one edit.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.