architecture-patterns
БесплатноБез исполняемых скриптовНе проверенAI-friendly architecture patterns for TypeScript projects including Domain-Driven Design, Clean Architecture, Hexagonal Architecture, and Page Object Model…
от aiskillstore★ 509 звёзд на GitHubОб этом скилле
Architecture Patterns for AI-Assisted Development
Overview
Modern software architecture patterns are extraordinarily effective when working with AI code generation. This skill provides comprehensive guidance on architecture patterns that help AI agents generate correct, coherent, and maintainable code for full-stack TypeScript projects.
Why Architecture Matters for AI
Certain software architecture and design patterns greatly assist AI code-generation tools in producing high-quality output. By structuring projects with clear domain models, layered boundaries, and well-defined patterns, you reduce ambiguity for AI assistants and dramatically increase the consistency and correctness of their output.
Key principles:
- Explicit modeling reduces ambiguity about where logic should go
- Clear separation of concerns helps AI focus on one layer at a time
- Consistent patterns allow AI to reliably replicate your architectural decisions
- Well-defined interfaces act as contracts that guide AI implementation
- Testability becomes easier to achieve when architecture is sound
Available Patterns
Domain-Driven Design (DDD)
DDD focuses on a clear domain model using Entities, Value Objects, Domain Services, and Repositories—all expressed in the ubiquitous language of the business. This explicit modeling gives AI agents a well-defined vocabulary and structure to follow.
Best for:
- Complex business domains with evolving rules
- Systems where business language matters
- Long-lived applications requiring flexibility
- Teams with domain expertise to capture
Key benefit: AI naturally follows domain terminology and structure, producing cohesive code that business stakeholders understand.
Clean Architecture (Layered & Onion)
Clean Architecture organizes code into concentric layers with strict dependency inversion. This pattern provides a clear recipe for where any piece of logic belongs, giving AI a strong guardrail for consistent implementation.
Best for:
- Any TypeScript backend or full-stack application
- Teams wanting clear separation of concerns
- Projects that need to remain testable and maintainable
- Systems likely to need infrastructure changes
Key benefit: AI can implement one layer at a time, with clear responsibilities and interfaces for each layer.
Hexagonal Architecture (Ports & Adapters)
Hexagonal Architecture isolates core business logic from external integrations through explicit Port interfaces and Adapter implementations. The core depends only on abstractions, not on external technology details.
Best for:
- Applications with multiple external integrations (APIs, databases, message queues)
- Systems where switching implementations is important
- Complex systems where testing core logic matters
- Microservices architecture
Key benefit: AI can safely generate testable core logic separately from imperative adapters, with clear integration points.
Page Object Model (POM) for Testing
POM represents each page or significant UI component as a class that encapsulates interactions and locators. Tests use these page objects instead of raw browser commands.
Best for:
- End-to-end testing with Playwright, Cypress, or Selenium
- Web automation scripts
- UI testing that needs to remain maintainable
- Projects using AI to generate test code
Key benefit: AI can generate clear, reusable page objects and coherent test scenarios that are easy to understand and maintain.
How to Use This Skill
- Choose your pattern based on your project type and complexity
- Review the detailed guide for that pattern with TypeScript examples
- Share the architecture with your AI assistant as context for code generation
- Guide AI implementation layer-by-layer or component-by-component
- Maintain consistency by referencing the pattern in every prompt
Real-World Results
Teams implementing these patterns with AI code generation have reported:
- 3x faster feature delivery without sacrificing code quality
- 90%+ pattern compliance when using clear architectural guidance
- Significantly fewer refactors due to better initial structure
- Improved testability making code easier to review and modify
- Clear integration points reducing architectural drift
Key Principles Across All Patterns
1. Separation of Concerns
Each layer/component has a single, well-defined responsibility. AI generates more correct code when responsibility is clear.
2. Dependency Inversion
Inner layers don't depend on outer layers. This prevents the AI from generating tightly coupled code.
3. Interface Contracts
Well-defined interfaces between components act as contracts. AI can implement both sides correctly because the contract is explicit.
4. Consistency
Patterns are repetitive. When AI sees one repository i
Установить architecture-patterns в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл architecture-patterns?
AI-friendly architecture patterns for TypeScript projects including Domain-Driven Design, Clean Architecture, Hexagonal Architecture, and Page Object Model testing patterns
Как установить скилл architecture-patterns?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл architecture-patterns запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic