agentsclimarketplace

Refactor

Skill ksed8/cc-loopkit/.claude/skills/refactor

Loopkit for Claude Code - guardrails, hooks, and two loop modes that won't let a task "finish" until it's actually done.

Install
npx -y skills add ksed8/cc-loopkit --skill refactor

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

  • 29 days oldThe repository was created 29 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

Clean up dead code, reduce duplication, and simplify structure without changing behavior. Use when refactoring, removing dead code, reducing duplication, or simplifying structure without changing behavior.

SKILL.md

2.1 KB, as published. Nobody here has run it

Refactor & Cleanup

Improve the internal structure of the selected code without changing its observable behavior. All tests must pass before and after.

Before Starting

  • Confirm the test suite is passing.
  • Note the current coverage baseline.
  • Identify the scope: single function, file, or module?

Refactoring Targets

Dead Code Removal

  • Unused variables, imports, functions, and exports
  • Commented-out code blocks (delete, don't leave as comments)
  • Feature flags that are permanently enabled/disabled
  • Unreachable branches

Duplication Reduction

  • Repeated logic that can be extracted into a shared utility
  • Copy-pasted blocks differing only in a parameter (extract with that parameter)
  • Inline constants that appear in multiple places (extract to named constants)

Structure Improvements

  • Functions over 50 lines → break into smaller, named steps
  • Files over 800 lines → extract cohesive sub-modules
  • Nesting deeper than 4 levels → extract early-return guards or helper functions
  • Mixed concerns in one function → split into focused single-responsibility functions

Naming

  • Rename variables/functions whose names don't match their behavior
  • Replace magic numbers and strings with named constants
  • Align naming with the domain language used elsewhere in the codebase

Constraints

  • No behavior changes — refactoring is purely structural.
  • One concern at a time — do not mix refactoring with feature work or bug fixes.
  • Keep tests green — run the suite after each meaningful change.
  • Don't add abstractions preemptively — extract only what has already proven to be duplicated (rule of three).

Output

After refactoring, summarize:

  • What was removed (dead code, duplication)
  • What was extracted (new utilities, constants)
  • What was renamed and why
  • Coverage before / after (should not decrease)

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.