anti-pattern-czar
БесплатноБез исполняемых скриптовНе проверенDetect and fix TypeScript error handling anti-patterns with state persistence and approval workflows. Use when scanning a codebase for silent error failures…
от modbender★ 21 звезда на GitHubОб этом скилле
Anti-Pattern Czar
Autonomous agent that systematically identifies and fixes TypeScript error handling anti-patterns.
Detector
Run with Bun (no install required):
bunx antipattern-czar
bunx antipattern-czar --src lib
bunx antipattern-czar --config my-config.json
Config via .antipatternrc.json:
{
"srcDir": "src",
"criticalPaths": ["DatabaseService.ts", "AuthHandler.ts"],
"skipDirectories": ["node_modules", "dist", ".git"]
}
Mode Selection
Parse user intent to pick mode:
| User Says | Mode | Action |
|---|---|---|
| "scan", "detect", "find" | SCAN | Run detector, save state |
| "review", "fix", "help me fix" | REVIEW | Interactive fix session |
| "auto", "fix all", "autonomous" | AUTO | Batch fix with guardrails |
| "resume", "continue" | RESUME | Load state, continue |
| "report", "status", "progress" | REPORT | Show current state |
State File
Always check .anti-pattern-state.json at the project root. On first SCAN, ask if resuming when it exists.
{
"session_id": "<uuid>",
"started_at": "<ISO>",
"target_path": "<path>",
"issues": [],
"history": []
}
Issue schema: id, file, line, pattern, severity (critical/high/medium), is_critical_path, status (pending/fixed/approved_override/skipped), code_snippet.
Workflow by Mode
See workflows.md for full per-mode workflows. Summary:
- SCAN: Run detector → parse issues → classify severity → save state → show summary
- REVIEW: Load state → sort by critical-path + severity → read code context → explain issue → propose fix options → apply approved fix → update state
- AUTO: Confirm with user → auto-fix non-critical-path issues using templates → switch to REVIEW for critical-path hits → show summary
- RESUME: Load
.anti-pattern-state.json→ continue from firstpendingissue - REPORT: Display session stats, severity table, recent fixes, next actions
Approved Overrides
Only suggest APPROVED_OVERRIDE when ALL are true:
- Error is expected and frequent
- Logging would create excessive noise
- There is explicit recovery/fallback logic
- Reason is specific and technical
NEVER approve overrides on critical paths without exceptional user confirmation.
Format:
} catch {
// [APPROVED_OVERRIDE] <specific technical reason>
// Fallback: <what happens instead>
}
Fix Templates
See patterns.md for the full pattern list with severity, auto-fix eligibility, and code templates.
Progress Output Format
After each fix:
✅ Fixed: src/services/example.ts:42
Pattern: NO_LOGGING_IN_CATCH
Solution: Added logger.error() with context
Progress: 4/28 issues remaining ━━━━━━━ 14%
Установить anti-pattern-czar в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл anti-pattern-czar?
Detect and fix TypeScript error handling anti-patterns with state persistence and approval workflows. Use when scanning a codebase for silent error failures, empty catches, promise swallowing, or unlogged errors. Supports five modes — scan (detect all issues), review (interactive fix session), auto (batch fix with guardrails), resume (continue from last session), report (show progress). Triggers on phrases like 'scan for anti-patterns', 'fix error handling', 'find empty catches', 'anti-pattern czar', or 'check error handling'.
Как установить скилл anti-pattern-czar?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл anti-pattern-czar запускает скрипты?
Нет, скилл состоит только из инструкций (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