All skills
davila7 avatar

/architecture

@1deb97c

Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.

Use this Skill: https://skilld.dev/gh/davila7/claude-code-templates/architecture

This session only. Nothing lands on disk.

pattern-selection.md

≈660 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Pattern Selection Guidelines

Decision trees for choosing architectural patterns.

Main Decision Tree

START: What's your MAIN concern?

┌─ Data Access Complexity?
│  ├─ HIGH (complex queries, testing needed)
│  │  → Repository Pattern + Unit of Work
│  │  VALIDATE: Will data source change frequently?
│  │     ├─ YES → Repository worth the indirection
│  │     └─ NO  → Consider simpler ORM direct access
│  └─ LOW (simple CRUD, single database)
│     → ORM directly (Prisma, Drizzle)
│     Simpler = Better, Faster
│
├─ Business Rules Complexity?
│  ├─ HIGH (domain logic, rules vary by context)
│  │  → Domain-Driven Design
│  │  VALIDATE: Do you have domain experts on team?
│  │     ├─ YES → Full DDD (Aggregates, Value Objects)
│  │     └─ NO  → Partial DDD (rich entities, clear boundaries)
│  └─ LOW (mostly CRUD, simple validation)
│     → Transaction Script pattern
│     Simpler = Better, Faster
│
├─ Independent Scaling Needed?
│  ├─ YES (different components scale differently)
│  │  → Microservices WORTH the complexity
│  │  REQUIREMENTS (ALL must be true):
│  │    - Clear domain boundaries
│  │    - Team > 10 developers
│  │    - Different scaling needs per service
│  │  IF NOT ALL MET → Modular Monolith instead
│  └─ NO (everything scales together)
│     → Modular Monolith
│     Can extract services later when proven needed
│
└─ Real-time Requirements?
   ├─ HIGH (immediate updates, multi-user sync)
   │  → Event-Driven Architecture
   │  → Message Queue (RabbitMQ, Redis, Kafka)
   │  VALIDATE: Can you handle eventual consistency?
   │     ├─ YES → Event-driven valid
   │     └─ NO  → Synchronous with polling
   └─ LOW (eventual consistency acceptable)
      → Synchronous (REST/GraphQL)
      Simpler = Better, Faster

The 3 Questions (Before ANY Pattern)

  1. Problem Solved: What SPECIFIC problem does this pattern solve?
  2. Simpler Alternative: Is there a simpler solution?
  3. Deferred Complexity: Can we add this LATER when needed?

Red Flags (Anti-patterns)

Pattern Anti-pattern Simpler Alternative
Microservices Premature splitting Start monolith, extract later
Clean/Hexagonal Over-abstraction Concrete first, interfaces later
Event Sourcing Over-engineering Append-only audit log
CQRS Unnecessary complexity Single model
Repository YAGNI for simple CRUD ORM direct access

Source: SKILL.md on GitHub

1 warning16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides an architectural decision-making framework and templates. It is safe from direct malicious code, exfiltration, or obfuscation, and restricts the agent to read-only tools. It is categorized as low risk because it ingests project data which could theoretically contain indirect prompt injection designed to influence the agent's architectural advice.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    2/6 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 1deb97c. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 14 hours ago.

Activeupdated 8 months ago
What it can do
Reads files
All 3 allowed tools
ReadGlobGrep

README badge

README badge for davila7/claude-code-templates/architecture