Command Palette

Search for a command to run...

Назад к скиллам
скилл № 80866

refactor-radar

AI self-monitoring skill. Detects architectural debt, confusing schemas, inconsistent patterns that cause repeated AI mistakes. Offers to create refactoring…

БесплатноБез исполняемых скриптов
eltmonот 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)

  1. 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 returns createdAt → Frontend displays creation-date
  2. 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: string but DB allows null
  3. 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/users uses REST, /api/orders uses GraphQL
  4. Ambiguous or Misleading Names [category: naming]

    • UserService that also handles authentication
    • utils.ts with 2000 lines of unrelated functions
    • data folder containing both models and migrations
    • Example: processUser() that actually deletes users
  5. Circular or Tangled Dependencies [category: dependencies]

    • Service A imports from Service B which imports from Service A
    • Shared types scattered across multiple packages
    • Example: auth module depends on user module depends on auth

Data Model Issues (Medium Confidence)

  1. Implicit Relationships [category: database-migrations]

    • Foreign keys exist in code but not in DB constraints
    • Relationships documented nowhere
    • Example: order.userId exists but no FK constraint, unclear if cascade deletes
  2. Overloaded Columns [category: schema]

    • Single column stores multiple types of data
    • Status fields with 15+ possible values
    • JSON blobs that should be normalized
    • Example: metadata JSON column used for 8 different purposes
  3. Historical Cruft [category: legacy]

    • Deprecated columns still in schema
    • Dead code paths still present
    • Multiple versions of same logic
    • Example: Both v1_process() and process() exist, unclear which to use

Convention Drift (Lower Confidence)

  1. 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()
  2. 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 promptCooldownMinutes since 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

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

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), без исполняемых скриптов.

Похожие скиллы

Сравнить refactor-radar с