explain

Featured

Explains code/architecture with Mermaid diagrams and sequence flows. Triggers: what does X do, how does Y work, explain code, sequence diagram.

AI & Automation 161 stars 21 forks Updated yesterday Apache-2.0

Install

View on GitHub

Quality Score: 93/100

Stars 20%
74
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Explain $ARGUMENTS Generates visual architecture explanations. ## Output Format ### 1. High-Level Role "This module handles [Responsibility]. It interacts with [Dependencies]." ### 2. Dependency Graph (Mermaid) Generate a graph showing imports/exports. ```mermaid graph TD A[AuthService] -->|uses| B[UserRepo] A -->|validates| C[Schema] D[Controller] -->|calls| A ``` ### 3. Key Flows (Sequence) If logical flows are detected: ```mermaid sequenceDiagram User->>Controller: Login Controller->>Service: Validate Service->>DB: Check Creds DB-->>Service: Result Service-->>Controller: Token ``` ## Protocol 1. **Scan**: Read file contents to identify classes and functions. 2. **Link**: Identify imports to find collaborators. 3. **Visualize**: Generate standard Mermaid syntax. ## Automated Dependency Graph Run the bundled script to extract imports and generate a Mermaid diagram: ```bash python3 ${CLAUDE_SKILL_DIR}/scripts/dependency-graph.py src/auth.py ``` ## Rules - **MUST** start from what the user already knows — if it is unclear, ask one question before explaining - **MUST** ground the explanation in the actual code (file:line references), not in generic framework theory - **NEVER** use an analogy when a direct definition is clearer — analogies add a translation step for the reader - **NEVER** produce a diagram that the text does not already justify — diagrams illustrate, they do not replace the explanation - **CRITICAL**: when the code b...

Details

Author
softspark
Repository
softspark/ai-toolkit
Created
4 months ago
Last Updated
yesterday
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

mermaid-diagrams

Comprehensive guide for creating software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams (domain modeling, object-oriented design), sequence diagrams (application flows, API interactions, code execution), flowcharts (processes, algorithms, user journeys), entity relationship diagrams (database schemas), C4 architecture diagrams (system context, containers, components), state diagrams, git graphs, pie charts, gantt charts, or any other diagram type. Triggers include requests to "diagram", "visualize", "model", "map out", "show the flow", or when explaining system architecture, database design, code structure, or user/application flows.

0 Updated yesterday
dills122
AI & Automation Listed

mermaid-diagrams

Create diagrams and visualizations using Mermaid syntax. Use when generating flowcharts, sequence diagrams, class diagrams, entity-relationship diagrams, Gantt charts, or any visual documentation. Triggers on Mermaid, flowchart, sequence diagram, class diagram, ER diagram, Gantt chart, diagram, visualization.

2 Updated yesterday
Makiya1202
AI & Automation Listed

mermaid-sequence-diagrams

Generates, reviews, and fixes Mermaid-only sequence diagrams following syntax rules and best practices. Use when creating Mermaid sequence diagrams from system descriptions, reviewing existing Mermaid sequence diagrams for correctness, fixing parse errors, or refactoring large Mermaid sequence diagrams into focused sub-diagrams. Covers participants, arrows, activations, control flow, notes, styling, and common anti-patterns.

0 Updated 6 days ago
msewell