/godmode:patternfrom godmode
Recommends design patterns and detects anti-patterns in codebases. Analyzes structure, classifies problems, and provides tested implementations with trade-offs.
Ships in godmode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
/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 |
What SKILL.md sets; muted values are Claude Code's defaults
Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.
135 skills in this plugin
/a11yAccessibility. WCAG 2.1 AA/AAA, a11y audit, color contrast, keyboard navigation, screen reader, Axe, Pa11y, Lighthouse./agentAI agent development. ReAct/plan-and-execute/multi-agent architectures, tool design, memory systems, guardrails, orchestration (LangChain, LlamaIndex, CrewAI, AutoGen)./analyticsProduct analytics implementation — event tracking, funnel analysis, A/B testing, Segment/Amplitude/Mixpanel/PostHog, privacy-compliant instrumentation./angularAngular architecture. NgRx, Signals, RxJS, standalone components, lazy loading, dependency injection, Jasmine, Jest.Other plugins' skills for the same job