code-quality-plugin/skills/code-refactor/SKILL.md
Refactor toward pure functions, immutability, composition. Use when extracting pure functions, removing side effects, replacing loops with map/filter/reduce, or separating I/O.
npx skillsauth add laurigates/claude-plugins code-refactorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Use this skill when... | Use something else when... |
|------------------------|---------------------------|
| A file or directory has mixed side effects and business logic | Deduplicating code across files → /code:dry-consolidation |
| Functions mutate state or parameters | Detecting code smells without fixing → /code:antipatterns |
| Business logic is tangled with I/O or logging | Reviewing overall quality and architecture → /code:review |
| Imperative loops can be replaced with map/filter/reduce | Large multi-phase refactor spanning 10+ files → /workflow:checkpoint-refactor |
| Deep nesting obscures intent | |
echo "$1"$1: Required file path or directory to refactorDelegate this task to the code-refactoring agent.
Use the Agent tool with subagent_type: code-refactoring to refactor the specified code. Pass all the context gathered above to the agent.
The code-refactoring agent should:
Identify refactoring opportunities — look for these FP code smells:
for, while) that could be map, filter, reduce, or flatMapApply functional programming principles:
spread, map, Object.assign, structural copies)map, filter, reduce, flatMap, findPreserve functionality:
Output the refactored code with clear structure
Provide the agent with:
The agent has expertise in:
/code:complexity/code:dry-consolidation/configure:lintingtools
Scaffold a new ComfyUI custom-node repo (pyproject, CI, release-please, vitest+pytest, JS extension skeleton) in the picker/gesture vein. Use when bootstrapping or init-ing a comfyui node pack.
tools
Orchestrate a ComfyUI node pack from idea to registry: scaffold, create + seed the repo, open the gitops adoption PR. Use when releasing or spinning up a new comfyui node pack.
testing
macOS EndpointSecurity/EDR high CPU & battery drain. Use when Kandji ESF / XProtect pegs a core; trace the exec storm via powermetrics + eslogger.
development
odiff pixel-by-pixel image diffing. Use when comparing screenshots, detecting visual regressions, diffing before/after PNGs, asserting golden images.