refactor-radar
AI self-monitoring skill. Detects architectural debt, confusing schemas, inconsistent patterns that cause repeated AI mistakes. Offers to create refactoring…
от eltmon★ 36 звёзд на GitHub
Установить refactor-radar в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Refactor Radar
Detects systemic codebase issues that repeatedly confuse AI assistants and offers to create refactoring proposals.
When to Trigger (Self-Assessment)
IMPORTANT: This skill is NOT user-invoked. Trigger when you detect patterns that will cause ONGOING confusion, not one-time mistakes.
Architectural Smells (High Confidence)
Inconsistent Naming Across Layers [category:
naming]- DB uses snake_case, API uses camelCase, frontend uses kebab-case
- Same concept has different names in different places (
user,account,member) - Example:
users.created_at→ API returnscreatedAt→ Frontend displayscreation-date
Schema/Model Mismatch [category:
schema]- ORM models don't match actual DB schema
- TypeScript types don't match API responses
- Documentation describes different structure than code
- Example: Type says
user.email: stringbut DB allows null
Inconsistent Patterns in Same Codebase [category:
patterns]- Some services use Repository pattern, others direct DB access
- Mixed async patterns (callbacks, promises, async/await)
- Multiple state management approaches in same frontend
- Example:
/api/usersuses REST,/api/ordersuses GraphQL
Ambiguous or Misleading Names [category:
naming]UserServicethat also handles authenticationutils.tswith 2000 lines of unrelated functionsdatafolder containing both models and migrations- Example:
processUser()that actually deletes users
Circular or Tangled Dependencies [category:
dependencies]- Service A imports from Service B which imports from Service A
- Shared types scattered across multiple packages
- Example:
authmodule depends onusermodule depends onauth
Data Model Issues (Medium Confidence)
Implicit Relationships [category:
database-migrations]- Foreign keys exist in code but not in DB constraints
- Relationships documented nowhere
- Example:
order.userIdexists but no FK constraint, unclear if cascade deletes
Overloaded Columns [category:
schema]- Single column stores multiple types of data
- Status fields with 15+ possible values
- JSON blobs that should be normalized
- Example:
metadataJSON column used for 8 different purposes
Historical Cruft [category:
legacy]- Deprecated columns still in schema
- Dead code paths still present
- Multiple versions of same logic
- Example: Both
v1_process()andprocess()exist, unclear which to use
Convention Drift (Lower Confidence)
Style Guide Violations [category:
code-organization]- Older code doesn't follow current patterns
- Different developers used different conventions
- Example: Half the codebase uses
async/await, half uses.then()
Missing Abstractions [category:
code-organization]- Same boilerplate repeated across many files
- Copy-paste patterns that should be utilities
- Example: Same 20-line auth check in 15 different handlers
Invocation Protocol
Step 0: Check for Permanent Override
FIRST, check if user has permanently disabled this skill:
# If project has override skill, this skill is permanently disabled
if [ -f ".claude/skills/refactor-radar/SKILL.md" ]; then
# User has "shut up forever" - do nothing
exit 0
fi
Step 0.5: Check User Preferences for Category Exclusions
Check ~/.overdeck/context/global.md for excluded categories:
grep -A 20 "## AI Suggestion Preferences" ~/.overdeck/context/global.md 2>/dev/null
Look for sections like:
## AI Suggestion Preferences
### refactor-radar
skip: database-migrations, build-system, infrastructure
welcome: naming, code-organization
If the current trigger category is in the skip list, do not prompt.
Step 1: Check Configuration
cat .overdeck/refactor-radar.json 2>/dev/null || echo "{}"
Default configuration:
{
"enabled": true,
"mode": "normal",
"promptCooldownMinutes": 60,
"lastPromptTimestamp": null,
"proposalsCreated": 0,
"dismissedCount": 0,
"sessionDismissals": 0
}
Modes:
"aggressive"- Prompt on every detected issue"normal"- High/medium confidence issues, respect cooldown"minimal"- Only obvious architectural problems"silent"- Log internally, never prompt"disabled"- Completely off
Step 2: Respect Cooldowns
Skip prompting if:
- Mode is "disabled" or "silent"
sessionDismissals >= 2(user said "not now" twice this session)- Less than
promptCooldownMinutessince last prompt - Already proposed this exact issue before
Step 3: Present to User
Refactor Radar: Architectural Issue Detected [category: {CATEGORY}]
I've noticed a systemic issue that's causing confusion:
Issue: [SPECIFIC PROBLEM]
Evidence:
- [CONCRETE EXAMPLE 1]
- [CONCRETE EXAMPLE 2]
Impact: This will likely cause repea
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл refactor-radar?
AI self-monitoring skill. Detects architectural debt, confusing schemas, inconsistent patterns that cause repeated AI mistakes. Offers to create refactoring proposals as issues. NOT user-invoked - AI triggers when detecting systemic codebase issues causing confusion.
Как установить скилл refactor-radar?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл refactor-radar запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…