architectural-planning
Skill1 starsChanged 5 days agoMITView on GitHub
Interactive architectural design and technology stack planning skill for Antigravity, Claude Code, and GitHub Copilot. Guides users through structured architectural decisions, recommends battle-tested technology combinations across layers, evaluates trade-offs, and generates comprehensive architecture documents (ARCHITECTURE.md / ADRs) with valid Mermaid diagrams. Use when asked to "plan my architecture", "design system architecture", "create an architecture document", "help me choose a tech stack", "what technologies should I use", "generate an architecture diagram", "plan my project structure", "recommend a database", "design my API layer", "create a system design", "architecture planning", "tech stack recommendation", or "write an ADR".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- bhaumikmaan/claude-code-master-skillstheir own version, first seen Apr 3, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- bhaumikmaan/claude-code-master-skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-orchestratorSkill
- algorithmic-complexity-analyzerSkill
- api-securitySkill
- caching-queues-reviewerSkill
- code-reviewerSkill
- csharp-developerSkill
- design-pattern-detectorSkill
- detect-overengineeringSkill
- github-security-scanner-hookSkill
- java-developerSkill
- legacy-code-modernizationSkill
- llm-as-judgeSkill
- load-memorySkill
- nodejs-executorSkill
- playwright-bdd-testerSkill
- powershell-writerSkill
- python-api-writerSkill
- python-developerSkill
- python-linterSkill
- react-developerSkill
- remote-pod-log-analyzerSkill
- save-memorySkill
- scan-halucinated-testsSkill
- scan-repo-readmeSkill
- skill-creatorSkill
- sql-connectorSkill
- sql-executorSkill
- sync-github-forksSkill
- trace-code-contextSkill
- troubleshoot-and-fixSkill
- typescript-developerSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 10 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Before recommending stacks or generating diagrams, apply these 5 architectural heuristics:
- Distinctive: line 18
Avoid distributed systems overhead (network serialization, eventual consistency, distributed transactions, split-brain failure modes) until …
- Distinctive: line 19
Start with a well-factored modular monolith with clean domain boundaries.
- Distinctive: line 28
Ensure database schemas support zero-downtime rolling deployments and backwards-compatible rollbacks (expand-and-contract pattern).
- Distinctive: line 31
When evaluating competing architectural designs or ADR proposals, pair with LLM-as-Judge to stress-test failure cascades (Pessimist), …
- Distinctive: line 40
Interactive Questionnaire: Use your environment's native question tool:
- Distinctive: line 52
Ask both questions in a single interactive call to establish baseline parameters:
- Distinctive: line 131
MongoDB: Document database with dynamic schemas.
- Distinctive: line 259
If the user wants to compare two architectural options (e.g., PostgreSQL vs MongoDB, REST vs gRPC), invoke LLM-as-Judge using Pattern 2 …
- Distinctive: line 266
Ensure Mermaid syntax is strictly valid.
- Very specific: line 267
Use flowchart TD or graph TD for component and network topologies.
- Very specific: line 276
Write the generated document to ARCHITECTURE.md in the project root (or user-chosen path).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Architectural Planning
You are a Principal Systems Architect. You guide engineering teams and developers through structured architectural decisions for new greenfield projects or existing legacy modernizations. You evaluate functional and non-functional requirements, recommend compatible, production-ready technologies for each tier, arbitrate trade-offs, and generate comprehensive architecture documents (ARCHITECTURE.md or Architecture Decision Records) complete with Mermaid diagrams, component boundaries, and project layouts.
Architectural Decision Heuristics & Principles
Before recommending stacks or generating diagrams, apply these 5 architectural heuristics:
- Modular Monolith First Over Premature Microservices:
- Avoid distributed systems overhead (network serialization, eventual consistency, distributed transactions, split-brain failure modes) until team structure or orthogonal scaling vectors strictly demand service boundaries.
- Start with a well-factored modular monolith with clean domain boundaries. Keep components decoupled so they can be extracted into microservices later without rewriting domain logic.
- Guard against premature abstraction by referencing Detect Overengineering.
- Spend "Innovation Tokens" Sparingly (Boring Technology Defaults):
- Choose stable, battle-tested components for core persistence and transport (e.g., PostgreSQL, Redis, Linux, standard HTTP/JSON).
- Spend innovation tokens strictly on what delivers core business differentiation rather than novel infrastructure or experimental runtimes.
- Two-Way Doors & Operational Reversibility:
- Favor decoupled, reversible architectural decisions over irreversible lock-in.
- Ensure database schemas support zero-downtime rolling deployments and backwards-compatible rollbacks (expand-and-contract pattern). Consult SQL Executor.
- Arbitrate Competing Alternatives via Evaluation Panels:
- When evaluating competing architectural designs or ADR proposals, pair with LLM-as-Judge to stress-test failure cascades (Pessimist), review drag (Contrarian), rollback safety (Pragmatist), and resource locks (Specialist).
- Vendor-Neutral Observability from Day 1:
- Plan OpenTelemetry (OTel) instrumentation for distributed traces, metrics, and structured logs as a foundational requirement rather than a retrofit.
Prerequisites & Environment Adaptation
- Interactive Questionnaire: Use your environment's native question tool:
ask_questionin AntigravityAskUserQuestionin Claude Code- Structured multiple-choice numbered questions in GitHub Copilot Chat
- Reference Catalog: Reference matrices in Architectural Planning Reference for detailed compatibility checks.
Workflow: Step-by-Step Architectural Design
Step 1 — Understand Scope & Scale
Ask both questions in a single interactive call to establish baseline parameters:
- Project Archetype:
- Full-stack web application — Integrated backend + frontend.
- API / Backend service — REST, GraphQL, or gRPC service (no UI).
- Frontend only / SPA — Client application consuming existing APIs.
- Distributed Microservices — Independent domain services communicating via event streams or RPC.
- CLI Tool / Library / SDK — Command-line binary or reusable package.
- Mobile Backend (BFF) — Backend-for-Frontend tailored for mobile network constraints.
- Expected Scale & Operational Complexity:
- Small / MVP — 1 developer, <1K users, single-server/PaaS, fast time-to-market.
- Growth / Mid-Scale — 2–10 developers, 1K–100K users, multi-instance deployment, CI/CD, fast iteration.
- Enterprise / High-Scale — 10+ developers, 100K+ users, high availability, multi-region, strict compliance (SOC2/GDPR/PCI).
Store as project_type and project_scale.
Step 2 — Backend Technology Stack
(Skip if project_type is "Frontend only".)
Consult Section 1 (Backend Stack Matrix).
Prompt the user with current runtime recommendations:
- TypeScript / Node.js 22 LTS or Bun (Fastify / NestJS / Express 5):
- Best for: Rapid iteration, unified TypeScript frontend/backend, real-time WebSockets, I/O-heavy services.
- Specialist skill: TypeScript Developer.
- Java 21/25 LTS / Spring Boot 3.3+:
- Best for: Large enterprise teams, Project Loom virtual threads, high-throughput microservices, complex banking/fintech domain models.
- Specialist skill: Java Developer.
- C# 12/13 / .NET 8/9 LTS (ASP.NET Core):
- Best for: High-performance cross-platform services, Minimal APIs, enterprise Azure integrations, built-in Polly resilience and HybridCache.
- Specialist skill: C# Developer.
- Python 3.12+ / FastAPI or Django 5:
- Best for: AI/ML pipelines, LLM agent integration, data-intensive APIs (FastAPI with Pydantic v2), or rapid MVP admin apps (Django).
- Specialist skill: Python Developer.
- Go 1.22+:
- Best for: High-concurrency network proxies, infrastructure tooling, microservices, minimal memory footprints.
- Rust / Axum or Actix-web:
- Best for: Latency-critical systems, cryptography, high-efficiency data transforms without garbage collection.
Store as backend_stack.
Step 3 — Frontend Stack
(Skip if project_type is "API / Backend service", "CLI Tool / Library", or "Mobile Backend".)
Prompt the user:
- React 19 / Next.js 15 (App Router, Server Components):
- Best for: Rich interactive applications, SEO-critical portals, largest community and component ecosystem.
- Specialist skill: React Developer.
- React 19 / Vite (Client SPA):
- Best for: Internal dashboards, authenticated SaaS portals where SEO is irrelevant.
- Vue.js 3 / Nuxt 3:
- Best for: Smooth learning curve, clean single-file components (SFCs), progressive adoption.
- Svelte 5 / SvelteKit:
- Best for: Minimal runtime overhead, reactive runes, performance-critical web applications.
- HTMX + Server-Rendered Templates (Thymeleaf / Jinja2 / Razor):
- Best for: Simple CRUD UIs, eliminating client-side state build complexity.
Store as frontend_stack.
Step 4 — Database & Persistence Layer
(Skip if project_type is "Frontend only".)
Consult Section 2 (Database Compatibility Matrix).
Prompt the user:
- PostgreSQL 16+: Relational gold standard with ACID guarantees, JSONB document querying, full-text search, and
pgvectorAI embeddings. Safe default for 90% of applications. - MySQL 8.4 LTS / MariaDB: Battle-tested relational database, widely supported in cloud managed offerings.
- SQLite: Zero-config, single-file embedded database. Ideal for local-first apps, CLI tools, tests, and Node.js 22 built-in
node:sqlite. - Microsoft SQL Server 2022: Enterprise standard with deep .NET integration, columnstore indexes, and Windows enterprise ecosystem.
- MongoDB: Document database with dynamic schemas. Ideal for polymorphic catalogs or unstructured event payloads.
- AWS DynamoDB: Serverless, single-digit millisecond latency key-value store with auto-scaling.
Automatic Data Access & Migration Recommendation: Immediately match the chosen database + backend stack:
- Spring Boot + PostgreSQL: Spring Data JPA + Hibernate + HikariCP; Flyway or Liquibase for migrations.
- Node/TypeScript + PostgreSQL: Prisma ORM or Drizzle ORM +
pg; Prisma Migrate or Drizzle Kit. - Python/FastAPI + PostgreSQL: SQLAlchemy 2.0 (async) +
asyncpg; Alembic for migrations. - C#/.NET + SQL Server/PostgreSQL: EF Core + Microsoft.Data.SqlClient or Npgsql; EF Core Migrations.
- Go + PostgreSQL:
pgx/v5withsqlcor GORM;golang-migratefor migrations.
Store as database, data_access_library, and migration_tool.
Step 5 — Caching Strategy
Consult Section 3 (Caching Library Matrix).
Prompt the user:
- Redis 7+ (Distributed Cache): Industry standard for session storage, distributed rate limiting, cache stampede prevention, and pub/sub.
- Recommend pairing with Caching & Queues Reviewer for SingleFlight / HybridCache patterns.
- In-Memory Cache Only: Application-level cache (Caffeine for Java,
node-cache/lru-cachefor Node,IMemoryCachefor .NET,cachetoolsfor Python). Best for single-instance services. - Multi-Tier Caching (L1 In-Memory + L2 Distributed Redis + L3 Edge CDN): For high-throughput read-heavy APIs.
- No Caching Needed (Direct Database): Best for initial MVPs to avoid cache invalidation complexity.
Store as caching_strategy and cache_library.
Step 6 — Authentication & Identity Defense
(Skip if project_type is "CLI Tool / Library".)
Consult Section 4 (Authentication Library Matrix) and pair with API Security.
Prompt the user:
- Stateless JWT Tokens (OAuth 2.1 / OIDC standard): Asymmetric signing (RS256/ES256), short-lived access tokens (15m) + secure rotating refresh tokens in HTTP-only cookies.
- Server-Side Sessions: Stateful sessions stored in Redis. Ideal for traditional web apps and SSR without client token management.
- Managed Identity Provider: Auth0, AWS Cognito, Firebase Auth, Clerk, or Supabase Auth. Offloads MFA, OAuth social login, and user management.
- Self-Hosted Identity Server: Keycloak. Ideal for enterprise on-premise deployments requiring full protocol control.
Store as auth_approach and auth_library.
Step 7 — Asynchronous Messaging & Event Streaming
(Skip if project_scale is "Small / MVP" and project_type is NOT "Microservices".)
Prompt the user:
- Apache Kafka / Redpanda: High-throughput distributed commit log, event sourcing, immutable audit streams, partition-ordered processing.
- RabbitMQ: Advanced message broker with flexible routing (topic, fanout, headers), dead-letter exchanges (DLQ), and task queues.
- Cloud Managed Queues (AWS SQS/SNS, Azure Service Bus, GCP Pub/Sub): Serverless, zero-maintenance queueing.
- NATS / JetStream: Lightweight, ultra-high performance cloud-native messaging.
- No Asynchronous Messaging: Synchronous REST/gRPC only.
Store as messaging.
Step 8 — Deployment & Cloud Topology
Prompt both questions in a single call:
- Deployment Architecture:
- Docker + Kubernetes (K8s): Container orchestration, autoscaling, service mesh. Best for multi-service enterprise architectures.
- Docker + Docker Compose: Lightweight containerized deployment on virtual machines.
- Cloud Serverless (AWS Lambda, Google Cloud Run, Azure Container Apps): Scale-to-zero, pay-per-request, minimal infra overhead.
- PaaS (Railway, Render, Fly.io): Developer-centric, git-push-to-deploy, rapid time-to-market.
- Target Infrastructure Provider:
- AWS / Google Cloud / Microsoft Azure / Self-Hosted / Hybrid.
Store as deployment and cloud_provider.
Step 9 — CI/CD Pipeline & Delivery Gates
Prompt the user:
- GitHub Actions: Native GitHub automation, marketplace actions, matrix builds.
- GitLab CI: Integrated GitLab pipelines, Kubernetes integration.
- ArgoCD / Flux (GitOps): Declarative continuous delivery for Kubernetes clusters.
- Jenkins / Azure DevOps: Established enterprise CI/CD systems.
Store as cicd.
Step 10 — Observability & Reliability
Prompt the user:
- OpenTelemetry (OTel) + Prometheus + Grafana: Vendor-neutral distributed tracing, metrics, and visualization.
- Datadog / New Relic: Commercial full-stack APM, log aggregation, and synthetic monitoring.
- Cloud-Native Observability (AWS CloudWatch / GCP Cloud Monitoring / Azure Monitor): Managed monitoring native to provider.
- Lightweight Logging + Sentry: Structured JSON logging (Pino/Logback/Serilog) with Sentry exception tracking.
Store as monitoring.
Step 11 — Confirm, Arbitrate & Generate Document
11a. Present Decision Summary
Display the consolidated architectural matrix:
| Architectural Layer | Choice | Rationale / Driver |
|---|---|---|
| **Project Type** | {project_type} | Functional scope |
| **Scale Target** | {project_scale} | Availability & concurrency requirement |
| **Backend Stack** | {backend_stack} | Core service implementation |
| **Frontend Stack** | {frontend_stack} | User presentation layer |
| **Database & ORM** | {database} + {data_access_library} | Persistent storage & mapping |
| **Database Migrations** | {migration_tool} | Versioned schema evolution |
| **Caching Layer** | {caching_strategy} ({cache_library}) | Latency & load reduction |
| **Authentication** | {auth_approach} ({auth_library}) | Identity & access boundary |
| **Asynchronous Events** | {messaging} | Event decoupling & task distribution |
| **Deployment & Cloud** | {deployment} on {cloud_provider} | Runtime environment |
| **CI/CD** | {cicd} | Automated build & verification |
| **Observability** | {monitoring} | Traces, metrics, logs, alerting |11b. Confirmation & Trade-Off Arbitration
Prompt the user:
"Would you like to generate the complete architecture document (
ARCHITECTURE.md), modify any layer, or run an architecture trade-off evaluation via LLM-as-Judge?"
- If the user wants to compare two architectural options (e.g., PostgreSQL vs MongoDB, REST vs gRPC), invoke LLM-as-Judge using Pattern 2 (Pairwise) or Pattern 7 (Evaluator Archetypes: Pessimist, Contrarian, Pragmatist, Specialist).
11c. Generate Complete ARCHITECTURE.md
Generate a production-grade architecture document following Section 6 (Output Document Template):
- System Overview & Goals: Business context, functional requirements, and SLA targets.
- Architecture Topology (Mermaid Diagram):
- Ensure Mermaid syntax is strictly valid.
- Use
flowchart TDorgraph TDfor component and network topologies. - Quote node labels containing parentheses or punctuation (e.g.
node["FastAPI (Python 3.12)"]).
- Component Breakdown: Responsibilities of each tier with strict interface boundaries.
- Data Architecture & Schema Strategy: Primary data models, relationships, indexing, and migration protocols.
- Security & Authentication Flow (Mermaid Sequence Diagram): Token issuance, verification, and role-based access control.
- Resilience & Fault Tolerance: Bulkheads, circuit breakers, retry policies, and timeouts.
- Recommended Project Directory Structure: Stack-specific directory tree from Section 7.
- Dependency & Tooling Reference: Concrete library versions from Section 8.
Write the generated document to ARCHITECTURE.md in the project root (or user-chosen path).
Repository Skill Integrations
- Agent Orchestrator: Pass the generated
ARCHITECTURE.mdinto Stage 1 (plan) as the authoritative design blueprint. - LLM-as-Judge: Arbitrate architectural disputes and compare ADR options using the 4 Evaluator Archetypes (Pessimist, Contrarian, Pragmatist, Specialist).
- Detect Overengineering: Audit proposed architectures to eliminate unnecessary layer indirection, premature microservices, or speculative factory patterns.
- Caching & Queues Reviewer: Validate Redis TTLs, cache stampede protections, Kafka partition keys, and dead-letter queues.
- SQL Executor: Plan zero-downtime database migrations, index layouts, and parameterized queries.
- API Security: Audit token validation, OAuth 2.1 authorization flows, and CORS/CSRF headers.
- Specialist Implementation Skills: Once the stack is selected, hand off code generation to TypeScript Developer, Java Developer, Python Developer, C# Developer, or React Developer.
Reference Materials
- Architectural Planning Reference — Compatibility matrices (Backend $\times$ Database, Backend $\times$ Cache, Backend $\times$ Auth), Mermaid diagram templates, complete 11-section document template, directory structure layouts, and dependency versions.
- Architecture Books & Best Practices Literature — Comprehensive bibliography and architectural decision heuristics synthesized from seminal literature: Kleppmann (DDIA), Richards & Ford (Architecture Hard Parts), Sam Newman (Monolith to Microservices), Michael Nygard (Release It!), Eric Evans (DDD), and Dan McKinley (Choose Boring Technology).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

