laimis91/assistant-framework/skills/assistant-diagrams/SKILL.md
assistant-diagrams
Create Mermaid architecture, sequence, ER, flow, class, or state diagrams. Use for explicit diagram or system-flow visualization requests.
- Source repository stars
- 7
- Declared platforms
- 0
- Static risk flags
- 0
- Last source update
- 2026-08-04
- Source checked
- 2026-08-04
Decision brief
What it does—and where it fits
Create Mermaid architecture, sequence, ER, flow, class, or state diagrams. Use for explicit diagram or system-flow visualization requests.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/laimis91/assistant-framework --skill "skills/assistant-diagrams"Inspect the Agent Skill "assistant-diagrams" from https://github.com/laimis91/assistant-framework/blob/e85fbadd83b022d9644bbe51b11784cf2e2dfd72/skills/assistant-diagrams/SKILL.md at commit e85fbadd83b022d9644bbe51b11784cf2e2dfd72. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Contracts
Creates accurate Mermaid diagrams from code analysis. Covers the developer's visual documentation weakness.
diagramtype and scope are required; format defaults to mermaiddiagramcode must be valid syntax parseable by the target rendererdiagramtype is echoed back in output to confirm what was generated - 02
Goal
Generate diagrams that make real code structure or behavior easier to understand without inventing components.
Generate diagrams that make real code structure or behavior easier to understand without inventing components. - 03
Success Criteria
Diagram type, scope, evidence, placement, and gaps are explicit.
Diagram type, scope, evidence, placement, and gaps are explicit.Every node and edge is traceable to inspected code, configuration, or user-provided context.Mermaid output is small enough to read and structured enough to render. - 04
Constraints
Ask only when diagram type or scope materially changes the result and cannot be inferred from prompt/context.
Ask only when diagram type or scope materially changes the result and cannot be inferred from prompt/context.If multiple diagram types are plausible, choose the best fit from source evidence or ask one bounded question.Do not add aspirational boxes, future architecture, or unlabeled relationships unless the user explicitly asks for a proposed design. - 05
Available Diagram Types
Review the “Available Diagram Types” section in the pinned source before continuing.
Review and apply the “Available Diagram Types” source section.
Permission review
Static risk signals and limitations
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 85/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- laimis91/assistant-framework
- Skill path
- skills/assistant-diagrams/SKILL.md
- Commit
- e85fbadd83b022d9644bbe51b11784cf2e2dfd72
- License
- MIT
- Collected
- 2026-08-04
- Default branch
- main
View the original SKILL.md
Diagram Generator
Contracts
| File | Purpose |
|---|---|
contracts/input.yaml | diagram_type, scope, source_files[], format |
contracts/output.yaml | diagram_code, diagram_type, description |
diagram_typeandscopeare required;formatdefaults to mermaiddiagram_codemust be valid syntax parseable by the target rendererdiagram_typeis echoed back in output to confirm what was generated
Creates accurate Mermaid diagrams from code analysis. Covers the developer's visual documentation weakness.
Core principle: Diagrams should be generated from code, not drawn from memory.
Goal
Generate diagrams that make real code structure or behavior easier to understand without inventing components.
Success Criteria
- Diagram type, scope, evidence, placement, and gaps are explicit.
- Every node and edge is traceable to inspected code, configuration, or user-provided context.
- Mermaid output is small enough to read and structured enough to render.
Constraints
- Ask only when diagram type or scope materially changes the result and cannot be inferred from prompt/context.
- If multiple diagram types are plausible, choose the best fit from source evidence or ask one bounded question.
- Do not add aspirational boxes, future architecture, or unlabeled relationships unless the user explicitly asks for a proposed design.
Available Diagram Types
| Type | File | Best for |
|---|---|---|
| Architecture | arch-diagram.md | System overview, component relationships |
| Sequence | sequence-diagram.md | Request flows, interaction patterns |
| Entity-Relationship | er-diagram.md | Data models, database schema |
| Flow | flow-diagram.md | Business logic, decision trees, algorithms |
| Component | component-diagram.md | Module boundaries, dependencies |
| Class | class-diagram.md | Type hierarchies, interfaces, relationships |
| State | state-diagram.md | State machines, lifecycle transitions |
Auto-Selection
Input arrives
│
├─ "architecture" / "system overview" → arch-diagram.md
├─ "flow" / "how does X work" → sequence-diagram.md or flow-diagram.md
├─ "data model" / "entities" / "schema" → er-diagram.md
├─ "dependencies" / "modules" → component-diagram.md
├─ "class hierarchy" / "types" → class-diagram.md
├─ "state" / "lifecycle" / "transitions" → state-diagram.md
└─ ambiguous → ask user or pick best fit
Prefer picking the best fit when the user's intent and code context point clearly to one type. Ask only when the choice would materially change what gets inspected or drawn.
General Protocol
For all diagram types:
- Read the relevant code — trace the actual paths, don't guess
- Right-size the diagram — show what matters, omit noise
- Verify accuracy — every box/arrow must correspond to real code
- Use project terminology — names from code, not generic labels
- Output as Mermaid — embeddable in markdown, renderable everywhere
Diagram Complexity Guidelines
| Project Size | Guideline |
|---|---|
| Small (< 10 files) | Single diagram can show everything |
| Medium (10-50 files) | One overview + detail diagrams per area |
| Large (50+ files) | Layered: L0 overview → L1 component → L2 detail |
Output
Return:
- Result - the diagram type generated and a brief description of what it shows.
- Diagram - valid Mermaid inside a fenced code block:
```mermaid
[diagram content]
```
- Evidence - code files, symbols, or paths used to derive the diagram.
- Placement - where the diagram was written, or "inline only" if no file changed.
- Gaps - any missing context, assumptions, or follow-up questions affecting accuracy.
Where to Place Diagrams
- If generating docs (via
assistant-docs): embed in the doc - If user asks directly: output inline in conversation
- If generating architecture doc: embed in
docs/architecture.md - For standalone diagrams:
docs/diagrams/[name].md
Mermaid Best Practices
- Keep node labels short (2-4 words)
- Use meaningful edge labels (verb phrases: "calls", "reads from", "publishes to")
- Group related nodes with
subgraph - Use direction that reads naturally (TD for hierarchies, LR for flows)
- Limit to ~15-20 nodes per diagram — split larger ones
Rules
- Every element must exist in code — no aspirational boxes
- Don't show everything — show what helps understanding
- Label relationships — unlabeled arrows are useless
- Use consistent styling — same type of component gets same shape
- Test rendering — Mermaid syntax errors are common, validate mentally
Stop Rules
- Stop and ask one focused question when neither scope nor diagram type can be inferred safely.
- Stop and report gaps when required source files or relationships cannot be inspected.
- Do not finalize if the diagram contains elements without source evidence.