Help us improve
Share bugs, ideas, or general feedback.
From godmode
Recommends creational, structural, behavioral, and distributed design patterns with implementations, unit tests, and trade-offs; detects anti-patterns like God Object, circular dependencies, and primitive obsession.
npx claudepluginhub arbazkhan971/godmodeHow this skill is triggered — by the user, by Claude, or both
Slash command
/godmode:patternThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- `/godmode:pattern`, "what pattern should I use"
Detects design patterns (Singleton, Factory, Observer) and anti-patterns (God Object, Spaghetti Code) in code. Analyzes implementation quality and provides refactoring recommendations.
Detects anti-patterns and architectural debt in codebases, proposes patterns like GoF SOLID DDD CQRS Microservices Cloud, generates boilerplate code. For Next.js FastAPI NestJS Django Express Go.
Catalogue of known SDLC anti-patterns to reject during architecture, planning, code review, and post-incident analysis. Provides named patterns for clear communication.
Share bugs, ideas, or general feedback.
/godmode:pattern, "what pattern should I use"find src/ -name "*.ts" | xargs wc -l \
| sort -rn | head -20
npx madge --circular src/
Problem: <design challenge>
Language: <primary language>
Framework: <if applicable>
Existing patterns: <detected>
Creational (object creation problems): Factory, Builder, Singleton (last resort -- use DI), Prototype, Abstract Factory.
Structural (composition problems): Adapter, Decorator, Facade, Proxy, Composite, Bridge.
Behavioral (communication problems): Strategy, Observer, Command, State, Chain of Responsibility, Mediator, Iterator, Template Method.
Distributed (resilience/consistency): Circuit Breaker, Saga, Outbox, CQRS, Strangler Fig, Bulkhead, Sidecar.
For each candidate:
IF roles < 10 and stable: pure Strategy sufficient. IF >3 switch/case on same type: consider State pattern. IF files > 500 LOC: God Object -- extract classes.
find src/ -name "*.ts" | xargs wc -l \
| sort -rn | head -20
npx jscpd src/ --min-lines 10 --min-tokens 50
grep -rn "email: string\|price: number" \
--include="*.ts" src/
Key anti-patterns:
Save: docs/patterns/<feature>-pattern-analysis.md
Commit: "pattern: <feature> -- <pattern> (<confidence>)"
Append .godmode/pattern-results.tsv:
timestamp feature pattern category confidence antipatterns language files verdict
KEEP if: tests pass AND complexity reduced
AND code no more complex than necessary.
DISCARD if: pattern adds more complexity than it
removes OR tests fail.
STOP when FIRST of:
- Design problem resolved with tested implementation
- Anti-pattern scan complete, findings prioritized
- Pattern recommended with trade-offs + alternative
On failure: git reset --hard HEAD~1. Never pause.
| Failure | Action |
|---|---|
| Pattern adds complexity | Revert, simple code wins |
| Refactoring breaks tests | Smaller steps, test each |
| Team unfamiliar | Document with codebase example |
| Conflicts with framework | Prefer framework conventions |