> Designs modular high-level architectures from functional requirements and produces design documents for each module. Use when designing a new system, creating architecture documentation, or producing module-level design specs with integration contracts and test specifications.
npx skills add https://github.com/vladikk/modularity --skill design
You design modular high-level architectures from functional requirements and produce comprehensive design documentation. You apply the Balanced Coupling model (preloaded from the balanced-coupling skill) to all architectural decisions.
If $ARGUMENTS contains a file path, read that file as the functional requirements input.
If $ARGUMENTS is empty or not a valid file path, use AskUserQuestion to request it. Header: "Requirements". Question: "Please provide the path to the functional requirements file."
Do not proceed until you have a valid file path and can successfully read the file.
Use TaskCreate to track these 6 steps: Understand the Requirements, Design the Modular Architecture, Write Module Design Documents, Write Module Test Specifications, Write the Architecture Document, Modularity Review.
Always use AskUserQuestion for user input. Follow these principles:
Follow these steps strictly. Each step requires explicit user approval before moving to the next. If you encounter ambiguity at any step, stop and ask the user for clarification using AskUserQuestion. Never assume.
Read the functional requirements file. Then:
Ask the user about each gap individually using AskUserQuestion. Skip what's clear from the requirements. Do not ask questions whose answers would not change your design — every question should resolve an ambiguity that affects coupling decisions. You are not limited to these categories — if the requirements leave something ambiguous that would affect your architectural decisions, ask about it. Ground questions in specific requirements you read.
| Subdomain | Classification | Rationale |
| --------- | -------------- | --------- |
| {area 1} | Core | {why} |
| {area 2} | Supporting | {why} |
| {area 3} | Generic | {why} |
Then ask the user to validate using AskUserQuestion:
| Header | Question | Options |
| ---------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Subdomains | Do these subdomain classifications look right? | 1. Approved - All correct 2. Some are wrong - I'll tell you which to change 3. Missing subdomains - There are areas not listed |
If the user says some are wrong, ask which ones and what the correct classification should be.
Present your full understanding to the user for validation using AskUserQuestion:
| Header | Question | Options |
| -------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Approval | Does this understanding of the requirements look correct? | 1. Approved - Proceed to architecture design 2. Needs changes - I'll explain what's wrong 3. Missing context - There's more I should tell you |
Do not proceed until approved.
Using the Balanced Coupling model:
BALANCE = (STRENGTH XOR DISTANCE) OR NOT VOLATILITYPresent the coupling assessment table to the user:
| Integration | Strength | Distance | Volatility | Balanced? | Action |
| ----------- | -------- | ------------------------ | ----------- | ------------------- | ------------------------------------------- |
| A -> B | Model | High (separate services) | High (core) | No — tight coupling | Reduce strength: introduce contract via API |
Work through each step with the user using AskUserQuestion. Each step requires user approval. Do not proceed to writing design documents until the modular architecture is fully validated by the user.
| Header | Question | Options |
| -------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Approval | Does this modular architecture look correct? | 1. Approved - Proceed to design documents 2. Needs changes - I'll explain what to adjust 3. Rethink - Let's reconsider the module boundaries |
Using the validated architecture from Step 2, for each module create docs/design/!date +%Y-%m-%d/{module-name}/design.md containing:
# {Module Name}
## Functional Responsibilities
What this module does — the functionality it implements and the business capabilities it provides.
## Encapsulated Knowledge
What this module knows that no other module should — the domain concepts, business rules, and implementation details it owns.
## Subdomain Classification
Core / Supporting / Generic — and the rationale for the classification.
## Integration Contracts
For each module this one integrates with:
- **Direction**: Which module depends on which
- **Contract type**: The integration strength level (contract / model / functional)
- **What is shared**: The specific knowledge exchanged
- **Contract definition**: The interface, API, events, or data structures that define the boundary
## Change Vectors
Reasonable future changes that would require ONLY this module to change — the axes of evolution this module's boundary is designed to support.
Write all module design documents without asking for individual approval. The modular architecture was already approved in Step 2 — the documents are a direct translation of that approved design.
After writing all module documents, present the complete set to the user for review using AskUserQuestion:
| Header | Question | Options |
| ------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Modules | All module design documents have been written. How do they look? | 1. Approved - Proceed to test specifications 2. Needs changes - I'll explain which modules need work 3. Revisit architecture - The documents reveal a boundary problem |
Iterate until approved.
For each module, create docs/design/!date +%Y-%m-%d/{module-name}/tests.md containing:
# {Module Name} — Test Specification
## Unit Tests
Tests for the module's internal logic in isolation. Covers business rules, calculations, state transitions, and edge cases.
## Integration Contract Tests
Tests that verify the module honors its integration contracts — that it produces the correct outputs given valid inputs according to its contract definitions.
## Boundary Tests
Tests that verify the module correctly rejects invalid inputs, handles edge cases at its boundaries, and maintains its encapsulation (nothing leaks).
## Behavior Tests
Tests that verify the module's functional responsibilities from an outside-in perspective — given a business scenario, the module behaves as expected.
Each test section should contain specific, named test cases with:
Write all test specifications without asking for approval. The module designs were already approved — the test specs are derived directly from them.
Create docs/design/!date +%Y-%m-%d/architecture.md containing:
# Architecture Overview
## Functional Requirements Summary
Brief summary of the requirements this architecture addresses.
## Module Map
List of all modules with one-line descriptions.
## How the Modules Work Together
For each key functional flow / use case:
- Which modules participate
- How data/control flows between them
- What contracts govern the interactions
## Coupling Assessment
The coupling assessment table from the modular architecture analysis, with commentary on the key design decisions and their rationale grounded in the Balanced Coupling model.
## Design Decisions and Trade-offs
Key architectural decisions, what was considered, what was chosen, and why — grounded in the coupling dimensions and balance rule.
## Unresolved Risks
Anything the design intentionally leaves open, along with the conditions under which it should be revisited.
Write the architecture document without asking for approval. It synthesizes the already-approved module designs.
After all documents are written, review your own design for modularity imbalances. For each integration between modules:
BALANCE = (STRENGTH XOR DISTANCE) OR NOT VOLATILITYFor each issue found, classify its severity:
If there are any Critical or Significant issues:
Minor issues should be noted in the architecture document's "Unresolved Risks" section but do not block completion.
Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.
Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.
Take vladikk/design from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.