Agent skill

07 Refactor

by ai-driven-dev in ai-driven-dev/framework

Improve code across four axes (cleanup, performance, security, architecture) by scanning and fixing, or applying a pushed audit report.

MITAuto-check passedDevelopment

Install 07 Refactor

skills CLI
$ npx skills add ai-driven-dev/framework --skill 07-refactor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ai-driven-dev/framework 07-refactor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ai-driven-dev/framework.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/aidd-dev/skills/07-refactor .claude/skills/07-refactor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
07-refactor
GitHub stars
510
Token cost
~602 tokens
SKILL.md length
273 words
Files
5
Skills in repo
52
Repo updated
First seen
Licence
MIT

At a glance

Improve code across four axes (cleanup, performance, security, architecture) by scanning and fixing, or applying a pushed audit report.

  • The user wants to refactor
  • SKILL.md covers Actions and Transversal rules
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Refactoring

What it does

07 Refactor is an agent skill from ai-driven-dev/framework. 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.

Its SKILL.md is about 600 tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files (for example `actions/01-performance.md`, `actions/02-security.md` and `actions/03-cleanup.md`).

It sits in Development, covering Refactoring and Accessibility. The repository describes itself as: Marketplace Framework AI-Driven Dev : Context Engineering, Plugins, Agents, Skills, Hooks, Templates, SDLC. The licence is MIT.

When your agent uses it

  • The user wants to refactor
  • Tasks that involve Refactoring
  • Tasks that involve Accessibility

Example prompts

  • “/07-refactor”

What it can do on your machine

Read from SKILL.md and the folder at commit 6e30640. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

07 Refactor loads about 602 tokens when it runs. Until then it costs about 66 tokens; SKILL.md has 273 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~66
When it runs · the whole SKILL.md, loaded when a task matches
~602

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ai-driven-dev/framework at commit 6e30640, republished under its MIT licence (© ai-driven-dev). 273 words, ~602 tokens.

Download SKILL.mdSave it as .claude/skills/07-refactor/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
07-refactor
description
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.
argument-hint
scope | audit

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

#ActionAxisLens
01performanceperformanceN+1, hot paths, batching, memoization, unnecessary I/O
02securitysecurityOWASP, input validation, authz, secrets: harden and fix
03cleanupcode-qualityclean code: rename, extract, DRY, dead code, complexity
04architecturearchitectureextract 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.
  • Behavior-preserving for cleanup, performance, and architecture: public inputs and outputs stay identical, verified by tests, type checks, or a side-by-side run. Security may alter behavior to close a vulnerability, and must call that out explicitly.
  • Audit-fed, optional: when the caller pushes an audit report (a path under aidd_docs/tasks/audits/ or pasted findings), take its findings for this axis as the fix list and skip the scan. The bridge is the report artifact; this skill never loads or calls another skill. The audit code-quality pillar feeds the cleanup axis; the other axes map by name.
  • Severity uses the shared 3-level scale: 🔴 critical, 🟡 warning, 🟢 minor.
  • Stay inside the axis: dependency upgrades and UI redesign are out of scope. Add tests only as a regression for a security fix, never otherwise.

© ai-driven-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files in plugins/aidd-dev/skills/07-refactor of ai-driven-dev/framework.

  • SKILL.md
  • actions/01-performance.md
  • actions/02-security.md
  • actions/03-cleanup.md
  • actions/04-architecture.md

Open the folder on GitHubat commit 6e30640

Compare with similar skills

07 Refactor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

07 Refactor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
07 Refactor this skillai-driven-dev/framework510—~602Automated safety check: PassMIT
Tsh Reviewing FrontendTheSoftwareHouse/copilot-collections284—~4.4kAutomated safety check: PassMIT
Panel Reviewstacklok/mecatl218—~5.8kAutomated safety check: PassApache-2.0
Extract UI Componentbitovi/ai-enablement-prompts121—~1.1kAutomated safety check: PassMIT
Selector Drift Recoverypetrkindlmann/qa-skills163—~5.1kAutomated safety check: PassMIT
Angular Componentaiskillstore/marketplace4301 repos~1.7kAutomated safety check: PassNone

Similar skills

  • Tsh Reviewing Frontend

    TheSoftwareHouse/copilot-collections

    Frontend-specific code review criteria, component anti-patterns, hooks quality, rendering correctness, accessibility and performance spot-checks, and module organization issues.

    284 GitHub stars~4.4k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Panel Review

    stacklok/mecatl

    Review completed non-trivial code across four independent axes: Spec, Standards, Test adequacy, and installed Domain specialists.

    218 GitHub stars~5.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Extract UI Component

    bitovi/ai-enablement-prompts

    Extract reusable UI components from inline patterns. An agent skill from bitovi/ai-enablement-prompts.

    121 GitHub stars~1.1k tokensUpdated 26 days ago
    Frontend & DesignAuto-check passed
  • Selector Drift Recovery

    petrkindlmann/qa-skills

    Bulk-regenerate broken test selectors after a UI refactor or redesign.

    163 GitHub stars~5.1k tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Angular Component

    aiskillstore/marketplace

    Create modern Angular standalone components following v20+ best practices.

    430 GitHub starsUsed in 1 repo~1.7k tokens
    Frontend & DesignAuto-check passed
  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 22 repos~577 tokens
    DevelopmentAuto-check passed

More from ai-driven-dev/framework

All 52 skills in this repo
  • 00 Async Dev

    ai-driven-dev/framework

    Drive the async-dev pipeline from one entry point, whether setup, run, or review.

    510 GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • 01 Plan

    ai-driven-dev/framework

    Turn a request, ticket, or file into a phased implementation plan.

    510 GitHub stars~517 tokensUpdated today
    Auto-check passed
  • 01 Sdlc

    ai-driven-dev/framework

    Autonomously orchestrates a request from framing to a draft pull request, isolating implementation, independent review, and final outcome challenge.

    510 GitHub stars~583 tokensUpdated today
    Auto-check passed
  • 02 Backlog

    ai-driven-dev/framework

    Orchestrates a product backlog end to end. An agent skill from ai-driven-dev/framework.

    510 GitHub stars~613 tokensUpdated today
    Auto-check passed
  • 00 Onboard

    ai-driven-dev/framework

    Guide a project's journey through AIDD, from first setup to shipping a feature.

    510 GitHub stars~242 tokensUpdated today
    Auto-check passed
  • 01 Acceptance QA

    ai-driven-dev/framework

    Validate a reviewed candidate's observable behavior against its acceptance criteria and record short named videos as reviewer evidence.

    510 GitHub stars~434 tokensUpdated today
    Auto-check passed

Categories

Questions about 07 Refactor

What does 07 Refactor do?

Improve code across four axes (cleanup, performance, security, architecture) by scanning and fixing, or applying a pushed audit report. 07 Refactor is an agent skill from ai-driven-dev/framework. Improve code across four axes (cleanup, performance, security, architecture) by scanning and fixing, or applying a pushed audit report.

When should I use 07 Refactor?

07 Refactor fits situations like: the user wants to refactor; tasks that involve Refactoring; tasks that involve Accessibility.

How do I install 07 Refactor in Claude Code?

Run `npx skills add ai-driven-dev/framework --skill 07-refactor -a claude-code`. Or copy the skill folder (plugins/aidd-dev/skills/07-refactor in ai-driven-dev/framework) into .claude/skills/07-refactor in your project. Claude Code loads it when a task matches its description.

How do I install 07 Refactor in Codex?

Run `npx skills add ai-driven-dev/framework --skill 07-refactor -a codex`. Or copy the skill folder (plugins/aidd-dev/skills/07-refactor in ai-driven-dev/framework) into .agents/skills/07-refactor in your project. Codex loads it when a task matches its description.

Can I use 07 Refactor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ai-driven-dev/framework --skill 07-refactor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/07-refactor, .gemini/skills/07-refactor, .github/skills/07-refactor and .opencode/skills/07-refactor in your project.

What does 07 Refactor need to run?

SKILL.md names no scripts, command-line tools or credentials: 07 Refactor is instructions for the agent only.

Does 07 Refactor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is 07 Refactor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does 07 Refactor use?

07 Refactor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does 07 Refactor use?

About 602 tokens (SKILL.md is roughly 2.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to 07 Refactor?

Skills that share tags, products or a category with 07 Refactor: Tsh Reviewing Frontend (TheSoftwareHouse/copilot-collections, 284 stars), Panel Review (stacklok/mecatl, 218 stars), Extract UI Component (bitovi/ai-enablement-prompts, 121 stars) and Selector Drift Recovery (petrkindlmann/qa-skills, 163 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains 07 Refactor?

ai-driven-dev (a GitHub organization) maintains it in ai-driven-dev/framework, which has 510 GitHub stars. The repository holds 52 skills in this directory. The repository was last updated on October 7, 2026.

Source: ai-driven-dev/framework on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.