Coding

Anti-Pattern Czar

Try it

Detect and fix TypeScript error handling anti-patterns with state persistence and approval workflows. Use when scanning a codebase for silent error failures,...

What it does

Autonomous agent that systematically identifies and fixes TypeScript error handling anti-patterns.

The skill document

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 SaysModeAction
"scan", "detect", "find"SCANRun detector, save state
"review", "fix", "help me fix"REVIEWInteractive fix session
"auto", "fix all", "autonomous"AUTOBatch fix with guardrails
"resume", "continue"RESUMELoad state, continue
"report", "status", "progress"REPORTShow 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": "",
  "started_at": "",
  "target_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 first pending issue
  • REPORT: Display session stats, severity table, recent fixes, next actions

Approved Overrides

Only suggest APPROVED_OVERRIDE when ALL are true:

  1. Error is expected and frequent
  2. Logging would create excessive noise
  3. There is explicit recovery/fallback logic
  4. Reason is specific and technical

NEVER approve overrides on critical paths without exceptional user confirmation.

Format:

} catch {
  // [APPROVED_OVERRIDE] 
  // Fallback: 
}

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%

Related skills

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván1 installs

cli-creator

Official

Build an installable CLI Codex can run by name from any directory, with composable commands and stable JSON output.

by OpenAI27.5k stars

Create, test, and refine agent skills through an iterative loop of writing, evaluating, and rewriting.

by Anthropic177.5k stars

figma-use

Official

Run JavaScript in Figma files via the Plugin API through the use_figma MCP tool, with enforced rules for safe execution.

by OpenAI27.5k stars

aspnet-core

Official

Get current Microsoft-documented guidance for ASP.NET Core app models, host and pipeline composition, and built-in framework features.

by OpenAI27.5k stars

More from glucksberg

Browse all skills

Find duplicate PRs and missing issue-to-PR links in a GitHub repo, grouped into scored thematic clusters.

by glucksberg43 installs

Manage forks with open PRs - sync upstream, rebase branches, track PR status, and maintain production branches with pending contributions. Supports automatic...

by glucksberg86 installs1 stars

Find and fix code issues before publishing a PR. Single-pass review with auto-fix. Use when reviewing code changes before submission or auditing existing cod...

by glucksberg86 installs

Pre-ship risk report for OpenClaw PRs. Dynamically explores the codebase to assess module risk, blast radius, and version-specific gotchas. Scores each findi...

by glucksberg48 installs

Create portable OpenClaw cron health checks with deterministic scripts, config, validation, and reports.

by glucksberg11 installs1 stars

Audit Git repositories and worktrees, preserve findings, and monitor scheduled audit health without deleting work.

by glucksberg1 installs