antipattern-catalog

Document technical debt, anti-patterns, and patterns to avoid from analyzed frameworks. Use when (1) creating a "Do Not Repeat" list from framework analysis, (2) categorizing observed code smells and issues, (3) assessing severity of architectural problems, (4) generating remediation suggestions, or (5) synthesizing lessons learned across multiple frameworks.

16 stars

Best use case

antipattern-catalog is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Document technical debt, anti-patterns, and patterns to avoid from analyzed frameworks. Use when (1) creating a "Do Not Repeat" list from framework analysis, (2) categorizing observed code smells and issues, (3) assessing severity of architectural problems, (4) generating remediation suggestions, or (5) synthesizing lessons learned across multiple frameworks.

Teams using antipattern-catalog should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/antipattern-catalog/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/antipattern-catalog/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/antipattern-catalog/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How antipattern-catalog Compares

Feature / Agentantipattern-catalogStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Document technical debt, anti-patterns, and patterns to avoid from analyzed frameworks. Use when (1) creating a "Do Not Repeat" list from framework analysis, (2) categorizing observed code smells and issues, (3) assessing severity of architectural problems, (4) generating remediation suggestions, or (5) synthesizing lessons learned across multiple frameworks.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Anti-Pattern Catalog

Documents technical debt and patterns to avoid.

## Process

1. **Collect observations** — Gather issues from Phase 1 & 2 analyses
2. **Categorize** — Structural, behavioral, observability, performance
3. **Assess severity** — Critical, major, minor, cosmetic
4. **Generate remediation** — Suggest fixes for each pattern
5. **Create checklist** — "Do Not Repeat" guidelines

## Anti-Pattern Categories

### Structural Anti-Patterns

Issues with code organization, inheritance, and modularity.

| Pattern | Symptom | Example |
|---------|---------|---------|
| **Deep Inheritance** | 5+ levels of class hierarchy | `Agent → BaseAgent → RunnableAgent → ExecutableAgent → ...` |
| **God Class** | One class with 50+ methods | `AgentExecutor` doing routing, execution, memory, tools |
| **Circular Dependencies** | Module A imports B, B imports A | `agent.py ↔ tools.py` |
| **Leaky Abstraction** | Implementation details exposed | Base class assumes specific LLM response format |
| **Premature Abstraction** | Over-engineered for flexibility | 5 interfaces for a single implementation |

### Behavioral Anti-Patterns

Issues with runtime behavior and logic.

| Pattern | Symptom | Example |
|---------|---------|---------|
| **Hidden State Mutation** | State changes not obvious | `tool.run()` modifies agent's memory |
| **Implicit Contracts** | Undocumented assumptions | Tools assume specific message format |
| **Silent Failures** | Errors swallowed | `except: pass` in tool execution |
| **Infinite Loop Risk** | No termination guarantee | No step limit on agent loop |
| **Race Conditions** | Concurrent state access | Shared dict without locks |

### Observability Anti-Patterns

Issues with debugging and monitoring.

| Pattern | Symptom | Example |
|---------|---------|---------|
| **Hidden LLM Response** | Raw response not accessible | Token counts unavailable |
| **Opaque Errors** | Generic error messages | `"Something went wrong"` |
| **No Tracing** | Can't follow execution | No request IDs, no spans |
| **Swallowed Context** | Information lost | Tool error not fed back to LLM |
| **Missing Metrics** | No performance data | No latency, token, or cost tracking |

### Performance Anti-Patterns

Issues affecting speed and resource usage.

| Pattern | Symptom | Example |
|---------|---------|---------|
| **Sync in Async** | Blocking calls in async code | `requests.get()` in async function |
| **N+1 Queries** | Repeated similar operations | Loading each tool config separately |
| **Unbounded Memory** | History grows forever | No eviction policy |
| **Eager Loading** | Loading unused resources | All tools initialized at startup |
| **No Caching** | Repeated expensive operations | Re-parsing same schema each call |

## Severity Assessment

### Critical (P0)
- Security vulnerabilities
- Data loss risk
- Infinite loops without guards
- Production outage risk

### Major (P1)
- Performance issues >2x slowdown
- Poor error handling
- Difficult to extend
- Concurrency bugs

### Minor (P2)
- Code style issues
- Minor inefficiencies
- Documentation gaps
- Inconsistent patterns

### Cosmetic (P3)
- Naming conventions
- Formatting
- Minor redundancy

## Catalog Entry Template

```markdown
### [Pattern Name]

**Category**: [Structural/Behavioral/Observability/Performance]
**Severity**: [Critical/Major/Minor/Cosmetic]
**Framework(s)**: [Where observed]

#### Description
[Brief explanation of the anti-pattern]

#### Example
[Code snippet showing the problem]

#### Impact
- [Impact 1]
- [Impact 2]

#### Remediation
[How to fix or avoid this pattern]

#### Code Example (Fixed)
[Corrected code snippet]
```

## Common Anti-Patterns Deep Dive

### Deep Inheritance Hell

**Problem**:
```python
class Agent(BaseAgent):
    pass

class BaseAgent(RunnableAgent):
    pass

class RunnableAgent(ExecutableAgent):
    pass

class ExecutableAgent(ConfigurableAgent):
    pass

class ConfigurableAgent(LoggableAgent):
    pass

class LoggableAgent(ABC):
    pass

# 6 layers! Which method comes from where?
```

**Remediation**: Prefer composition over inheritance
```python
class Agent:
    def __init__(
        self,
        executor: Executor,
        config: Config,
        logger: Logger
    ):
        self.executor = executor
        self.config = config
        self.logger = logger
```

### Silent Tool Failures

**Problem**:
```python
def run_tool(self, tool, args):
    try:
        return tool.execute(args)
    except Exception:
        return None  # Error lost forever!
```

**Remediation**: Capture and propagate errors
```python
def run_tool(self, tool, args) -> ToolResult:
    try:
        output = tool.execute(args)
        return ToolResult(success=True, output=output)
    except Exception as e:
        return ToolResult(
            success=False,
            error=f"{type(e).__name__}: {e}",
            traceback=traceback.format_exc()
        )
```

### Hidden LLM Response

**Problem**:
```python
class LLMWrapper:
    def generate(self, prompt: str) -> str:
        response = self.client.chat(prompt)
        return response.content  # Token counts, model info lost!
```

**Remediation**: Expose full response
```python
class LLMWrapper:
    def generate(self, prompt: str) -> LLMResponse:
        response = self.client.chat(prompt)
        return LLMResponse(
            content=response.content,
            model=response.model,
            usage=TokenUsage(
                prompt=response.usage.prompt_tokens,
                completion=response.usage.completion_tokens
            ),
            raw=response  # Always keep raw
        )
```

## Output Template

```markdown
# Anti-Pattern Catalog: [Analysis Name]

## Summary

| Severity | Count |
|----------|-------|
| Critical | 2 |
| Major | 5 |
| Minor | 8 |
| Cosmetic | 3 |

## Critical Issues

### 1. [Pattern Name]
[Full catalog entry]

### 2. [Pattern Name]
[Full catalog entry]

## Major Issues

### 1. [Pattern Name]
[Full catalog entry]

...

## Do Not Repeat Checklist

- [ ] Never use more than 3 levels of inheritance
- [ ] Always expose raw LLM response with token counts
- [ ] Never swallow exceptions without logging
- [ ] Always include step limits on agent loops
- [ ] Never mutate shared state without locks
- [ ] Always provide structured error feedback to LLM
...
```

## Integration

- **Inputs from**: All Phase 1 & 2 analysis skills
- **Feeds into**: `architecture-synthesis` for design decisions
- **Related**: `comparative-matrix` for pattern comparison

Related Skills

asset-catalog-optimizer

16
from diegosouzapw/awesome-omni-skill

Analyze and optimize Xcode asset catalogs - find unused assets, missing resolutions, compress images

antipattern-detector

16
from diegosouzapw/awesome-omni-skill

Detect common technical and organizational anti-patterns in proposals, architectures, and plans. Use when strategic-cto-mentor needs to identify red flags before they become problems.

n8n-skills-catalog

16
from diegosouzapw/awesome-omni-skill

Use to find the right n8n skill for a task, browse available skills, discover workflow patterns, or get an overview of all n8n automation capabilities

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

backend-designer-skill

16
from diegosouzapw/awesome-omni-skill

Design backend architecture, API contracts, core business logic boundaries, and language/framework choices based on architecture/story artifacts. Use when selecting backend stack, auth strategy, and service design.

backend-design

16
from diegosouzapw/awesome-omni-skill

Elite Tier Backend standards, including Vertical Slice Architecture, Zero Trust Security, and High-Performance API protocols.

Backend Database Expert

16
from diegosouzapw/awesome-omni-skill

专注于数据库设计、SQL 优化和迁移策略。

backend-coding

16
from diegosouzapw/awesome-omni-skill

Expert backend development guidance covering Node.js, Python, Java, Go, API design (REST/GraphQL/gRPC), database patterns, authentication, caching, message queues, microservices, and testing. Produces production-ready, scalable, and secure backend code with industry best practices. Use when building APIs, implementing business logic, designing data models, integrating services, or when users mention backend development, server-side code, APIs, databases, or microservices.

backend-architecture

16
from diegosouzapw/awesome-omni-skill

Design and implement scalable backend infrastructure, microservices, and system architecture patterns.

backend-architect

16
from diegosouzapw/awesome-omni-skill

Expert backend architect specializing in scalable API design, microservices architecture, and distributed systems. Masters REST/GraphQL/gRPC APIs, event-driven architectures, service mesh patterns, and modern backend frameworks. Handles service boundary definition, inter-service communication, resilience patterns, and observability. Use PROACTIVELY when creating new backend services or APIs.

Backend API

16
from diegosouzapw/awesome-omni-skill

Manage items, projects, and references in Senticor Project via REST API

babel-config

16
from diegosouzapw/awesome-omni-skill

Generates Babel configuration for JavaScript transpilation in tests. Creates babel.config.js file.