/antipatterns
Check for anti-patterns and convention violations
$ npx -y skills add dcouple/Pane --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/antipatterns
Context preview
What this command does when you run it.
Check for anti-patterns and convention violations
Command definition
antipatterns.mdallowed-tools: Bash(git diff:*), Bash(git log:*), Bash(git show:*), Bash(git rev-parse:*), Bash(git branch:*), Read, Grep, Glob, TodoWrite
description: Check for anti-patterns and convention violations
/review:antipatterns - Anti-Pattern Checker
You are reviewing code changes for **anti-patterns** and convention violations.
The Principle
Avoid async imports mid-code, unused conventions, established pattern violations.
**Note:** Anti-patterns change as codebase evolves. What was acceptable early may become problematic at scale. This is best caught through active research, not static documentation.
Phase 1: Gather Context
# Get current branch
git rev-parse --abbrev-ref HEAD
# Get changed files
git diff main...HEAD --name-only
# Get full diff
git diff main...HEAD
Read the relevant CLAUDE.md files to understand established patterns:
- `/CLAUDE.md` - Root conventions
- `/apps/webapp/CLAUDE.md` - Frontend conventions
- `/apps/api/CLAUDE.md` - Backend conventions
Phase 2: Check for Anti-Patterns
2.1 Import Anti-Patterns
**Check for:**
- Relative imports when `@/` aliases should be used
- Dynamic imports where static would work
- Circular import risks
- Importing from internal module paths instead of public exports
**This codebase requires:**
// CORRECT
import { Something } from '@/modules/feature/service';
import { Shared } from '@doozy/shared';
// WRONG
import { Something } from '../../../modules/feature/service';2.2 Async/Await Anti-Patterns
**Check for:**
- Mixed async/await and .then() chains
- Missing error handling on async operations
- Async functions that don't need to be async
- Promise.all where sequential would be safer (or vice versa)
- Fire-and-forget async calls without error handling
2.3 Error Handling Anti-Patterns
**Check for:**
- Empty catch blocks
- Catching and ignoring errors
- Inconsistent error handling patterns
- Missing try/catch on async operations
- Throwing generic errors instead of typed ones
2.4 State Management Anti-Patterns (Frontend)
**Check for:**
- Direct state mutation
- State stored in wrong location (local vs global)
- Missing loading/error states
- Stale closure issues in hooks
- Missing dependency arrays in useEffect/useCallback/useMemo
2.5 API Anti-Patterns (Backend)
**Check for:**
- Business logic in controllers (should be in services)
- Direct database access outside repository/service layer
- Missing input validation
- Inconsistent response formats
- Missing error responses
2.6 TypeScript Anti-Patterns
**Check for:**
- Using `any` type
- Type assertions (`as`) that could be avoided
- Missing return types on functions
- Overly complex generic types
- Using `!` non-null assertion excessively
2.7 File Structure Anti-Patterns
**Check for:**
- Files in wrong directories
- Naming inconsistencies
- Missing index exports
- Components in wrong folders
Phase 3: Generate Report
# Anti-Pattern Report
**Branch:** {branch}
**Status:** {PASS | WARN | FAIL}
## Summary
{One sentence assessment}
## Conventions Checked
- [x] Import style (@/ aliases)
- [x] Async/await patterns
- [x] Error handling
- [x] State management (if frontend)
- [x] API patterns (if backend)
- [x] TypeScript usage
- [x] File structure
## Anti-Patterns Found
### Critical (Must Fix)
| Location | Anti-Pattern | Fix |
|----------|--------------|-----|
| {file:line} | {description} | {how to fix} |
### Warnings
| Location | Anti-Pattern | Recommendation |
|----------|--------------|----------------|
| {file:line} | {description} | {suggestion} |
## Import Issues
| File | Current Import | Should Be |
|------|----------------|-----------|
| {file:line} | `{bad import}` | `{correct import}` |
## Async/Await Issues
| Location | Issue | Fix |
|----------|-------|-----|
| {file:line} | {description} | {how to fix} |
## Error Handling Issues
| Location | Issue | Fix |
|----------|-------|-----|
| {file:line} | {description} | {how to fix} |
## TypeScript Issues
| Location | Issue | Fix |
|----------|-------|-----|
| {file:line} | {description} | {how to fix} |
## Recommendations
1. {specific action with file reference}
2. {specific action with file reference}Phase 4: Output
1. Save report to `tmp/review-antipatterns-{branch}.md` 2. Present summary:
- PASS/WARN/FAIL status
- Count of anti-patterns by category
- Most critical issues
Scoring Criteria
- **PASS**: Code follows established patterns and conventions
- **WARN**: Minor deviations from conventions
- **FAIL**: Significant anti-patterns or convention violations
Run this analysis now on the current branch.
Read more
allowed-tools: Bash(git diff:*), Bash(git log:*), Bash(git show:*), Bash(git rev-parse:*), Bash(git branch:*), Read, Grep, Glob, TodoWrite description: Check for anti-patterns and convention violations
/review:antipatterns - Anti-Pattern Checker
You are reviewing code changes for **anti-patterns** and convention violations.
The Principle
Avoid async imports mid-code, unused conventions, established pattern violations.
**Note:** Anti-patterns change as codebase evolves. What was acceptable early may become problematic at scale. This is best caught through active research, not static documentation.
Phase 1: Gather Context
# Get current branch git rev-parse --abbrev-ref HEAD # Get changed files git diff main...HEAD --name-only # Get full diff git diff main...HEAD
Read the relevant CLAUDE.md files to understand established patterns:
- `/CLAUDE.md` - Root conventions
- `/apps/webapp/CLAUDE.md` - Frontend conventions
- `/apps/api/CLAUDE.md` - Backend conventions
Phase 2: Check for Anti-Patterns
2.1 Import Anti-Patterns
**Check for:**
- Relative imports when `@/` aliases should be used
- Dynamic imports where static would work
- Circular import risks
- Importing from internal module paths instead of public exports
**This codebase requires:**
// CORRECT
import { Something } from '@/modules/feature/service';
import { Shared } from '@doozy/shared';
// WRONG
import { Something } from '../../../modules/feature/service';2.2 Async/Await Anti-Patterns
**Check for:**
- Mixed async/await and .then() chains
- Missing error handling on async operations
- Async functions that don't need to be async
- Promise.all where sequential would be safer (or vice versa)
- Fire-and-forget async calls without error handling
2.3 Error Handling Anti-Patterns
**Check for:**
- Empty catch blocks
- Catching and ignoring errors
- Inconsistent error handling patterns
- Missing try/catch on async operations
- Throwing generic errors instead of typed ones
2.4 State Management Anti-Patterns (Frontend)
**Check for:**
- Direct state mutation
- State stored in wrong location (local vs global)
- Missing loading/error states
- Stale closure issues in hooks
- Missing dependency arrays in useEffect/useCallback/useMemo
2.5 API Anti-Patterns (Backend)
**Check for:**
- Business logic in controllers (should be in services)
- Direct database access outside repository/service layer
- Missing input validation
- Inconsistent response formats
- Missing error responses
2.6 TypeScript Anti-Patterns
**Check for:**
- Using `any` type
- Type assertions (`as`) that could be avoided
- Missing return types on functions
- Overly complex generic types
- Using `!` non-null assertion excessively
2.7 File Structure Anti-Patterns
**Check for:**
- Files in wrong directories
- Naming inconsistencies
- Missing index exports
- Components in wrong folders
Phase 3: Generate Report
# Anti-Pattern Report
**Branch:** {branch}
**Status:** {PASS | WARN | FAIL}
## Summary
{One sentence assessment}
## Conventions Checked
- [x] Import style (@/ aliases)
- [x] Async/await patterns
- [x] Error handling
- [x] State management (if frontend)
- [x] API patterns (if backend)
- [x] TypeScript usage
- [x] File structure
## Anti-Patterns Found
### Critical (Must Fix)
| Location | Anti-Pattern | Fix |
|----------|--------------|-----|
| {file:line} | {description} | {how to fix} |
### Warnings
| Location | Anti-Pattern | Recommendation |
|----------|--------------|----------------|
| {file:line} | {description} | {suggestion} |
## Import Issues
| File | Current Import | Should Be |
|------|----------------|-----------|
| {file:line} | `{bad import}` | `{correct import}` |
## Async/Await Issues
| Location | Issue | Fix |
|----------|-------|-----|
| {file:line} | {description} | {how to fix} |
## Error Handling Issues
| Location | Issue | Fix |
|----------|-------|-----|
| {file:line} | {description} | {how to fix} |
## TypeScript Issues
| Location | Issue | Fix |
|----------|-------|-----|
| {file:line} | {description} | {how to fix} |
## Recommendations
1. {specific action with file reference}
2. {specific action with file reference}Phase 4: Output
1. Save report to `tmp/review-antipatterns-{branch}.md` 2. Present summary:
- PASS/WARN/FAIL status
- Count of anti-patterns by category
- Most critical issues
Scoring Criteria
- **PASS**: Code follows established patterns and conventions
- **WARN**: Minor deviations from conventions
- **FAIL**: Significant anti-patterns or convention violations
Run this analysis now on the current branch.
Repo: dcouple/Pane
Other commands on pane.
- /commit
Create git commits with user approval and no Claude attribution
Open command - /create_plan
You are tasked with creating detailed implementation plans through an interactive, iterative process. You should be skeptical, thorough, and work collaboratively with the user to produce high-quality technical specifications.
Open command - /describe_pr
Generate comprehensive PR descriptions following repository templates
Open command - /implement_plan
You are tasked with implementing an approved technical plan from `thoughts/shared/plans/`. These plans contain phases with specific changes and success criteria.
Open command - /iterate_plan
Iterate on existing implementation plans with thorough research and updates
Open command - /research_codebase
You are tasked with conducting comprehensive research across the codebase to answer user questions. You will spawn one or more parallel sub-agents to perform your reserach.
Open command

