refactoring-diagnosis
БесплатноБез исполняемых скриптовНе проверенUse when identifying bad code/design and selecting refactor targets - produces a diagnosis report with smells, risks, and refactor vs rewrite decision
от withzombies★ 81 звезда на GitHubОб этом скилле
2. Gather Evidence
Minimum evidence sources:
- Read relevant production code paths
- Read tests or lack thereof
- Identify entrypoints and call chains
- Note any concurrency/IPC boundaries
3. Map to Smells/Traps (Evidence Required)
Use the catalogs in references:
references/smell-catalog.mdreferences/test-smells.mdreferences/concurrency-ipc-traps.md
For each smell/trap, cite concrete evidence (file path, function, behavior).
4. Assess Risk and Impact
Classify each smell by:
- Severity (low/med/high)
- Change risk (low/med/high)
- Blast radius (local/module/system)
- Recurrence likelihood
5. Refactor vs Rewrite Decision
Rules of thumb:
- If tests are absent and behavior is unknown → write characterization tests before refactor
- If 3+ refactor attempts failed or behavior is unstable → consider rewrite
- If change risk is high and scope is large → split into smaller refactors
6. Produce Diagnosis Report (Required Format)
Use this exact structure:
## Scope
- In scope:
- Out of scope:
- Constraints:
## Evidence
- Files reviewed:
- Entry points:
- Tests reviewed:
- Concurrency/IPC boundaries:
## Smells and Traps (Evidence-Backed)
| Smell/Trap | Evidence | Risk | Suggested Refactor Direction |
## Test Smells
| Test Smell | Evidence | Risk | Suggested Fix |
## Concurrency/IPC Traps
| Trap | Evidence | Risk | Suggested Fix |
## Risk Assessment
- Highest risk areas:
- Largest blast radius:
- Most likely regression vectors:
## Refactor vs Rewrite Decision
- Decision:
- Rationale:
## Top Refactor Targets (Prioritized)
1.
2.
3.
## Non-goals
-
## Open Questions
-
Установить refactoring-diagnosis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл refactoring-diagnosis?
Use when identifying bad code/design and selecting refactor targets - produces a diagnosis report with smells, risks, and refactor vs rewrite decision
Как установить скилл refactoring-diagnosis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл refactoring-diagnosis запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic