ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 3/5

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'.

Why use this skill?

Systematically scan, review, and fix TypeScript error handling anti-patterns with the Anti-Pattern Czar agent. Improve code reliability with automated guardrails.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/glucksberg/anti-pattern-czar
Or

What This Skill Does

The anti-pattern-czar is a specialized OpenClaw agent skill designed to audit, detect, and resolve TypeScript error handling issues systematically. It serves as a guardrail for your codebase, identifying silent failures like empty catch blocks, swallowed promises, and unlogged exceptions. Unlike simple linters that just report issues, this agent maintains state across sessions, allowing you to move through technical debt incrementally without losing progress. It uses a structured workflow covering scan, review, auto-fix, and reporting modes to ensure that fixes are either applied automatically via vetted templates or manually reviewed for critical application paths.

Installation

To add this skill to your OpenClaw environment, execute the following command in your terminal:

clawhub install openclaw/skills/skills/glucksberg/anti-pattern-czar

Ensure you have Bun installed, as the underlying detector relies on bunx to function optimally within your project directory.

Use Cases

  • Legacy Code Cleanup: Use the SCAN mode on large, aging repositories to identify and catalog years of accumulated 'quick fixes' that hide runtime errors.
  • Production Stability: Run the agent on your Auth or Database services to ensure no critical failure path is silently failing, which is vital for maintaining system reliability.
  • Onboarding & Code Quality: Incorporate the tool into your development flow to prevent junior developers or rapid prototyping from introducing anti-patterns into the production build.
  • Continuous Refactoring: Use the RESUME mode during long-term migration projects to chip away at error handling issues between feature releases.

Example Prompts

  • 'Scan the src folder for anti-patterns and give me a summary report of what you find.'
  • 'I need to fix error handling in my AuthHandler.ts; start an interactive review session.'
  • 'I've addressed the critical bugs, please run an auto-fix on the remaining non-critical issues and show me a progress update.'

Tips & Limitations

  • Respect Critical Paths: Always define criticalPaths in your .antipatternrc.json to prevent the agent from blindly auto-fixing sensitive logic where manual oversight is required.
  • State Persistence: Always check the .anti-pattern-state.json file before running a new scan if you previously aborted a session to avoid redundant work.
  • Approve Overrides Carefully: Use the APPROVED_OVERRIDE pattern sparingly. It is intended for edge cases where the error is expected; do not abuse it to suppress legitimate bugs that you don't feel like fixing yet.
  • Formatting: Keep in mind the agent will modify your source files; ensure you have a clean git state before running batch AUTO mode fixes.

Metadata

Stars2387
Views1
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-glucksberg-anti-pattern-czar": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#typescript#error-handling#code-quality#refactoring#developer-tools
Safety Score: 3/5

Flags: file-write, file-read, code-execution

Related Skills

issue-prioritizer

Prioritize GitHub issues by ROI, solution sanity, and architectural impact. Use when triaging or ranking issues to identify quick wins, over-engineered proposals, and actionable bugs. Don't use when managing forks (use fork-manager) or general GitHub queries (use github). Read-only — never modifies repositories.

glucksberg 2387

fork-manager

Manage forks with open PRs - sync upstream, rebase branches, track PR status, and maintain production branches with pending contributions. Supports automatic conflict resolution via --auto-resolve flag (spawns AI subagents to resolve rebase conflicts). Use when syncing forks, rebasing PR branches, building production branches that combine all open PRs, reviewing closed/rejected PRs, or managing local patches kept outside upstream. Requires Git and GitHub CLI (gh).

glucksberg 2387

pr-ship

Pre-ship risk report for OpenClaw PRs. Dynamically explores the codebase to assess module risk, blast radius, and version-specific gotchas. Scores each finding by severity (🟢/🟡/🔴). Updated frequently with the latest OpenClaw version context — run `clawhub update pr-ship` regularly to stay current.

glucksberg 2387

cross-ref

Cross-reference GitHub PRs and issues to find duplicates and missing links. Spawns parallel Sonnet subagents to semantically analyze the last N PRs and issues, finding PRs that solve the same problem (duplicates) and issues resolved by open PRs but not yet linked. Groups findings into thematic clusters, scores them by actionability, and offers rate-limited commenting or bulk actions (close, label). Use this skill when the user wants to find duplicate PRs, link issues to PRs, clean up a repo's cross-references, or audit PR/issue relationships. Also useful when the user says things like "find related PRs", "which PRs fix this issue", "are there duplicate PRs", "link issues and PRs", or "audit cross-references".

glucksberg 2387

pr-review

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 code for bugs/security. Don't use when running a coding agent to write code (use coding-agent) or checking GitHub CI status (use github).

glucksberg 2387