pattern-detector

Analyze code for design patterns and anti-patterns with refactoring suggestions.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/abudhahir/projects-pkm --skill pattern-detector-abudhahir
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pattern-detector
Source: https://github.com/abudhahir/projects-pkm/tree/main/SKILLS/pattern-detector
Command: npx skills add https://github.com/abudhahir/projects-pkm --skill pattern-detector-abudhahir

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers identify and understand design patterns and anti-patterns within their codebase, providing actionable recommendations for improvement and refactoring.

Core Features & Use Cases

  • Pattern Identification: Detects common creational, structural, behavioral, and architectural design patterns.
  • Anti-Pattern Detection: Flags problematic code structures like God Objects, Spaghetti Code, and Magic Numbers.
  • Recommendation Engine: Offers specific guidance on refactoring anti-patterns and suggesting better design choices.
  • Use Case: A developer suspects their UserService class is becoming too large and complex. They can run this Skill on the file to get a report detailing if it exhibits God Object anti-patterns and suggest ways to break it down into smaller, more manageable services.

Quick Start

Run the pattern-detector skill on the file 'UserService.js'.

Frequently Asked Questions about pattern-detector

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect anti-patterns like God Objects and Spaghetti Code in my codebase?

To detect anti-patterns like God Objects and Spaghetti Code, you can analyze your code to identify problematic structures and receive detailed reports with actionable refactoring suggestions. This helps improve overall code quality and adherence to best practices.

How do I check if my code correctly implements creational and behavioral design patterns?

Checking for correct design pattern implementation involves analyzing your code to identify creational, structural, behavioral, and architectural patterns. This process verifies their presence and correctness, providing recommendations for better software design choices.

What is the best way to refactor a large and complex service class?

The best way to refactor a large service class is to analyze it for God Object anti-patterns. This analysis provides specific recommendations for breaking down the complex code into smaller, more manageable services to improve software design.

Can I get automated code analysis and refactoring suggestions for architectural patterns?

Yes, you can get automated code analysis and refactoring suggestions for architectural patterns. The analysis identifies existing patterns and offers specific guidance on refactoring anti-patterns to ensure your code adheres to architectural best practices.

When do I need code analysis for identifying structural patterns and Magic Numbers?

You need code analysis for identifying structural patterns and Magic Numbers when suspecting problematic code structures. This analysis flags these anti-patterns and provides detailed reports with recommendations for code improvement and better design choices.