Skip to content
Back to skills

Refactoring

ASecurity

Use when refactoring, simplifying, or restructuring code. Follows Surgical Changes and Simplicity First: touch only what's needed, avoid scope creep, keep it simple.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 14, 2026
ai-agentsrefactoringgit

Security analysis

A100/100

Scanned November 14, 2026

npx -y skills add fco3lho/unlazier-ai --skill refactoring --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Refactoring?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Refactoring
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fco3lho-refactoring/badge)](https://www.skillsdirectory.com/skills/fco3lho-refactoring)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: refactoring
description: "Use when refactoring, simplifying, or restructuring code. Follows Surgical Changes and Simplicity First: touch only what's needed, avoid scope creep, keep it simple."
---

# Refactoring Workflow

## Before Starting

- Identify the **exact scope** of the refactoring. What specific improvement is asked?
- If the request is vague ("clean this up"), ask for specifics before starting.

## Rules

### Surgical Changes

- Refactor only what was requested. Do not improve adjacent code.
- Match existing style, even if you personally prefer a different one.
- If you discover unrelated dead code, mention it — don't delete it.
- Remove imports/variables/functions YOUR changes made unused. Not pre-existing ones.

### Simplicity First

- Prefer the simplest structure that solves the problem.
- Extract functions only when they are reused or reduce cognitive load.
- Do not introduce abstractions "for future flexibility."
- A 50-line flat function is often better than 5 classes with inheritance.

### Verification

1. Tests pass before and after (run the full suite)
2. Diff shows only the intended lines changed
3. No new TODOs, FIXMEs, or stubs introduced

## After Refactoring

Run `git diff` and check:
- Every changed line traces to the original request?
- No unrelated formatting, style, or comment changes?

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.