pattern-detector

Detect design patterns and anti-patterns in codebases with refactoring recommendations.

27|4|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/CuriousLearner/devkit --skill pattern-detector-curiouslearner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pattern-detector
Source: https://github.com/CuriousLearner/devkit/tree/main/skills/pattern-detector
Command: npx skills add https://github.com/CuriousLearner/devkit --skill pattern-detector-curiouslearner

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers identify and understand design patterns and anti-patterns within their codebase, leading to more robust, maintainable, and efficient software.

Core Features & Use Cases

  • Design Pattern Identification: Recognizes common creational, structural, and behavioral design patterns.
  • Anti-Pattern Detection: Flags problematic code structures like God Objects, Spaghetti Code, and Magic Numbers.
  • Recommendation Engine: Provides actionable advice on refactoring anti-patterns and suggests appropriate patterns for specific use cases.
  • Use Case: A developer suspects their UserService class is becoming too large and complex. They can use this Skill to analyze the code, confirm if it exhibits the "God Object" anti-pattern, and receive suggestions on how to break it down into smaller, single-responsibility services.

Quick Start

Analyze the current directory for design patterns and anti-patterns.

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 Object or Spaghetti Code in my codebase?

To detect anti-patterns like God Object or Spaghetti Code, you can scan your codebase to identify problematic structures and receive actionable refactoring recommendations. The analysis flags complex classes and suggests breaking them down into smaller components.

What is the best way to identify existing design patterns in source code for refactoring?

Identifying design patterns in source code involves scanning the codebase for common creational, structural, and behavioral patterns like Singleton, Factory, and Observer. This reveals your current software architecture and highlights where established patterns are already applied.

Can I analyze a specific class to see if it needs refactoring before it becomes a maintenance issue?

Yes, you can analyze a specific class to check if it needs refactoring by evaluating its size and complexity. If a class is growing too large, the analysis confirms if it exhibits anti-patterns and offers guidance to improve maintainability.

How do I get recommendations for refactoring Magic Numbers out of my software architecture?

To get recommendations for refactoring Magic Numbers, scan your code to detect these anti-patterns and generate a detailed report. The report provides actionable advice and best practices to replace hardcoded values with meaningful constants, improving code quality.

Does code review for anti-patterns work for analyzing an entire directory at once?

Yes, code review for anti-patterns works for analyzing an entire directory at once. You can quickly start an analysis of the current directory to evaluate the overall software architecture and identify both design patterns and problematic code structures across the project.