一键导入
dotnet-mermaid-diagrams
Creates Mermaid diagrams for .NET. Architecture, sequence, class, deployment, ER, flowcharts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Creates Mermaid diagrams for .NET. Architecture, sequence, class, deployment, ER, flowcharts.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
AI-powered wiki generation for code repositories with commands, agents, and skills
Routes .NET/C# work to domain skills. Loads coding-standards for code paths.
Skill manifest management for dotnet-agent-harness. Tracks skill dependencies, conflicts, version compatibility, and provides validation and resolution tools. Triggers on: skill manifest, dependency resolution, skill compatibility, version conflicts, build manifest, validate dependencies.
Design patterns and architectural guidance for .NET applications. Navigation skill covering vertical slices, domain modeling, messaging patterns, resilience, caching, and system design. For building scalable, maintainable applications. Keywords: architecture, patterns, vertical slices, domain modeling, messaging, resilience, caching, design patterns
Configures artifacts output layout. UseArtifactsOutput, ArtifactsPath, impact on CI and Docker.
Containerizes .NET apps. Multi-stage Dockerfiles, SDK container publish (.NET 8+), rootless.
基于 SOC 职业分类
| name | dotnet-mermaid-diagrams |
| description | Creates Mermaid diagrams for .NET. Architecture, sequence, class, deployment, ER, flowcharts. |
Mermaid diagram reference for .NET projects: architecture diagrams (C4-style context, container, component views, layered architecture, microservice topology), sequence diagrams (API request flows, async/await patterns, middleware pipeline, authentication flows), class diagrams (domain models, DI registration graphs, inheritance hierarchies, interface implementations), deployment diagrams (container deployment, Kubernetes pod layout, CI/CD pipeline flow), ER diagrams (EF Core model relationships, database schema visualization), state diagrams (workflow states, order processing, saga patterns, state machine patterns), and flowcharts (decision trees, framework selection, architecture choices). Includes diagram-as-code conventions for naming, grouping, GitHub rendering, and dark mode considerations.
Version assumptions: Mermaid v10+ (supported by GitHub, Starlight, Docusaurus natively). GitHub renders Mermaid in Markdown files, issues, PRs, and discussions. .NET 8.0+ baseline for code examples.
For complete diagram examples, see examples.md in this skill directory.
Cross-references: [skill:dotnet-documentation-strategy] for Mermaid rendering setup across doc platforms, [skill:dotnet-github-docs] for embedding diagrams in GitHub-native docs, [skill:dotnet-gha-deploy] for doc site deployment.
OrderService, CustomerDBAPI["Order API<br/>(ASP.NET Core)"]subgraph DataTier["Data Tier"]mermaid language identifier in Markdown files, issues, PRs,
and discussions<br/> for line breaks within node labels (not \n)style directives, test in both GitHub light and dark modesclassDef styles over inline style for maintainabilityneutral theme (%%{init: {'theme': 'neutral'}}%%) provides the best cross-theme compatibility on GitHub| Diagram Type | Recommended Max Nodes | Notes |
|---|---|---|
| C4 Context | 10-12 | One system + external actors |
| C4 Container | 15-20 | Internal containers + data stores |
| C4 Component | 15-20 | Single service internals |
| Sequence | 8 participants | More becomes unreadable |
| Class | 10-15 classes | Split into multiple diagrams |
| ER | 10-12 entities | Split by bounded context |
| State | 12-15 states | Split complex workflows |
| Flowchart | 15-20 nodes | Keep decision trees focused |
Always use .NET-specific content in diagrams -- do not generate generic diagrams. Use real .NET types
(DbContext, IRepository, MediatR), real .NET tools (EF Core, MassTransit, YARP), and real .NET patterns (middleware
pipeline, DI registration).
Keep diagrams under 50 nodes -- larger diagrams render poorly on GitHub and doc sites. Split complex architectures into multiple focused diagrams (context, container, component) rather than one monolithic diagram.
Use <br/> for line breaks in node labels, not \n -- Mermaid renders \n literally as text. Multi-line labels
require <br/> HTML tags.
Test Mermaid syntax before committing -- syntax errors cause GitHub to render raw text instead of a diagram. Use the Mermaid Live Editor (https://mermaid.live) or a local preview tool to validate.
ER diagram relationship notation follows Mermaid syntax, not UML -- use ||--o{ for one-to-many, ||--|| for
one-to-one. Do not use UML multiplicity notation.
Use the neutral theme for GitHub compatibility -- %%{init: {'theme': 'neutral'}}%% provides the best
rendering in both light and dark modes.
Sequence diagram participant names cannot contain special characters -- use participant DB as "SQL Server"
alias syntax for names with spaces or special characters.
Nested generics (Task~List~T~~) may not render on all Mermaid versions -- the double ~~ at the end of nested
generic types requires Mermaid v10.3+. Test rendering in your target environment before committing complex generic
type diagrams.
Do not use Font Awesome icon syntax (fa:fa-user) in diagrams intended for GitHub -- GitHub's native Mermaid
renderer does not load Font Awesome CSS. Icons render as literal text. Use plain text labels instead.
Do not configure Mermaid rendering in doc platforms -- platform setup (Starlight remark plugin, Docusaurus theme, DocFX template) belongs to [skill:dotnet-documentation-strategy]. This skill provides the diagram content only.
Primary approach: Use Serena symbol operations for efficient code navigation:
serena_find_symbol instead of text searchserena_get_symbols_overview for file organizationserena_find_referencing_symbols for impact analysisserena_replace_symbol_body for clean modificationsWhen to use Serena vs traditional tools:
Example workflow:
# Instead of:
Read: src/Services/OrderService.cs
Grep: "public void ProcessOrder"
# Use:
serena_find_symbol: "OrderService/ProcessOrder"
serena_get_symbols_overview: "src/Services/OrderService.cs"