AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Architecture Designer

skill-xcrrr-claude-skills-architecture-designer · by xcrrr

Use this skill when designing system architecture, making technology stack decisions, evaluating trade-offs between architectural patterns, or writing Architecture Decision Records (ADRs). Trigger phrases: 'design a system for', 'what architecture should I use', 'monolith vs microservices', 'how should I structure this'. Not for implementation-level code design or UI/UX design.

No reviews yet
0 installs
20 views
0.0% view→install

Install

$ agentstack add skill-xcrrr-claude-skills-architecture-designer

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-xcrrr-claude-skills-architecture-designer)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
4mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Architecture Designer? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Architecture Designer

Overview

The Architecture Designer skill guides the creation of well-structured, scalable, and maintainable software systems. It covers selecting the right architectural pattern for the problem (monolith, microservices, event-driven, layered/hexagonal), conducting trade-off analysis using established frameworks, writing Architecture Decision Records (ADRs) to document decisions, and reasoning about scalability, reliability, and operational complexity. Good architecture serves the current and anticipated needs of the system without over-engineering for hypothetical future scale.

When to Use

  • Starting a new system or service and choosing the overall structure
  • Evaluating whether to split a monolith into microservices
  • Designing the data flow between components (sync vs. async, events vs. REST)
  • Making technology choices with lasting consequences (messaging, database type, framework)
  • Documenting architectural decisions for team alignment and future reference

When NOT to Use

  • Implementation-level code structure within a single service (use refactorer skill)
  • Database schema design for a single service (use sql-expert skill)
  • API endpoint design (use api-designer skill)
  • Infrastructure and DevOps decisions (deployment, networking, cloud IAM)

Quick Reference

| Pattern | Best For | Trade-off | |---------|----------|-----------| | Monolith | Small teams, early product, CRUD-heavy | Simple to develop; harder to scale independently | | Microservices | Large teams, independent scaling, different tech stacks | Complex operations; network overhead; distributed tracing needed | | Modular Monolith | Growing team, future microservice migration | Best of both worlds at moderate scale | | Event-Driven | Async workflows, decoupled producers/consumers | Eventual consistency; harder to debug; ordering issues | | Layered (N-tier) | Standard CRUD apps with clear separation | Can create rigid coupling between layers | | Hexagonal (Ports & Adapters) | Testable, domain-first design; framework-agnostic core | More boilerplate; learning curve | | CQRS | Read-heavy systems where reads/writes have different models | Complexity; sync challenges between command and query sides | | Saga | Distributed transactions across services | Complex compensation logic; eventual consistency |

Instructions

  1. Gather requirements
  • Functional: What does the system do? Core use cases, user types, integrations.
  • Non-functional: Expected load (requests/sec, users), latency targets (p99 > Write: feed reads outnumber posts ~50:1 — optimize for reads
  • Latency: feed load 100K followers) make fan-out on write expensive.

Decision

Use hybrid fanout: fan-out on write for users with <10K followers; fan-out on read for celebrity accounts, merged at read time.

Alternatives Considered

| Option | Pros | Cons | |--------|------|------| | Fan-out on write only | Fast reads | Celebrity posts spike write load | | Fan-out on read only | Simple writes | Slow feed loads for followed-many accounts | | Hybrid (chosen) | Balances read speed and write cost | More complex implementation |

Consequences

Positive: p99 feed load < 200ms; write path scales independently. Negative: Two code paths to maintain; requires follower count metadata.


---

### Example 2: Design a payment processing service

**Input:** "Design a payment processing microservice that handles charges, refunds, and webhooks from Stripe."

**Output:**

**Key Drivers:**
- Correctness over performance — a missed payment or double charge is a business-critical failure
- Idempotency — retries must not cause duplicate charges
- Auditability — every state transition must be logged
- Compliance — PCI-DSS scope must be minimized

**Architecture: Event-Sourced Saga**

┌──────────────┐ ┌──────────────────┐ ┌────────────────┐ │ Order Service│────▶│ Payment Service │────▶│ Stripe API │ │ │ │ │◀────│ (external) │ └──────────────┘ │ - Idempotency │ └────────────────┘ │ - State machine │ │ - Audit log │ ┌────────────────┐ └────────┬─────────┘ │ Webhook Handler│ │ events │ (Stripe →us) │ ┌────────▼─────────┐ └────────┬───────┘ │ Payment Events │ │ │ DB (append-only)│◀─────────────┘ └──────────────────┘


**Idempotency pattern:**
```python
# Every charge request includes an idempotency key
def charge(order_id: str, amount_cents: int, idempotency_key: str):
    existing = db.payments.find_by_idempotency_key(idempotency_key)
    if existing:
        return existing  # Return cached result, don't re-charge

    result = stripe.charge.create(
        amount=amount_cents,
        idempotency_key=idempotency_key
    )
    db.payments.create(
        order_id=order_id,
        stripe_charge_id=result.id,
        idempotency_key=idempotency_key,
        status='succeeded'
    )
    return result

Payment state machine:

PENDING → PROCESSING → SUCCEEDED
                     ↘ FAILED
SUCCEEDED → REFUND_PENDING → REFUNDED

Webhook handling (idempotent):

@app.route('/webhooks/stripe', methods=['POST'])
def stripe_webhook():
    event = stripe.Webhook.construct_event(
        request.data,
        request.headers['Stripe-Signature'],
        WEBHOOK_SECRET  # Verify authenticity
    )
    # Idempotent: process only if not already handled
    if not db.webhook_events.exists(event.id):
        handle_event(event)
        db.webhook_events.mark_processed(event.id)
    return '', 200

Best Practices

  • Match the architecture to the team, not to the trend — a two-person startup doesn't need Kubernetes and 20 microservices
  • Data consistency requirements drive architecture more than anything else: identify them early
  • Design for the failure case — every network call can fail; every service can be slow
  • Make services independently deployable from day one if you're doing microservices
  • Keep the operational burden in scope — microservices are operationally expensive

Common Mistakes

  • Jumping to microservices before the domain is well understood (premature decomposition)
  • Sharing a database between services (creates tight coupling at the data layer)
  • Ignoring operations: who deploys, monitors, and debugs this in production?
  • Building for 100x current scale on day one (over-engineering adds real cost and complexity now)
  • Not writing ADRs — future team members have no context for past decisions

Tips & Tricks

  • Draw the architecture on a whiteboard first; validate with the team before writing code
  • "You must be this tall to use microservices" — start with a modular monolith; extract services when team/scaling pain is concrete
  • Use the C4 model (Context → Container → Component → Code) for layered architecture diagrams
  • Martin Fowler's "Strangler Fig" pattern is the safest way to migrate a monolith incrementally
  • Treat ADRs as living documents — update them when decisions are revisited

Related Skills

  • [api-designer](../api-designer/SKILL.md)
  • [sql-expert](../sql-expert/SKILL.md)
  • [security-auditor](../security-auditor/SKILL.md)
  • [refactorer](../refactorer/SKILL.md)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.