arch-engineering

Guides full-stack engineering practices covering layering, APIs, authentication, cloud infrastructure, and observability.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/DreamMacer/jiuwenswarm --skill arch-engineering-dreammacer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: arch-engineering
Source: https://github.com/DreamMacer/jiuwenswarm/tree/main/resources/agent/workspace/plugins/agent_templates/system-architect/skills/arch-engineering
Command: npx skills add https://github.com/DreamMacer/jiuwenswarm --skill arch-engineering-dreammacer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Full-stack projects often suffer from inconsistent layering, untyped errors, fragile API contracts, ad-hoc authentication, and unmonitored infrastructure. This Skill provides concrete engineering practices and decision frameworks so teams can implement project structure, API governance, auth flows, cloud-native deployment, and observability consistently. ## Core Features & Use Cases - Full-Stack Architecture Practices: Feature-first project structure, three-layer architecture (Controller/Service/Repository), dependency injection, typed error handling, N+1 query prevention, caching, and real-time communication patterns. - API Design & Governance: Decision trees for REST/GraphQL/gRPC/tRPC selection, versioning and backward-compatibility rules, gateway and BFF patterns, and OpenAPI contract management. - Auth, Infrastructure & Observability: JWT vs Session decisions, RBAC permission layers, middleware ordering, Kubernetes and service mesh selection, IaC modularization, OpenTelemetry instrumentation, RED/USE metrics, and event-driven messaging with Kafka/RabbitMQ, Transactional Outbox, and CDC. - Use Case: When designing a new order service, use this Skill to choose the API style, structure the codebase by feature, implement JWT refresh flow with RBAC, set up OpenTelemetry tracing, and select a message broker with idempotent consumers. ## Quick Start Ask the agent to design the engineering architecture for a new full-stack service, including project layering, API style selection, authentication flow, and observability setup.

Frequently Asked Questions about arch-engineering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between REST, GraphQL, gRPC, and tRPC for my API?▼

Choose based on the consumer: tRPC for same-team TypeScript full-stack, REST with OpenAPI for multi-language or external consumers, GraphQL when clients need flexible queries, and gRPC for high-performance internal service communication. The Skill provides a decision tree and comparison table covering type safety, performance, caching, and versioning.

JWT vs Session: which authentication approach should I use?▼

Use JWT when you need stateless authentication without shared session storage, pairing short-lived access tokens (15 minutes) with server-stored refresh tokens. Use Session for traditional web apps where active invalidation matters, backed by Redis for multi-instance deployments.

How do I prevent N+1 queries in a three-layer architecture?▼

Replace per-record queries with a single JOIN or eager-loading query, such as using include clauses in the repository layer. Keep Controllers free of business logic and route all data access through the Repository layer so query patterns stay visible and optimizable.

When should I use Kafka versus RabbitMQ for event-driven architecture?▼

Use Kafka for very high throughput (over 100k events/s), event replay, and CDC pipelines; use RabbitMQ for complex routing, task queues, and lower-latency delivery at moderate throughput. The Skill also covers NATS, Pulsar, and Redis Streams with a throughput-based decision tree.

What is the Transactional Outbox pattern and when do I need it?▼

The Transactional Outbox pattern writes business data and an event record in the same database transaction, then a separate process publishes pending events to the message broker. Use it whenever database commits and message publishing must stay consistent, avoiding lost events from partial failures.

When should I not introduce a service mesh like Istio?▼

Skip a service mesh when you have fewer than 10 services and no mTLS requirement; plain Kubernetes Service plus Ingress is sufficient. Choose Linkerd for mTLS without complex traffic control, and reserve Istio for canary releases, traffic mirroring, and fine-grained policies.