xiaohongshu
xiaohongshu
architecture-validate-architecture
Automates architecture validation for Clean Architecture, Hexagonal, Layered, and MVC patterns. Detects layer boundary violations, dependency rule breaches, and architectural anti-patterns. Use when asked to "validate architecture", "check layer boundaries", "architectural review", before major r...
Full skill instructions
Quick Start → When to Use | What It Does | Simple Example
How to Implement → Validation Process | Architecture Rules | Expected Output
Patterns → Clean Architecture | Hexagonal | Layered | MVC
Help → Anti-Patterns | Troubleshooting | Integration
Reference → Layer Dependencies | Diff-Aware Validation | Quick Reference
Automates architecture validation for multiple architectural patterns (Clean Architecture, Hexagonal, Layered, MVC). Automatically detects the project's architectural style from ARCHITECTURE.md, scans all source files for import violations, validates dependency direction (inward only for Clean/Hexagonal), and reports violations with specific fixes. Adapts to any architectural pattern and provides actionable remediation guidance.
User asks: "Validate my architecture" or "Check if this follows Clean Architecture"
What happens:
ARCHITECTURE.md to identify architectural patternResult: ✅ All checks passed OR ❌ Violations with specific fixes
Invoke this skill when:
Trigger with phrases like:
This skill automatically adapts to:
1. Pattern Detection
ARCHITECTURE.md or similar documentation2. Layer Boundary Validation
3. Dependency Direction Validation
4. Pattern Compliance
5. Anti-Pattern Detection
Validating architecture involves a 5-step process:
See detailed steps in Validation Process section below.
The validation process follows 5 steps:
See Code Examples for detailed examples of each step, including bash commands, layer definitions, validation rules, and sample output formats.
User: "Validate architecture before I commit"
User: "Check if my refactoring follows Clean Architecture"
Automatically invoked by pre-commit hook to validate architectural boundaries, block commits if critical violations found, and provide actionable fix recommendations.
This skill supports four architectural patterns with specific dependency rules:
See Code Examples for detailed dependency diagrams, layer rules, and detection patterns for each architectural pattern.
This skill detects and provides fixes for common architectural violations:
See Code Examples for detailed violation examples with complete before/after code showing how to fix each anti-pattern using dependency inversion, repository patterns, and proper layering.
This skill integrates with:
See Code Examples for complete integration scripts for pre-commit hooks, CI/CD workflows, and quality gate configurations.
When validation passes, you'll see confirmation that all layer boundaries are respected and dependencies flow correctly.
When violations are detected, you'll receive a detailed report including:
See Code Examples for complete example output showing success and failure reports with detailed violation listings.
After invoking this skill, measure:
Create arch-rules.yaml in project root to customize layer paths, import rules, severity levels, and exceptions for your project's specific architectural needs.
Currently supports Python (.py), JavaScript (.js), and TypeScript (.ts). Extend by adding patterns in scripts/validate.py.
See templates/arch-rules.yaml for a complete example configuration with all available options and Code Examples for YAML configuration samples.
Valid imports flagged as violations. Add exceptions to arch-rules.yaml.
Skill doesn't recognize architectural pattern. Ensure ARCHITECTURE.md contains pattern keywords: "Clean Architecture", "Hexagonal Architecture", "Layered Architecture", or "MVC".
Known violations not reported. Check file paths match layer definitions. Update layer patterns if needed.
See Code Examples for complete troubleshooting examples with exception configurations and pattern detection fixes.
| Metric | Without Validation | With Validation | Improvement |
|---|---|---|---|
| Architecture violations | 15-20 per quarter | 0-2 per quarter | 95% reduction |
| Time to detect violations | 2-5 days | 5-10 seconds | 99.9% faster |
| Refactoring cost | High (violations embedded) | Low (caught early) | 80% reduction |
| Code review time | 45-60 min | 15-20 min | 70% faster |
| Onboarding time | 2-3 weeks | 3-5 days | 75% faster |
| Technical debt | 20-30 violations/year | 2-5 violations/year | 90% reduction |
ARCHITECTURE.md or similar documentation defining layersxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience