Agent skill

Class Diagram

by athola in athola/claude-night-market

Generates a Mermaid class diagram showing types, inheritance, and composition.

MITAuto-check passedDevelopment

Install Class Diagram

skills CLI
$ npx skills add athola/claude-night-market --skill class-diagram -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install athola/claude-night-market class-diagram --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/athola/claude-night-market.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/cartograph/skills/class-diagram .claude/skills/class-diagram && rm -rf skills-src

Use ~/.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/

Facts

Skill name
class-diagram
GitHub stars
341
Token cost
~854 tokens
SKILL.md length
266 words
Files
1
Skills in repo
154
Repo updated
First seen
Licence
MIT

At a glance

Generates a Mermaid class diagram showing types, inheritance, and composition.

  • Works in 4 steps: Explore the Codebase → Generate Mermaid Syntax → Render via MCP → …
  • Visualizing class hierarchies
  • SKILL.md covers When To Use, When NOT To Use, Workflow and Exit Criteria
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Class Diagram is an agent skill from athola/claude-night-market. Generates a Mermaid class diagram showing types, inheritance, and composition. Use when visualizing class hierarchies or documenting a module public API.

Its SKILL.md is about 850 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Diagrams. It works with Mermaid and Model Context Protocol. The repository describes itself as: 23 Claude Code plugins: TDD enforcement hooks, git/PR workflows, spec-driven development, code review, project lifecycle, fix-from-error, maintenance automation, context… The licence is MIT.

When your agent uses it

  • Visualizing class hierarchies
  • Documenting a module public API

Example prompts

  • “Use the class-diagram skill to generate a Mermaid class diagram showing types, inheritance, and composition”
  • “/class-diagram”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Explore the Codebase
  2. Generate Mermaid Syntax
  3. Render via MCP
  4. Present Results

What it can do on your machine

Read from SKILL.md and the folder at commit 9f3eb00. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are mermaid).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Class Diagram loads about 854 tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 266 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~854

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from athola/claude-night-market at commit 9f3eb00, republished under its MIT licence (© athola). 266 words, ~854 tokens.

Download SKILL.mdSave it as .claude/skills/class-diagram/SKILL.md (or your agent's skills folder).
name
class-diagram
description
Generates a Mermaid class diagram showing types, inheritance, and composition. Use when visualizing class hierarchies or documenting a module public API.

Class Diagram

Generate a Mermaid class diagram showing types, their relationships, and public interfaces from a codebase.

When To Use

  • Understanding class hierarchies and inheritance
  • Documenting public APIs of a module
  • Analyzing composition vs. inheritance patterns
  • Answering "what types exist and how do they relate?"

When NOT To Use

  • Module-level imports (use cartograph:dependency-graph)
  • Runtime data movement (use cartograph:data-flow)

Workflow

Step 1: Explore the Codebase

Dispatch the codebase explorer agent:

Agent(cartograph:codebase-explorer)
Prompt: Explore [scope] and return a structural model.
Focus on classes, dataclasses, protocols, type aliases,
inheritance, and composition for a class diagram.
Extract: class names, methods (public only), attributes,
parent classes, and composed types.
Step 2: Generate Mermaid Syntax

Transform the structural model into a Mermaid class diagram.

Rules for class diagrams:

  • Use classDiagram diagram type
  • Show only public methods and key attributes
  • Use Mermaid relationship notation:
    • <|-- for inheritance
    • *-- for composition
    • o-- for aggregation
    • ..> for dependency/usage
  • Add stereotypes for special types:
    • <<protocol>> for Python protocols/interfaces
    • <<dataclass>> for dataclasses
    • <<enum>> for enums
    • <<abstract>> for abstract classes
  • Limit to 12-15 classes maximum
  • Group related classes with namespace
  • Omit private methods and dunder methods
  • Show return types for methods

Example output:

mermaid
classDiagram
    class ResumeSession {
        +Path config_path
        +dict data
        +load() ResumeSession
        +to_pdf(Path) Path
        +to_html(Path) Path
    }

    class ResumeError {
        <<abstract>>
        +str message
        +str context
    }

    class ValidationError {
        +list~str~ fields
    }

    class RenderError {
        +str template
    }

    ResumeError <|-- ValidationError
    ResumeError <|-- RenderError
    ResumeSession ..> ResumeError
Step 3: Render via MCP

Call the Mermaid Chart MCP to render:

mcp__claude_ai_Mermaid_Chart__validate_and_render_mermaid_diagram
  prompt: "Class diagram of [scope]"
  mermaidCode: [generated syntax]
  diagramType: "classDiagram"
  clientName: "claude-code"

If rendering fails, fix syntax and retry (max 2 retries).

Step 4: Present Results

Show the rendered diagram with analysis notes:

  • Total classes and relationship count
  • Key inheritance hierarchies identified
  • Composition patterns noted

Exit Criteria

  • Mermaid classDiagram syntax generated with at least one class definition including public methods or attributes
  • mcp__claude_ai_Mermaid_Chart__validate_and_render_mermaid_diagram called with diagramType: "classDiagram" and returns without error
  • Analysis notes include total class count, identified inheritance hierarchies, and composition patterns
  • Private methods and dunder methods (__init__, __repr__, etc.) are absent from the generated diagram
  • Diagram contains at most 15 classes; if more exist in scope, aggregation is applied and noted

© athola, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/cartograph/skills/class-diagram of athola/claude-night-market.

Open the folder on GitHubat commit 9f3eb00

Compare with similar skills

Class Diagram 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.

Class Diagram compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Class Diagram this skillathola/claude-night-market341—~854Automated safety check: PassMIT
Excalidraw Skillyctimlin/mcp_excalidraw2.5k—~4.6kAutomated safety check: PassMIT
GitDiagram Repository Overviewahmedkhaleel2004/gitdiagram18k—~427Automated safety check: PassMIT
Drawiobahayonghang/drawio-skills287—~4.1kAutomated safety check: NotesMIT
Mermaid Diagramsveelenga/claude-mermaid215—~1.3kAutomated safety check: PassMIT
Excalidraw Canvas Toolkitlingzhi227/agent-research-skills386—~3.8kAutomated safety check: PassNone

Similar skills

  • Excalidraw Skill

    yctimlin/mcp_excalidraw

    Excalidraw canvas toolkit for creating, editing, and refining diagrams on a live canvas.

    2.5k GitHub stars~4.6k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • GitDiagram Repository Overview

    ahmedkhaleel2004/gitdiagram

    Explains the architecture of a public GitHub repository through GitDiagram: how the code is organized, the main components with paths, and a Mermaid diagram.

    18k GitHub stars~427 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Drawio

    bahayonghang/drawio-skills

    Create, edit, replicate, import, and export draw.io diagrams with an offline YAML-first workflow: architecture, network topologies, flowcharts, UML/ER, org charts, Mermaid/CSV conversion, existing…

    287 GitHub stars~4.1k tokensUpdated 1 mo ago
    DevelopmentAuto-check: notes
  • Mermaid Diagrams

    veelenga/claude-mermaid

    Creating and refining Mermaid diagrams with live reload. An agent skill from veelenga/claude-mermaid.

    215 GitHub stars~1.3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Excalidraw Canvas Toolkit

    lingzhi227/agent-research-skills

    Draws and refines Excalidraw diagrams on a live canvas through MCP tools or a REST API, with screenshots, file import and export, snapshots and Mermaid conversion.

    386 GitHub stars~3.8k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Excalidraw Diagram Design

    BV-Venky/excalidraw-architect-mcp

    Guide for structuring graph input (nodes and edges) for the Excalidraw Architect MCP tool to produce clean, readable diagrams.

    158 GitHub stars~1.6k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed

More from athola/claude-night-market

All 154 skills in this repo
  • Night Market Diagnostics Toolkit

    athola/claude-night-market

    Run and interpret repo diagnostic scripts (ratchets, validators, token stats).

    341 GitHub stars~3.4k tokensUpdated 3 days ago
    Auto-check passed
  • Skills Eval

    athola/claude-night-market

    Evaluate Claude skill quality through auditing. An agent skill from athola/claude-night-market.

    341 GitHub stars~1.6k tokensUpdated 3 days ago
    Auto-check passed
  • Agent Teams

    athola/claude-night-market

    Coordinates Claude agent teams via filesystem protocol. An agent skill from athola/claude-night-market.

    341 GitHub stars~2.5k tokensUpdated 3 days ago
    Auto-check passed
  • Delegation Core

    athola/claude-night-market

    Delegates execution to eight CLIs (Gemini, Qwen, MiniMax, GLM, Muse, Codex, OpenCode, Glimmer).

    341 GitHub stars~2.5k tokensUpdated 3 days ago
    Auto-check passed
  • Elegant Code

    athola/claude-night-market

    Guide minimal code via a decision ladder with full safety, edge, and negative-case coverage.

    341 GitHub stars~2.1k tokensUpdated 3 days ago
    Auto-check passed
  • Skill Library Mission

    athola/claude-night-market

    Build a project skill library in .claude/skills/ via discovery, parallel authoring, and review.

    341 GitHub stars~1.6k tokensUpdated 3 days ago
    Auto-check passed

Categories

Questions about Class Diagram

What does Class Diagram do?

Generates a Mermaid class diagram showing types, inheritance, and composition. Class Diagram is an agent skill from athola/claude-night-market. Generates a Mermaid class diagram showing types, inheritance, and composition.

When should I use Class Diagram?

Class Diagram fits situations like: visualizing class hierarchies; documenting a module public API.

How do I install Class Diagram in Claude Code?

Run `npx skills add athola/claude-night-market --skill class-diagram -a claude-code`. Or copy the skill folder (plugins/cartograph/skills/class-diagram in athola/claude-night-market) into .claude/skills/class-diagram in your project. Claude Code loads it when a task matches its description.

How do I install Class Diagram in Codex?

Run `npx skills add athola/claude-night-market --skill class-diagram -a codex`. Or copy the skill folder (plugins/cartograph/skills/class-diagram in athola/claude-night-market) into .agents/skills/class-diagram in your project. Codex loads it when a task matches its description.

Can I use Class Diagram in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add athola/claude-night-market --skill class-diagram -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/class-diagram, .gemini/skills/class-diagram, .github/skills/class-diagram and .opencode/skills/class-diagram in your project.

What does Class Diagram need to run?

SKILL.md names no scripts, command-line tools or credentials: Class Diagram is instructions for the agent only. Our summary lists: Python 3.

Does Class Diagram access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Class Diagram safe to install?

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.

What licence does Class Diagram use?

Class Diagram is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Class Diagram use?

About 854 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Class Diagram?

Skills that share tags, products or a category with Class Diagram: Excalidraw Skill (yctimlin/mcp_excalidraw, 2.5k stars), GitDiagram Repository Overview (ahmedkhaleel2004/gitdiagram, 18k stars), Drawio (bahayonghang/drawio-skills, 287 stars) and Mermaid Diagrams (veelenga/claude-mermaid, 215 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Class Diagram?

athola (a GitHub user) maintains it in athola/claude-night-market, which has 341 GitHub stars. The repository holds 154 skills in this directory. The repository was last updated on October 6, 2026.

Source: athola/claude-night-market on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.