askill
generate-arch-doc

generate-arch-docSafety 100Repository

Generates comprehensive architecture documentation with Mermaid diagrams, component descriptions, data flow analysis, and deployment overview by exploring the entire codebase. Use when the user asks for architecture documentation, system design docs, or a technical overview document.

0 stars
1.2k downloads
Updated 3/3/2026

Package Files

Loading files...
SKILL.md

Instructions

You are a technical writer and architect. Generate a comprehensive architecture document that would help a new developer understand the system quickly.

Step 1: Map the system

Scan the project thoroughly:

  • Read root config files (package.json, go.mod, pyproject.toml, etc.)
  • List top-level directories and identify their purpose
  • Find entry points (main files, server startup, app initialization)
  • Identify external service integrations (databases, caches, queues, APIs)

Step 2: Generate the system context diagram

Create a Mermaid C4 Context diagram showing:

  • The system as a central box
  • External actors (users, admin, other services)
  • External dependencies (databases, third-party APIs, message queues)
graph TB
    User[User/Browser] --> App[Application]
    App --> DB[(Database)]
    App --> Cache[(Redis Cache)]
    App --> ExtAPI[External API]

Step 3: Document components

For each major module/package/directory:

Component catalog table:

ComponentResponsibilityKey FilesDependencies
authAuthentication and session managementsrc/auth/database, jwt
apiHTTP route handlerssrc/routes/auth, services

Then for each significant component, write:

  • Purpose: One sentence describing what it does
  • Key interfaces: The public API surface (exported functions, classes, routes)
  • Dependencies: What it depends on (other internal components + external)
  • Design decisions: Any notable patterns or trade-offs visible in the code

Step 4: Data flow diagrams

Create Mermaid sequence diagrams for 2-3 key workflows. Pick the most important user-facing flows:

sequenceDiagram
    participant Client
    participant API
    participant Auth
    participant DB
    Client->>API: POST /login
    API->>Auth: validate credentials
    Auth->>DB: query user
    DB-->>Auth: user record
    Auth-->>API: JWT token
    API-->>Client: 200 + token

Identify these workflows by:

  • Finding the main API routes or pages
  • Tracing the most complex or business-critical paths
  • Including at least one read flow and one write flow

Step 5: Technology stack

Create a table of all technologies with purpose:

TechnologyVersionPurpose
TypeScript5.xPrimary language
Express4.xHTTP framework
PostgreSQL15Primary database
Redis7.xCaching and sessions

Extract versions from lock files and config files.

Step 6: Deployment architecture (if applicable)

If Docker, Kubernetes, Terraform, or other infrastructure files exist:

  • Document the deployment topology
  • Create a Mermaid deployment diagram
  • Note environment variables and configuration

Step 7: Development guide

Extract from README, Makefile, scripts, and package.json:

  • Prerequisites: required tools and versions
  • Setup: how to get the project running locally
  • Build: how to build for production
  • Test: how to run the test suite
  • Common tasks: any notable scripts or make targets

Output structure

# Architecture: [Project Name]

## Overview
[2-3 sentences describing what this system does and who it serves]

## System Context
[Mermaid C4 context diagram]

## Component Architecture
[Mermaid component diagram]

### Component Catalog
[Table of all components]

### [Component Name]
[Detailed description for each significant component]

## Key Data Flows
### [Flow 1 Name]
[Mermaid sequence diagram + description]
### [Flow 2 Name]
[Mermaid sequence diagram + description]

## Technology Stack
[Tech stack table]

## Deployment
[Deployment diagram and description, if applicable]

## Development Guide
[Setup, build, test instructions]

## Glossary
[Key domain terms used in the codebase]

Guidelines

  • Use Mermaid for ALL diagrams — they render natively in GitHub and most doc tools
  • Keep descriptions concise — this is a reference document, not a novel
  • Focus on "why" decisions were made, not just "what" exists
  • If you can't determine something from the code, say "Not determined from codebase" rather than guessing
  • Include a glossary for domain-specific terms found in the code
  • Save the document to $ARGUMENTS path if provided, otherwise present it to the user

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

88/100Analyzed 3/27/2026

Excellent, comprehensive skill for generating architecture documentation. Well-structured with 7 detailed steps, Mermaid diagram examples, component catalog tables, and a complete output template. Highly reusable as it applies to any codebase, with good actionability through clear instructions and appropriate tools (Read, Grep, Glob, Bash for git log/find). Tags improve discoverability. Only minor gap is explicit error handling in the instructions. Score reflects high-quality technical reference content that is both accurate and well-structured.

100
95
90
85
90

Metadata

Licenseunknown
Version-
Updated3/3/2026
Publishersitharaj88

Tags

apici-cddatabasegithubobservabilitysecuritytesting