07 Refactor

Improve code across four axes (cleanup, performance, security, architecture) by scanning and fixing, or applying a pushed audit report. Use when the user wants to refactor, optimize, harden, or remove code. Not for read-only diagnosis or adding tests.

564 stars 65 forksSoftware Development Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add ai-driven-dev/framework

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add ai-driven-dev/framework --skill 07-refactor
Manual install
git clone --depth 1 https://github.com/ai-driven-dev/framework.git /tmp/framework
mkdir -p ~/.claude/skills
cp -r /tmp/framework/plugins/aidd-dev/skills/07-refactor ~/.claude/skills/07-refactor

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Skill: refactor

The act-side of code improvement: it changes code to make it better. Behavior-preserving for cleanup, performance, and architecture; security may change behavior on purpose to close a hole.

## Actions

| #   | Action         | Axis         | Lens                                                       |
| --- | -------------- | ------------ | ---------------------------------------------------------- |
| 01  | `performance`  | performance  | N+1, hot paths, batching, memoization, unnecessary I/O      |
| 02  | `security`     | security     | OWASP, input validation, authz, secrets: harden and fix    |
| 03  | `cleanup`      | code-quality | clean code: rename, extract, DRY, dead code, complexity     |
| 04  | `architecture` | architecture | extract layers, fix coupling, enforce boundaries            |

Run the one axis named, or offer all applicable when the request is unscoped.
Before running an action, read its file in `actions/`, not only the table or assets.

## Transversal rules

- Scope: run the one named axis, or for an unscoped request ask once "all applicable axes, or one?" before running. A request to delete or remove code runs `cleanup` directly, with no axis question. Never silently default to one axis.
Read the full skill on GitHub

Details

Skill name
07-refactor
Path
plugins/aidd-dev/skills/07-refactor/SKILL.md
License
MIT
Repo updated
18 November 2026

FAQ

What does the 07 Refactor skill do?

Improve code across four axes (cleanup, performance, security, architecture) by scanning and fixing, or applying a pushed audit report. Use when the user wants to refactor, optimize, harden, or remove code. Not for read-only diagnosis or adding tests.

How do I install the 07 Refactor skill?

Claude Code plugin: /plugin marketplace add ai-driven-dev/framework. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is 07 Refactor popular?

It lives in ai-driven-dev/framework, which has 564 GitHub stars and 65 forks.

Related skills

00 Async Dev

564

ai-driven-dev/framework

Drive the async-dev pipeline from one entry point, whether setup, run, or review. Use when the user wants to install async dev, run a ready issue, or address PR review comments, or on a webhook trigger. Not for plain status checks.

Git & Code Review65

00 Init

564

ai-driven-dev/framework

Turn AIDD measurement on for a project after explicit consent, stop it, choose to be named on your own measurement, or delete what was measured. Use when the user wants to start or stop measuring what their work consumes, add or remove their name, or forget measured data. Not for answering what a period consumed.

Other65

00 Onboard

564

ai-driven-dev/framework

Guide a project's journey through AIDD, from first setup to shipping a feature. Use when the user says onboard me, where do I start, or what to do next. Not for listing every installed surface.

Other65

08 Debug

564

ai-driven-dev/framework

Reproduce and fix a known bug, or find an unknown root cause by hypothesis validation. Use when the user wants to fix a bug, find why something breaks, or reopen a stuck investigation. Not for building a feature or reviewing a diff.

Software Development65

05 Review

564

ai-driven-dev/framework

Reviews work and says whether it is ready, naming each defect with its fix. Use when the user wants a change or diff reviewed. Not for fixing what the review finds, and not for auditing a whole codebase.

Software Development65

09 Defect

564

ai-driven-dev/framework

Produces or refines a backlog Defect from an observed product mismatch. Use when the user wants to report, assess, link, order, transition, or verify a defect. Not for incident response, debugging, or implementation.

Software Development65

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.