hunvreus/skill-issue · Archived

refactor

Review and refactor code within a specified scope. Use when the user asks to clean up, simplify, reduce duplication, remove dead code, or improve code quality in a file, module, or broader area of the codebase.

First seen May 19, 2026

Installation

$ npx skills add hunvreus/skill-issue --skill refactor

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from hunvreus/skill-issue · top by installs.

npx skills add hunvreus/skill-issue

Browse all from hunvreus/skill-issue

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 36
License LICENSE
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,998 B
  • docs SUMMARY.md 226 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 15 installs

SKILL.md

Refactor

Input

  • A file, module, package, feature, diff, or project area to refactor.
  • Use explicit input first; otherwise infer from context, recent edits, selected files, or branch.
  • Safest default: ask before refactoring the whole project.

Workflow

  1. Confirm input. If no input is provided or implied, confirm before refactoring the entire project.
  2. Identify surface. Find files and direct dependencies that may need review or change.
  3. Run baseline checks. Use available tests, typecheck, lint, or build commands for the scope. Note missing or failing tooling.
  4. Identify refactors:

- Dead code: unused functions, branches, flags, adapters, and stale comments/docs. - Duplication: repeated logic, validation, mapping, and query patterns. - Unnecessary complexity: deep nesting, mixed responsibilities, ambiguous naming, and over-abstraction. - Evidence-backed optimization: hot loops, N+1 queries, repeated expensive work.

  1. Plan changes. Confirm when changes may affect behavior or remove intentional code.
  2. Apply safe changes incrementally. Prefer small, reviewable edits.
  3. Validate behavior:

- Re-run available baseline checks plus targeted tests for touched areas. - Ensure no accidental API, schema, or side-effect regressions.

Output

  • Input reviewed
  • Refactors applied
  • Behavior preserved or intentionally changed
  • Validation run
  • Remaining risks or follow-up work

Guardrails

  • Do not change behavior to satisfy style preferences alone.
  • Do not remove intentional features without confirmation.
  • Do not introduce broad rewrites when focused refactors solve the problem.
  • Keep type boundaries strict; avoid loose typing unless narrowly justified.