Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

pact-architecture-patterns

БесплатноБез исполняемых скриптовНе проверен

Architectural design patterns, C4 diagram templates, component design guidelines, and anti-patterns for PACT Architect phase. Use when: designing system…

Synaptic-Labs-AIот Synaptic-Labs-AI★ 73 звезды на GitHub

Об этом скилле

PACT Architecture Patterns

Design patterns and templates for the Architect phase of PACT. This skill provides quick references for architectural decisions and links to detailed pattern implementations.

C4 Model Quick Reference

The C4 model provides four levels of abstraction for system architecture documentation.

Level 1: System Context

Shows your system as a box surrounded by users and other systems it interacts with.

                    +------------------+
                    |   External User  |
                    +--------+---------+
                             |
                             v
+------------------+    +----+----+    +------------------+
| Payment Gateway  |<-->|   Your  |<-->|   Email Service  |
+------------------+    | System  |    +------------------+
                        +---------+
                             ^
                             |
                    +--------+---------+
                    |   Admin User     |
                    +------------------+

What to include:

  • Your system (single box)
  • Users/personas
  • External systems
  • High-level interactions

Level 2: Container

Shows the high-level technical building blocks (not Docker containers).

+----------------------------------------------------------------+
|                         Your System                             |
|  +----------------+     +----------------+     +--------------+ |
|  |   Web App      |     |    API         |     |   Database   | |
|  |   (React)      |---->|    (Node.js)   |---->|   (Postgres) | |
|  +----------------+     +----------------+     +--------------+ |
|                               |                                 |
|                               v                                 |
|                         +----------+                            |
|                         |  Cache   |                            |
|                         | (Redis)  |                            |
|                         +----------+                            |
+----------------------------------------------------------------+

Containers are:

  • Separately deployable/runnable units
  • Web applications, APIs, databases, file systems, message queues

Level 3: Component

Shows the internal structure of a container.

+---------------------------------------------------------------+
|                         API Container                          |
|  +-------------+    +-------------+    +-------------------+  |
|  | Controllers |    |  Services   |    |   Repositories    |  |
|  |             |--->|             |--->|                   |  |
|  | UserCtrl    |    | UserService |    | UserRepository    |  |
|  | OrderCtrl   |    | OrderService|    | OrderRepository   |  |
|  +-------------+    +-------------+    +-------------------+  |
|                           |                                    |
|                           v                                    |
|                    +-------------+                             |
|                    |   Clients   |                             |
|                    | PaymentAPI  |                             |
|                    | EmailClient |                             |
|                    +-------------+                             |
+---------------------------------------------------------------+

Components are:

  • Logical groupings of related functionality
  • Controllers, services, repositories, clients

For full C4 templates with Mermaid diagrams: See c4-diagram-templates.md


SOLID Principles Quick Reference

Principle Summary Violation Sign
Single Responsibility One reason to change Class does too many things
Open/Closed Open for extension, closed for modification Frequent changes to existing code
Liskov Substitution Subtypes replaceable for base types Override breaks expectations
Interface Segregation Many specific interfaces > one general Unused interface methods
Dependency Inversion Depend on abstractions Direct instantiation of dependencies

Design Patterns by Context

API Design Patterns

Resource Naming:

GET    /users           # List users
GET    /users/123       # Get user
POST   /users           # Create user
PUT    /users/123       # Replace user
PATCH  /users/123       # Update user
DELETE /users/123       # Delete user

# Nested resources
GET    /users/123/orders
POST   /users/123/orders

# Actions (when CRUD doesn't fit)
POST   /orders/123/cancel
POST   /users/123/verify-email

Pagination:

// Cursor-based (recommended for real-time data)
GET /posts?cursor=abc123&limit=20

// Offset-based (simpler, but has issues with real-time data)
GET /posts?page=2&per_page=20

Error Response Format:

{
  "error": {
    "code": "VALIDATION_ERROR",
    "m
Полный SKILL.md на GitHub

Установить pact-architecture-patterns в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/anti-patterns.mdreferences/c4-diagram-templates.mdreferences/design-patterns.md

FAQ

Что делает скилл pact-architecture-patterns?

Architectural design patterns, C4 diagram templates, component design guidelines, and anti-patterns for PACT Architect phase. Use when: designing system components, creating architecture diagrams, defining component boundaries, planning API contracts, selecting design patterns, or reviewing architectural decisions. Triggers on: architecture design, C4 diagrams, component design, system design, microservices, monolith, API design, interface contracts, architect phase.

Как установить скилл pact-architecture-patterns?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл pact-architecture-patterns запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить pact-architecture-patterns с