pattern-enforcement

Enforce user-declared design patterns from .claude/design-patterns.json on UI changes.

Updated Jan 26, 2026
One-click install
npx skills add https://github.com/l3ocho/mktpl-claude-datasaas --skill pattern-enforcement-l3ocho
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pattern-enforcement
Source: https://github.com/l3ocho/mktpl-claude-datasaas/tree/main/plugins/dmc-design/skills/pattern-enforcement
Command: npx skills add https://github.com/l3ocho/mktpl-claude-datasaas --skill pattern-enforcement-l3ocho

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design teams often experience drift in UI patterns across components, CSS, and layout decisions. This Skill reads and enforces user-declared patterns to keep interfaces consistent.

Core Features & Use Cases

  • Load design patterns from .claude/design-patterns.json at session start.
  • Surface locked patterns as hard constraints during component generation, CSS edits, and layout changes.
  • Integrate with the /design commands and the design-reviewer agent, with optional color-scheme validation when enabled.

Quick Start

Start a design session with pattern-enforcement active to enforce your declared patterns across UI components.

Frequently Asked Questions about pattern-enforcement

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

FAQPage Schema
How do I enforce design system consistency during UI development?

You enforce design system consistency by loading user-declared patterns from a JSON file at session start. The Skill applies these patterns as hard constraints during component generation, CSS edits, and layout changes, reporting violations with pattern IDs and rule texts.

What causes UI pattern drift across components and CSS?

UI pattern drift happens when component generation and CSS edits lack automated constraint validation. Without an enforcement mechanism caching locked design patterns at session start, interface decisions gradually deviate from the established design system rules.

How do I validate UI code changes against locked design patterns?

You validate UI code changes against locked design patterns by activating the enforcement Skill during any modifications touching components, CSS, or layout. It caches declared patterns at session start and surfaces violations with pattern IDs and corresponding rule texts.

Does the design-reviewer agent work with enforced design patterns?

Yes, the design-reviewer agent integrates directly with pattern enforcement. The Skill automatically applies locked design patterns as constraints when the design-reviewer agent runs, ensuring all UI reviews validate against your declared pattern rules.

Do I need a specific file format to declare UI design patterns?

Yes, you need a .claude/design-patterns.json file containing your declared patterns. The Skill reads this JSON file at session start, caches the patterns for the active session, and uses them to enforce constraints across all UI development commands.

Can I validate color schemes using design pattern enforcement?

Yes, color-scheme validation is supported as an optional feature within the pattern enforcement workflow. When enabled, the Skill validates color choices against your declared design patterns during component generation and CSS modifications.