C4 Architecture Diagrams
lexler/skill-factory
Creates C4 model diagrams at every zoom level, from system landscape to code, in ASCII, Mermaid or Structurizr, for designing or documenting software architecture.
Helps an agent pick the right Mermaid diagram type and write the syntax for class, sequence, flow, ER, C4, state and other software diagrams.
$ npx skills add jjmartres/opencode --skill mermaid-diagrams -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jjmartres/opencode mermaid-diagrams --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jjmartres/opencode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/opencode/skills/mermaid-diagrams .claude/skills/mermaid-diagrams && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "mermaid-diagrams" agent skill from https://github.com/jjmartres/opencode/tree/main/opencode/skills/mermaid-diagrams into .claude/skills/mermaid-diagrams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-diagrams", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jjmartres/opencode/tree/main/opencode/skills/mermaid-diagramsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jjmartres/opencode --skill mermaid-diagrams -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jjmartres/opencode mermaid-diagrams --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jjmartres/opencode.git skills-src && mkdir -p .agents/skills && cp -r skills-src/opencode/skills/mermaid-diagrams .agents/skills/mermaid-diagrams && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mermaid-diagrams" agent skill from https://github.com/jjmartres/opencode/tree/main/opencode/skills/mermaid-diagrams into .agents/skills/mermaid-diagrams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-diagrams", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jjmartres/opencode --skill mermaid-diagrams -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jjmartres/opencode mermaid-diagrams --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jjmartres/opencode.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/opencode/skills/mermaid-diagrams .cursor/skills/mermaid-diagrams && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "mermaid-diagrams" agent skill from https://github.com/jjmartres/opencode/tree/main/opencode/skills/mermaid-diagrams into .cursor/skills/mermaid-diagrams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-diagrams", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jjmartres/opencode.git --path opencode/skills/mermaid-diagrams--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jjmartres/opencode --skill mermaid-diagrams -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jjmartres/opencode mermaid-diagrams --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jjmartres/opencode.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/opencode/skills/mermaid-diagrams .gemini/skills/mermaid-diagrams && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "mermaid-diagrams" agent skill from https://github.com/jjmartres/opencode/tree/main/opencode/skills/mermaid-diagrams into .gemini/skills/mermaid-diagrams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-diagrams", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jjmartres/opencode mermaid-diagramsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jjmartres/opencode --skill mermaid-diagrams -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jjmartres/opencode.git skills-src && mkdir -p .github/skills && cp -r skills-src/opencode/skills/mermaid-diagrams .github/skills/mermaid-diagrams && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "mermaid-diagrams" agent skill from https://github.com/jjmartres/opencode/tree/main/opencode/skills/mermaid-diagrams into .github/skills/mermaid-diagrams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-diagrams", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jjmartres/opencode --skill mermaid-diagrams -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jjmartres/opencode mermaid-diagrams --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jjmartres/opencode.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/opencode/skills/mermaid-diagrams .opencode/skills/mermaid-diagrams && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "mermaid-diagrams" agent skill from https://github.com/jjmartres/opencode/tree/main/opencode/skills/mermaid-diagrams into .opencode/skills/mermaid-diagrams/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mermaid-diagrams", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
mermaid-diagramsHelps an agent pick the right Mermaid diagram type and write the syntax for class, sequence, flow, ER, C4, state and other software diagrams.
The skill explains Mermaid's text syntax, where the first line names the diagram type and `%%` marks comments, and it includes a selection guide matching tasks to diagram types: class diagrams for domain models, sequence diagrams for API and authentication flows, flowcharts for processes and user journeys, ER diagrams for schemas, and C4 diagrams at context, container, component and code levels. State diagrams, git graphs, Gantt charts and pie or bar charts are listed as well.
Quick-start examples show a domain model, an API flow, a user journey and a database schema. Detailed reference files cover class, sequence, flowchart, ER and C4 diagrams plus architecture diagrams and advanced features. The skill warns that unknown words break a diagram and that parameters can fail silently. Because Mermaid is plain text, the diagrams can be version-controlled next to the code.
9 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 28dc323. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npmdockerFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
mermaid.liveFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Mermaid Diagrams loads about 1.9k tokens when it runs, and up to ~19k if it reads all its reference files. Until then it costs about 180 tokens; SKILL.md has 536 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jjmartres/opencode at commit 28dc323, republished under its MIT licence (© jjmartres). 536 words, ~1,866 tokens.
.claude/skills/mermaid-diagrams/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.Create professional software diagrams using Mermaid's text-based syntax. Mermaid renders diagrams from simple text definitions, making diagrams version-controllable, easy to update, and maintainable alongside code.
All Mermaid diagrams follow this pattern:
diagramType
definition contentKey principles:
classDiagram, sequenceDiagram, flowchart)%% for commentsChoose the right diagram type:
Class Diagrams - Domain modeling, OOP design, entity relationships
Sequence Diagrams - Temporal interactions, message flows
Flowcharts - Processes, algorithms, decision trees
Entity Relationship Diagrams (ERD) - Database schemas
C4 Diagrams - Software architecture at multiple levels
State Diagrams - State machines, lifecycle states
Git Graphs - Version control branching strategies
Gantt Charts - Project timelines, scheduling
Pie/Bar Charts - Data visualization
classDiagram
Title -- Genre
Title *-- Season
Title *-- Review
User --> Review : creates
class Title {
+string name
+int releaseYear
+play()
}
class Genre {
+string name
+getTopTitles()
}sequenceDiagram
participant User
participant API
participant Database
User->>API: POST /login
API->>Database: Query credentials
Database-->>API: Return user data
alt Valid credentials
API-->>User: 200 OK + JWT token
else Invalid credentials
API-->>User: 401 Unauthorized
endflowchart TD
Start([User visits site]) --> Auth{Authenticated?}
Auth -->|No| Login[Show login page]
Auth -->|Yes| Dashboard[Show dashboard]
Login --> Creds[Enter credentials]
Creds --> Validate{Valid?}
Validate -->|Yes| Dashboard
Validate -->|No| Error[Show error]
Error --> LoginerDiagram
USER ||--o{ ORDER : places
ORDER ||--|{ LINE_ITEM : contains
PRODUCT ||--o{ LINE_ITEM : includes
USER {
int id PK
string email UK
string name
datetime created_at
}
ORDER {
int id PK
int user_id FK
decimal total
datetime created_at
}For in-depth guidance on specific diagram types, see:
%% comments to explain complex relationships.mmd files alongside code for easy updatesConfigure diagrams using frontmatter:
---
config:
theme: base
themeVariables:
primaryColor: "#ff6b6b"
---
flowchart LR
A --> BAvailable themes: default, forest, dark, neutral, base
Layout options:
layout: dagre (default) - Classic balanced layoutlayout: elk - Advanced layout for complex diagrams (requires integration)Look options:
look: classic - Traditional Mermaid stylelook: handDrawn - Sketch-like appearanceNative support in:
Export options:
npm install -g @mermaid-js/mermaid-cli then mmdc -i input.mmd -o output.pngdocker run --rm -v $(pwd):/data minlag/mermaid-cli -i /data/input.mmd -o /data/output.png{} in comments, use proper escape sequences for special charactersAlways diagram when:
Use diagrams to:
© jjmartres, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 7 other files (references) in opencode/skills/mermaid-diagrams of jjmartres/opencode.
Open the folder on GitHubat commit 28dc323
We found 6 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 6 other GitHub owners. This page covers the copy in jjmartres/opencode, which our catalogue first saw on October 7, 2026.
Mermaid Diagrams next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Mermaid Diagrams this skilljjmartres/opencode | 133 | 6 repos | ~1.9k | Automated safety check: Pass | MIT | |
| C4 Architecture Diagramslexler/skill-factory | 239 | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Archify Diagramstt-a1i/archify | 82k | — | ~2.9k | Automated safety check: Pass | MIT | |
| Diagram Designcathrynlavery/diagram-design | 49k | 1 repos | ~7.6k | Automated safety check: Pass | MIT | |
| Draw.io Diagram StudioAgents365-ai/drawio-skill | 10k | — | ~2.4k | Automated safety check: Notes | MIT | |
| Dark Architecture Diagram BuilderCocoon-AI/architecture-diagram-generator | 7.4k | 1 repos | ~2.1k | Automated safety check: Pass | MIT |
lexler/skill-factory
Creates C4 model diagrams at every zoom level, from system landscape to code, in ASCII, Mermaid or Structurizr, for designing or documenting software architecture.
tt-a1i/archify
Creates interactive architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone HTML with inline SVG, themes and image or video export.
cathrynlavery/diagram-design
Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.
Agents365-ai/drawio-skill
Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.
Cocoon-AI/architecture-diagram-generator
Creates dark-themed system, cloud, security and network architecture diagrams as self-contained HTML files with inline SVG and CSS.
imxv/Pretty-mermaid-skills
Writes and renders Mermaid diagrams as themed SVG, PNG or terminal ASCII and Unicode art with a bundled Node.js CLI that needs no browser.
jjmartres/opencode
Builds Marp slide decks in one of seven ready-made themes, using bundled templates plus syntax, image and style references to keep slides short and readable.
jjmartres/opencode
Lets an agent view, create, update and transition Jira issues in natural language, automatically choosing between the jira CLI and Atlassian MCP tools.
jjmartres/opencode
Applies Google Style documentation to Python docstrings, Go comments and Terraform descriptions, for writing new docs or reviewing existing ones.
jjmartres/opencode
Guides use of Worktrunk (wt), a CLI that makes git worktrees as easy as branches so several AI agents can work in parallel on isolated branches.
jjmartres/opencode
A skill your agent uses when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text.
jjmartres/opencode
A skill your agent uses whenever the user wants to install, configure, or use asdf (asdf-vm), the universal version manager.
Categories
Helps an agent pick the right Mermaid diagram type and write the syntax for class, sequence, flow, ER, C4, state and other software diagrams. The skill explains Mermaid's text syntax, where the first line names the diagram type and `%%` marks comments, and it includes a selection guide matching tasks to diagram types: class diagrams for domain models, sequence diagrams for API and authentication flows, flowcharts for processes and user journeys, ER diagrams for schemas, and C4 diagrams at context, container, component and code levels. State diagrams, git graphs, Gantt charts and pie or bar charts are listed as well.
Mermaid Diagrams fits situations like: documenting a service's request flow as a sequence diagram; sketching a database schema as an ER diagram; drawing C4 architecture views of a system; showing a branching strategy as a git graph.
Run `npx skills add jjmartres/opencode --skill mermaid-diagrams -a claude-code`. Or copy the skill folder (opencode/skills/mermaid-diagrams in jjmartres/opencode) into .claude/skills/mermaid-diagrams in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jjmartres/opencode --skill mermaid-diagrams -a codex`. Or copy the skill folder (opencode/skills/mermaid-diagrams in jjmartres/opencode) into .agents/skills/mermaid-diagrams in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jjmartres/opencode --skill mermaid-diagrams -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mermaid-diagrams, .gemini/skills/mermaid-diagrams, .github/skills/mermaid-diagrams and .opencode/skills/mermaid-diagrams in your project.
Going by SKILL.md and its folder, Mermaid Diagrams needs the command-line tools its instructions call (npm and docker).
SKILL.md names 1 domain. As links in the text: mermaid.live. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Mermaid Diagrams is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 17k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Mermaid Diagrams: C4 Architecture Diagrams (lexler/skill-factory, 239 stars), Archify Diagrams (tt-a1i/archify, 82k stars), Diagram Design (cathrynlavery/diagram-design, 49k stars) and Draw.io Diagram Studio (Agents365-ai/drawio-skill, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jjmartres (a GitHub user) maintains it in jjmartres/opencode, which has 133 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on April 20, 2026.
Source: jjmartres/opencode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.