Design

From matteocervelli/llms · View interactive version

Design is an AI agent skill from the GitHub repository matteocervelli/llms. Design component architecture, REST API contracts, and data models (Pydantic schemas) before implementation. Use when planning how to build a feature, defining endpoints, or modeling data. Trigger on "design the architecture", "design the API", "data model", "how should I structure this feature".

How to use this skill

Skill file

Design — Architecture, API & Data Models

Unified design guidance for feature implementation. Auto-detects context from project files or accepts explicit mode.

Usage

/design                    # Auto-detect from project, show summary
/design architecture       # Component architecture, SOLID, patterns
/design api                # REST API design, auth, rate limiting
/design data               # Pydantic schemas, validators, relationships
/design full               # All three in sequence (architecture → data → API)

Workflow

Step 1: Determine Mode

Parse $ARGUMENTS for explicit mode. If no arguments provided, detect context:

DETECTED=$(bash "$HOME/.claude/skills/design/lib/design-detector.sh")

Map detection results to recommended mode:

Step 2: Show Relevant Guidance

Based on detected or explicit mode, use progressive disclosure:

Level 1 — Summary (default, ~15 lines):

Read and present the summary template for the chosen domain:

Level 2 — Patterns (on request for more detail, ~50 lines):

Read the patterns template with decision guidance and examples:

Level 3 — Full Reference (on request for complete SOP):

Read the deep reference documents on demand:

Step 3: Handle Multiple Domains

If context suggests multiple domains (e.g., new feature with API + data):

Step 4: No Context Detected

If detection returns "unknown" and no explicit mode:

`/design full` Sequence

When running the full design workflow:

  1. Architecture first: Component boundaries, layers, patterns, DI
  2. Data models second: Pydantic schemas based on architecture components
  3. API contracts third: Endpoints and schemas using data models

Output uses templates/architecture-doc.md as the final document template.

Output

Write documents to docs/architecture/ in the project root:

| Subcommand | Output Path |

| ---------------------- | --------------------------------------------- |

| /design architecture | docs/architecture/architecture-{feature}.md |

| /design api | docs/architecture/api-{feature}.md |

| /design data | docs/architecture/data-{feature}.md |

| /design full | docs/architecture/{feature}.md (combined) |

Use templates/architecture-doc.md as the document template with sections:

Create docs/architecture/ if it doesn't exist.

Integration

Invoked by: User directly (/design), /story prp workflow (design phase)

Invokes: Nothing directly — produces architecture docs consumed by prp-generator

Connected skills:

Progressive Disclosure Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.