# Claude Pattern Advisor

> Architecture advisor that selects idiomatic design patterns only when they earn their place in your code.

Claude Pattern Advisor is a paid AI agent skill on Agensi by abderrahman Njeh, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $7 (one-time purchase)
- Creator: [abderrahman Njeh](https://www.agensi.io/creators/abderrahman-njeh)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Version: 1.0
- Last updated: 2026-11-28
- Security: scan passed (2026-11-25); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/claude-pattern-advisor
- Tags: code-review, api, typescript, python, refactoring, solid-principles, design-patterns, architecture

## About this skill

Stop guessing whether to use a Factory, Strategy, or simple conditional. This skill forces a disciplined evaluation of code forces before you write a single line, ensuring every architectural choice earns its place. It prevents over-engineering by defaulting to the simplest structure that works while identifying exactly when a pattern becomes necessary.

### What it does
- **Analyze forces** by identifying what varies, what must stay stable, and where the current logic is failing.
- **Select idiomatic patterns** based on language-specific constraints across TypeScript, Python, Go, Rust, and more.
- **Enforce house style** by surveying existing files to ensure new structures match your project's established conventions.
- **Evaluate thresholds** to determine if a pattern is premature, providing clear markers for when to refactor in the future.
- **Prevent anti-patterns** by checking against common pitfalls like "God Objects" or unnecessary abstractions.

### How it works
1. **Classify the task** as a new feature, bug fix, or refactor to set the appropriate architectural stance.
2. **Identify smells** in the current code such as tangled conditionals or duplicated switch statements.
3. **Compare candidates** using the "earns its place" test to ensure the pattern reduces complexity.
4. **Implement minimal forms** focusing on composition and domain-first naming rather than boilerplate.

### Frameworks & tools
Works with any codebase including React/NestJS, Django/FastAPI, Spring/Android, Laravel, and Flutter. It provides specialized guidance for TypeScript, Python, Kotlin, Java, C#, PHP, and Rust.

### Why this beats prompting it yourself
Generic LLM prompts often hallucinate complex patterns where a simple function would suffice, leading to "Enterprise Hello World" syndrome. This skill uses a rigorous "rule of three" and force-analysis framework to ensure patterns are only applied when they actually make the code easier to read and maintain.

### Use cases
- **Adding new providers** like a third payment gateway or notification service without bloating existing logic.
- **Refactoring legacy switches** that have grown too large to manage or test reliably.
- **Structuring new modules** to ensure they follow SOLID principles and maintainable boundaries.
- **Reviewing PRs** to catch over-engineered abstractions before they are merged.

### Known limitations
Does not perform architecture-level changes like migrating to microservices or CQRS. Requires 2-5 neighbouring files to effectively match existing house style.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Claude Pattern Advisor skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill prevent the 'over-engineering' often seen with standard AI coding prompts?

Unlike generic prompts that often suggest over-engineered "Enterprise" solutions, this skill applies a 'Rule of Three' and force-analysis framework to ensure patterns are only suggested if they truly reduce complexity rather than adding boilerplate.

### Which programming languages and AI agents are supported?

It works with any AI agent that supports SKILL.md skills (Claude Code, Cursor, GitHub Copilot, Codex CLI, Gemini CLI and more). It includes full code examples for TypeScript/JavaScript, Python, Kotlin/Java, C#/.NET, PHP and Dart/Flutter, plus a cross-language overview table that also covers Go and Rust.

### Can it adapt to my existing project's coding style and conventions?

Yes, the skill includes a specific 'house style' survey feature that analyzes 2-5 of your existing files to ensure any suggested patterns or naming conventions align with your project's established structure.

### What are the most common scenarios where I should use this skill?

Adding a new case, mode, type or provider to logic that already branches (a growing switch or if/else chain), integrating a new service provider such as a payment gateway, fixing bugs caused by duplicated logic without turning the fix into a rewrite, and checking whether existing code is over-engineered.

### Are there any limitations to the scope of architectural advice provided?

It focuses on module-level design: which pattern (or none) fits the code you are changing. Architecture-level decisions such as moving to microservices, CQRS, event sourcing or hexagonal layering are only raised as proposals for you to decide; the skill never applies them inside a feature or bug fix.

### What is included with the purchase of the Design Patterns skill?

One skill with its reference library: the force-analysis workflow and "earns its place" test, a smell-to-pattern table, a catalog of GoF and modern patterns (use when / avoid when / lightest form), idiomatic code examples for TypeScript, Python, Kotlin/Java, C#, PHP and Dart, a refactoring guide, and an over-engineering checklist the agent runs after writing code.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
