explain

Explain code, files, directories, or architecture with Mermaid diagrams.

15|5|Updated Jul 1, 2025
One-click install
npx skills add https://github.com/swissarmyhammer/swissarmyhammer --skill explain-swissarmyhammer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: explain
Source: https://github.com/swissarmyhammer/swissarmyhammer/tree/main/.skills/0xdarkmatter/claude-mods/explain
Command: npx skills add https://github.com/swissarmyhammer/swissarmyhammer --skill explain-swissarmyhammer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides in-depth explanations of complex code, files, or architectural concepts, making it easier to understand and navigate large codebases.

Core Features & Use Cases

  • Comprehensive Analysis: Understand code structure, data flow, dependencies, and architectural design.
  • Automated Diagramming: Generates Mermaid diagrams (flowchart, sequence, class) to visualize complex relationships.
  • Expert Routing: Intelligently routes requests to specialized AI agents based on code type (e.g., TypeScript, Python, React).
  • Use Case: When encountering an unfamiliar module, use /explain to get a detailed breakdown of its purpose, how it interacts with other parts of the system, and visualize its architecture.

Quick Start

Use the explain skill to get a deep dive into the 'src/core/engine.ts' file with a focus on architecture.

Frequently Asked Questions about explain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate architecture diagrams from source code?

To generate architecture diagrams from source code, this Skill analyzes your files using structural search and renders Mermaid diagrams. It outputs structured markdown containing flowcharts, sequence diagrams, and class diagrams to visualize complex code relationships.

What is the best way to analyze code data flow and dependencies?

Analyzing code data flow and dependencies is handled by routing requests to specialized AI agents that apply structural search tools like ast-grep. This approach identifies interaction patterns across modules and outputs detailed markdown breakdowns of system architecture.

Can I explain unfamiliar TypeScript or Python modules automatically?

You can explain unfamiliar TypeScript or Python modules by leveraging expert routing to specialized AI agents. The Skill automatically detects code type and applies targeted analysis to breakdown module purposes, interactions, and overall architectural design.

Does the code analysis support structural search with ast-grep and ripgrep?

The code analysis explicitly supports structural search using ast-grep, tokei, and rg. These tools scan directories and files to extract structural patterns, providing the foundational data required for generating deep explanations and architectural visualizations.

How do I visualize complex codebase architecture for a specific focus area?

Visualizing complex codebase architecture is achieved by specifying focus areas like API design or performance during analysis. The Skill processes the target files and generates structured markdown with embedded Mermaid diagrams tailored to your selected architectural focus.