Pattern Enforcement Skill

Analyzes codebase architecture patterns and validates compliance with established standards.

1|Updated Aug 10, 2025
One-click install
npx skills add https://github.com/michsindlinger/agent-os-extended --skill pattern-enforcement-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Pattern Enforcement Skill
Source: https://github.com/michsindlinger/agent-os-extended/tree/main/agent-os/templates/skills/dev-team/architect/pattern-enforcement
Command: npx skills add https://github.com/michsindlinger/agent-os-extended --skill pattern-enforcement-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures that code adheres to established architectural patterns, design principles, and organizational standards, preventing architectural drift and maintaining codebase health.

Core Features & Use Cases

  • Pattern Recognition: Identifies and validates adherence to architectural patterns (e.g., MVC, Clean Architecture).
  • Compliance Validation: Checks for layer separation, correct dependency directions, and proper abstraction boundaries.
  • Refactoring Guidance: Suggests pattern-compliant refactoring and helps migrate legacy code.
  • Use Case: When a new feature is implemented, this Skill can automatically review the code to ensure it follows the project's defined patterns, flagging any deviations before they become technical debt.

Quick Start

Use the pattern enforcement skill to review the current implementation for architectural compliance.

Frequently Asked Questions about Pattern Enforcement Skill

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

FAQPage Schema
How do I check my codebase for architectural pattern violations and anti-patterns?

To check for architectural pattern violations, analyze your code to identify deviations from established blueprints, anti-patterns, and code smells. This process validates adherence to layer separation, dependency rules, and abstraction boundaries to prevent architectural drift.

What is architectural drift and how does pattern compliance prevent it?

Architectural drift occurs when a codebase gradually deviates from established design principles and organizational standards. Pattern compliance prevents this by automatically reviewing new implementations to flag deviations before they become technical debt.

How do I validate layer separation and dependency rules in a code review?

To validate layer separation during a code review, verify that dependencies point in correct directions and respect abstraction boundaries. This ensures the implementation follows defined architectural blueprints like MVC or Clean Architecture.

Can I get refactoring guidance for migrating legacy code to clean architecture?

Yes, you can get refactoring guidance for migrating legacy code by analyzing it for pattern violations and anti-patterns. The process suggests pattern-compliant refactoring steps to align legacy implementations with established organizational standards.

What's the best way to enforce design principles before new features create technical debt?

The best way to enforce design principles before technical debt accrues is to automatically review new feature implementations for architectural compliance. This flags anti-patterns and validates dependency rules immediately after development.

When should I not rely on automated architectural compliance checks?

You should not rely solely on automated architectural compliance checks when dealing with novel structural blueprints that lack established design patterns. The process validates code against pre-defined organizational standards and may miss unconventional abstractions.