07-refactor — скилл для Claude Code: что делает и как установить
Скилл 07-refactor меняет код к лучшему по одной из четырёх осей: производительность, безопасность, чистота, архитектура. Работает по своему сканированию или по готовому отчёту аудита.
MIT ★ 571 обновлён 2026-10-29
/plugin marketplace add ai-driven-dev/framework
/plugin install aidd-dev@aidd-frameworkЧто делает 07-refactor
Скилл 07-refactor правит код по одной из четырёх осей: performance, security, cleanup, architecture. Перед запуском он читает файл нужной оси в actions/, а не только таблицу действий.
cleanup, performance и architecture сохраняют публичные входы и выходы, проверка идёт тестами, проверкой типов или прогоном бок о бок. security может поменять поведение, чтобы закрыть дыру, и обязан об этом предупредить. Нужен разбор кода без правок? Скилл пишет в файлы, для чтения он не подходит.
Если передать отчёт аудита, путь под aidd_docs/tasks/audits/ или вставленные находки, сканирование пропускается: находки по оси становятся списком правок. Запрос без указания оси получает один вопрос, все применимые оси или одна. Просьба удалить код сразу уходит в cleanup. Апгрейд зависимостей и редизайн интерфейса вне области.
Какие задачи решает
- убрать дубли и мёртвый код перед ревью
- закрыть найденные дыры в валидации ввода и правах доступа
- снять N+1 в горячем пути и лишние обращения к диску
- вынести слои и развязать связанные модули
- превратить готовый отчёт аудита в применённые правки
Примеры запросов агенту
- Прогони ось
securityпоapi/и закрой найденные дыры, а правки, которые меняют поведение, перечисли отдельно. - Убери мёртвый код и дубли в модуле оплаты, публичные входы и выходы не трогай.
- Возьми отчёт из
aidd_docs/tasks/audits/и примени находки по производительности.
Как установить 07-refactor
1Через маркетплейс плагинов
/plugin marketplace add ai-driven-dev/framework/plugin install aidd-dev@aidd-frameworkКоманда ставит плагин aidd-dev целиком, со всеми его скиллами
2Через Skills CLI (Vercel)
npx skills add ai-driven-dev/framework --skill 07-refactor -a claude-code3Вручную: положить файлы
~/.claude/skills/07-refactor/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/07-refactor/
1Через Skills CLI (Vercel)
npx skills add ai-driven-dev/framework --skill 07-refactor -a codex2Вручную: положить файлы
.agents/skills/07-refactor/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add ai-driven-dev/framework --skill 07-refactor -a cursor2Вручную: положить файлы
.cursor/skills/07-refactor/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install ai-driven-dev/framework plugins/aidd-dev/skills/07-refactor2Вручную: положить файлы
.github/skills/07-refactor/SKILL.md1Через Skills CLI (Vercel)
npx skills add ai-driven-dev/framework --skill 07-refactor -a gemini-cli2Командой платформы
gemini skills install https://github.com/ai-driven-dev/framework --path plugins/aidd-dev/skills/07-refactorВручную: положить файлы
.devin/skills/07-refactor/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add ai-driven-dev/framework --skill 07-refactor -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о 07-refactor
Как установить 07-refactor в Claude Code?
Через маркетплейс: сначала /plugin marketplace add ai-driven-dev/framework, потом /plugin install aidd-dev@aidd-framework.
Что делает 07-refactor?
Правит код по одной из четырёх осей: производительность, безопасность, чистота кода, архитектура. Вызывают его, когда код нужно улучшить, а не просто осмотреть.
Как передать скиллу готовый отчёт аудита?
Укажите путь под aidd_docs/tasks/audits/ или вставьте находки в запрос. Скилл возьмёт их как список правок по оси и не станет сканировать заново.
Исходный текст
SKILL.md · MIT
--- 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 | # | 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. - 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, 🟡 major, 🟢 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 · ai-driven-dev/framework