generate-sequence-diagram

generate-sequence-diagram is a skill for Claude Code, Codex from Flexonze/claude-init. It costs 12 tokens per session (719 once invoked), scanned A, original, MIT.

A command that creates a simple Mermaid sequence diagram showing how a feature moves through a codebase. Mermaid is a text format for diagrams, and a sequence diagram shows messages exchanged between people, services, and functions over time.

In plain words
What is it for?
Use it to document a feature's normal execution path, including its entry point, important function calls, and external services.
Why use it?
It turns code-flow investigation into a visual explanation of the main steps and interactions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/flexonze/claude-init/generate-sequence-diagram
Any agent
npx skills add Flexonze/claude-init --skill generate-sequence-diagram
Clone the repo
git clone --depth 1 https://github.com/Flexonze/claude-init

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generate-sequence-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/flexonze/claude-init/generate-sequence-diagram.svg)](https://agentmods.dev/skills/flexonze/claude-init/generate-sequence-diagram)
Your own site
<a href="https://agentmods.dev/skills/flexonze/claude-init/generate-sequence-diagram"><img src="https://agentmods.dev/badge/skills/flexonze/claude-init/generate-sequence-diagram.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 719 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00012 $0.00719
Opus 5 $0.00006 $0.00360
Sonnet 5 $0.00002 $0.00144
Haiku 4.5 $0.00001 $0.00072

Measured 5d ago against content hash 30b1b56cb955, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

generate-sequence-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/generate-sequence-diagram/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate Sequence Diagram

Generate a simple Mermaid sequence diagram showing the flow of a feature: $ARGUMENTS

Instructions

1. Identify the Feature Flow

Search the codebase to understand how the feature works:

  • Find the entry point (API view, signal, management command, etc.)
  • Identify the key functions/methods called
  • Understand the order of operations
  • Note important interactions between components
Guidelines
  • Focus on the main happy path flow
  • Keep it simple - only show essential steps
  • Include key function calls and their purpose
  • Skip trivial operations (logging, validation unless critical)

2. Generate Mermaid Sequence Diagram

Follow these rules:

  • Use Mermaid sequence diagram syntax
  • Keep it SIMPLE - max 10-15 key steps
  • Show participants (actors, models, functions, external services)
  • Use clear, descriptive step descriptions
  • Group related operations in loops or alt blocks when helpful
  • Add notes to separate major phases
Example Output
sequenceDiagram
    autonumber

    Note over User,Storage: CREATING RESOURCE

    participant User
    participant API
    participant create_resource
    participant Storage

    User->>API: POST /resources/ with data
    API->>create_resource: create_resource(data)
    create_resource->>Storage: Save to database
    create_resource-->>API: Return resource
    API-->>User: Return 201 Created

    Note over User,Storage: PROCESSING RESOURCE

    participant process_task

    API->>process_task: process_resource.delay(resource_id)

    loop Each item
        process_task->>process_task: Process item
    end

    process_task->>Storage: Update status

3. Generate the Diagram Image

  • Create an SVG image: .claude/outputs/sequence-diagram-<feature-name>.svg (use kebab-case)
  • Create the .claude/outputs/ directory with a .gitkeep if it doesn't exist
  • Use SVG format for better scalability and readability
Steps
  1. Pipe the Mermaid sequence diagram code directly to npx @mermaid-js/mermaid-cli using stdin:
    mkdir -p .claude/outputs && touch .claude/outputs/.gitkeep && cat << 'EOF' | npx -y @mermaid-js/mermaid-cli -i - -o .claude/outputs/sequence-diagram-<feature-name>.svg
    sequenceDiagram
        autonumber
    
        participant User
        participant API
        participant create_resource
    
        User->>API: POST /resources/
        API->>create_resource: create_resource(data)
        create_resource-->>API: resource
        API-->>User: 201 Created
    EOF
    
  2. Inform the user that the diagram has been created at .claude/outputs/sequence-diagram-<feature-name>.svg

Read the full file on GitHub · 99 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 99 lines · 12 tokens per session scan A 30b1b56cb955

Subscribe to this mod's changes

generate-sequence-diagram is a skill published in the GitHub repository Flexonze/claude-init (10 stars, last pushed 5mo ago), licensed MIT. It adds 12 tokens to every session and 719 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

xiaohongshu-search-full

Search Xiaohongshu (XHS / RedNote) notes by keyword with full field extraction including body text, topics/tags, image list URLs, video stream URL, publish timestamp, and all engagement stats (likes, collects, comments, shares). Supports all page filter options: sort order (general, latest, most liked, most commented…

browser-act/skills · 254 tokens

x-tweet-by-conversation

Collects every tweet in an X (Twitter) conversation thread given a conversation id (root tweet id) — the focal tweet plus all replies, sub-replies, and quote chains — and returns normalized per-tweet data with text, author, engagement counts, media, hashtags, mentions, inreplyto mapping, and cursor for pagination. Use…

browser-act/skills · 218 tokens

amazon-reviews-api-skill

This skill helps users automatically extract Amazon product reviews via the Amazon Reviews API. Agent should proactively apply this skill when users express needs like getting reviews for Amazon product with ASIN B07TS6R1SF, analyzing customer feedback for a specific Amazon item, getting ratings and comments for a…

browser-act/skills · 124 tokens

amazon-competitor-analyzer

Scrapes Amazon product data from ASINs using browseract.com automation API and performs surgical competitive analysis. Compares specifications, pricing, review quality, and visual strategies to identify competitor moats and vulnerabilities.

browser-act/skills · 48 tokens

muapi-media-editing

Edit and enhance images and videos with AI via muapi.ai — prompt-based editing, upscaling, background removal, face swap, lipsync, video effects, and more.

SamurAIGPT/Generative-Media-Skills · 41 tokens

ctf-malware

Provides malware analysis and network traffic techniques for CTF challenges. Use when analyzing obfuscated scripts, malicious packages, custom crypto protocols, C2 traffic, PE/.NET binaries, RC4/AES encrypted communications, YARA rules, shellcode analysis, memory forensics for malware (Volatility malfind, process…

ljagiello/ctf-skills · 101 tokens