Communitygithub.com

majiayu000/claude-skill-registry

Organize and visualize code flows, generating clear ASCII flowcharts, data flow diagrams, and tabular analyses. Ideal for documenting existing code, designing new features, and writing technical documentation.

What is claude-skill-registry?

This skill provides a reusable set of templates and methods for organizing code flows and generating visual documentation. It is especially useful when a developer needs to explain how a feature works from end to end, covering data sources, intermediate layers, and final outputs. The skill supports multiple platforms (CLI, Flow, Data layers, databases, and external APIs) and uses ASCII diagrams, tables, and structured annotations to convey complex logic clearly. By offering templates for full multi-scenario flowcharts, layered call chain diagrams, database table descriptions, and data class evaluation tables, it helps developers quickly create readable, business-focused visualizations. The output includes a checklist to ensure completeness, and anti-patterns are highlighted to avoid common pitfalls like verbose text descriptions or meaningless tables. This skill integrates well with other skills for code style, architecture, and development workflow to produce consistent, high-quality documentation.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/majiayu000/claude-skill-registry/tree/HEAD/skills/analysis/code-flow-viz-mmorit00-fund-portfolio-bot-2

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Code Flow Visualization Standards

This Skill provides a set of reusable templates and methods for organizing code flows and generating visual documentation.

Core Principle: Use text and ASCII diagrams to clearly explain "where data comes from, which layers it passes through, and where it ends up."

When to Use

Use this Skill in the following scenarios:

  • The user asks "how does this feature work?"
  • Designing data flow for new features
  • Reviewing existing logic before refactoring
  • Writing technical documentation or architecture descriptions
  • Needing to visualize call chains during code review

Core Templates

1. Full Flowchart (Multi-Scenario Comparison)

Best for: Organizing multiple usage scenarios of a feature (e.g., manual vs. automatic, success vs. failure)

┌─────────────────────────────────────────────────────────────────────┐
│                    Feature Name (e.g., Limit Management Lifecycle)  │
└─────────────────────────────────────────────────────────────────────┘

═══════════════════════════════════════════════════════════════════════
Scenario 1: Scenario Name (e.g., Auto-query Limit Status)
═══════════════════════════════════════════════════════════════════════

  User Command
     │
     ▼
┌─────────────────────────────────────────────────────────────────┐
│  uv run python -m src.cli.xxx ...                               │
└────────────────┬────────────────────────────────────────────────┘
                 │
                 ▼
        ┌────────────────┐
        │  CLI Layer      │   Calls Flow Function
        │  _do_xxx()      │ ────────────────────┐
        └────────────────┘                      │
                                                ▼
                                   ┌──────────────────────────┐
                                   │  Flow Layer              │
                                   │  xxx_flow()               │
                                   └───────┬──────────────────┘
                                           │
                                           ▼
                              ┌─────────────────────────────┐
                              │  Data Layer                 │
                              │  XxxRepo / XxxClient         │
                              └────────┬─────────────────────┘
                                       │
                                       ▼
                          ┌────────────────────────────┐
                          │  External System / Database │
                          │  (SQLite / API / etc)      │
                          └──────────┬─────────────────┘
                                     │ Returns Data
                                     ▼
                    ┌──────────────────────────────────┐
                    │  Data Processing (Parse/Transform) │
                    └─────────────┬────────────────────┘
                                  │
                                  ▼
                        ┌──────────────────────┐
                        │  Return Data Class   │  ← Explain why kept/simplified
                        │  (Result / Item / ...)│
                        └──────────┬───────────┘
                                   │
                                   ▼
                        ┌──────────────────────┐
                        │  CLI Layer Formatting  │
                        └──────────────────────┘
                                   │
                                   ▼
    ╔══════════════════════════════════════════════════╗
    ║  Terminal Output Example                         ║
    ║  (Enclosed in borders to highlight user-facing   ║
    ║   result)                                         ║
    ╚══════════════════════════════════════════════════╝

═══════════════════════════════════════════════════════════════════════
Scenario 2: Another Scenario
═══════════════════════════════════════════════════════════════════════
(Repeat the above structure, highlighting differences)

2. Database Table Structure Description

Best for: Explaining database tables relevant to a feature

CREATE TABLE table_name (
    id INTEGER PRIMARY KEY AUTOINCREMENT,  -- ← Explain primary key role
    field1 TEXT NOT NULL,                  -- Explain field meaning
    field2 TEXT,                           -- Business meaning of NULL
    ...
);

-- Index (explain why this index is needed)
CREATE INDEX idx_xxx ON table_name(field1, field2);

Sample Data Table:

idfield1field2field3Description
42value1value2value3Explain the business meaning of this record
43............

Typical Query:

-- Scenario: When do we need to query like this?
SELECT * FROM table_name 
WHERE condition1 = ? 
  AND (condition2 IS NULL OR condition2 >= ?);

3. Layered Call Chain Diagram (Simplified)

Best for: Quickly explaining function call relationships

CLI Layer (_do_xxx)
    │
    └─> Flow Layer (xxx_flow)
            │
            ├─> Data/Repo (xxx_repo.get)
            │       │
            │       └─> SQLite (SELECT ...)
            │
            └─> Data/Client (xxx_client.fetch)
                    │
                    └─> External API (HTTP GET ...)

4. Data Class Design Analysis Table

Best for: Evaluating whether intermediate data classes are necessary

Class NameField CountPurposeVerdictReason
XxxResult6Multi-field aggregation + CLI display✅ KeepSatisfies the "minimum necessary principle"
XxxWrapper1Single field wrapper❌ RemoveOver-packaging, return raw type directly
XxxItem3List item detail✅ KeepHas business semantics

Comparison Example:

# ❌ Over-packaging
@dataclass
class XxxResult:
    field: SomeType  # Only one field

def xxx_flow() -> XxxResult:
    return XxxResult(field=value)

# ✅ Simplified
@dataclass
class XxxResult:
    field: SomeType

def xxx_flow() -> SomeType:  # Return directly
    return value

5. Business Key Points Annotation

Best for: Highlighting business rules and design decisions

┌─────────────────────────────────────────────────────────────┐
│                    Business Key Points                       │
├──────────────────────┬──────────────────────────────────────┤
│   Why design this    │         Specific Decision             │
│   way?               │                                      │
├──────────────────────┼──────────────────────────────────────┤
│ • Data Precision     │ Use Decimal for amounts, 2 decimal places |
│ • Idempotency        │ Unique constraint on (fund_code, date)   |
│ • Traceability       │ record_id as globally unique identifier  |
└──────────────────────┴──────────────────────────────────────┘

Usage

Step 1: Define the Analysis Goal

Answer the following questions:

  1. Which feature does the user want to understand?
  2. How many scenarios does this feature have? (success/failure, manual/auto, etc.)
  3. Which layers are involved? (CLI → Flow → Data → DB/API)
  4. Key data classes: What are they and why are they designed that way?

Step 2: Choose the Appropriate Template

  • Multi-scenario comparison → Template 1 (Full Flowchart)
  • Single flow → Template 3 (Layered Call Chain)
  • Database design → Template 2 (Table Structure + Sample Data)
  • Data class evaluation → Template 4 (Analysis Table)

Step 3: Fill in the Content

Principles:

  • Use ASCII diagrams instead of long text
  • Use arrows (│ ▼ ┐ ┘ └ ├ ─) to connect data flow
  • Use borders (┌ ┐ └ ┘ │ ─) to separate layers
  • Use double borders (╔ ╗ ╚ ╝ ║ ═) to highlight user-visible parts
  • Add comments at key nodes (← Explanation)

Symbol Usage Standards:

SymbolPurposeExample
│ ▼Vertical flowData top to bottom
→ ←Horizontal explanationrecord_id: int ← Database primary key
┌ ┐ └ ┘Single borderEnclosing code blocks, commands
╔ ╗ ╚ ╝Double borderHighlight terminal output, important results
═══Separator lineSeparating different scenarios

Step 4: Add Comparison Analysis

Before vs After (refactoring scenarios):

# Before (problematic version)
...code...

# Issues:
# - Over-packaging
# - Redundant fields
# - Increased cognitive load

# After (improved version)
...code...

# Improvements:
# - Return meaningful types directly
# - Reduce intermediate layers
# - Lower maintenance cost

Real-World Examples

Example 1: Limit Management Flow (Full Version)

(See Template 1 example above; expand 4 scenarios into a full flow)

Example 2: Data Class Evaluation (fund_restriction Module)

FunctionPrevious ReturnCurrent ReturnVerdictReason
add_restrictionAddRestrictionResult (6 fields)Keep✅CLI needs to display all fields
end_restrictionEndRestrictionResult (4 fields)bool❌Only need success/failure
check_trading_statusCheckStatusResult (2 fields)`ParsedRestrictionNone`❌

Output Checklist

When generating a flow visualization document, ensure it includes:

  • Top-level overview (feature goal, involved modules)
  • Scenario enumeration (success/failure, manual/auto, etc.)
  • Layered flow diagram (CLI → Flow → Data → External)
  • Database table structure (if applicable)
  • Sample data and queries (to aid understanding)
  • Key data class explanation (why kept/simplified)
  • Design rationale (why this approach?)
  • Future expansion points (TODO or reserved interfaces)

Anti-Patterns (What Not to Do)

❌ Pure textual description of flow

First, call the CLI layer's _do_xxx function, then _do_xxx calls the Flow layer's xxx_flow function,
xxx_flow then calls the Data layer's xxx_repo.get method...

✅ Use ASCII diagrams

CLI (_do_xxx) → Flow (xxx_flow) → Data (xxx_repo.get) → SQLite

❌ Table without focus

FieldType
idint
namestr

✅ Highlight business meaning

FieldTypeDescriptionBusiness Constraint
idintPrimary keyAuto-generated, globally unique
namestrFund nameNon-null, for display

❌ SQL without scenario explanation

SELECT * FROM table WHERE id = ?;

✅ Include business scenario

-- Scenario: User queries details of a specific restriction record
SELECT * FROM fund_restrictions WHERE id = ?;

-- Scenario: DCA analysis checks if a date is limited
SELECT * FROM fund_restrictions
WHERE fund_code = ? AND start_date <= ? AND (end_date IS NULL OR end_date >= ?);

Collaboration with Other Skills

  • code-style: Follow coding standards when outputting code examples
  • architecture: Flow diagrams must adhere to layered architecture constraints
  • dev-workflow: Read relevant code and documentation before organizing flows

Summary

The core value of this Skill is:

  1. Reusable templates: Reduce time starting from scratch
  2. Consistent visual style: ASCII diagrams + tables + borders
  3. Business perspective: Not just code flow, but focusing on "why"
  4. Comparison analysis: Before/after refactoring, multi-scenario comparison
  5. Checklist verification: Ensure no key information is missed

Usage frequency: Use whenever you need to explain "how a feature works."

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

majiayu000/claude-skill-registry

Builds, edit or validate Agent Skill through conversational discovery. Use when the user requests to "Create an Agent", "Optimize an Agent" or "Edit an Agent".

majiayu000/claude-skill-registry

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry

Analyzes current state and user query to answer BMad questions or recommend the next workflow or agent. Use when user says what should I do next, what do I do now, or asks a question about BMad

majiayu000/claude-skill-registry

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry

Portfolio allocation and rebalancing optimizer. Manages asset allocation across stocks/cash/bonds, performs periodic rebalancing, and ensures diversification according to market regime and risk tolerance.

majiayu000/claude-skill-registry

Create a hilarious and ultra-realistic video of an anthropomorphic animal acting like a human vlogger in a real-world setting.

majiayu000/claude-skill-registry

Speech-to-text transcription and translation via OpenAI Audio API -- models, response formats, timestamps, prompting, streaming, chunking, and diarization

majiayu000/claude-skill-registry

BlockRun works with Claude Code and Google Antigravity.

majiayu000/claude-skill-registry

This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.

majiayu000/claude-skill-registry

小省导购员数字人带货版即梦视频提示词生成系统,基于四大智能体协同(提示词生成师、质量管控师、知识库运维师、跨环节适配师),按照"主体+运动+场景+(镜头语言+光影+氛围)"公式输出中英文双版提示词,适配5s短视频。确保人物一致性、视觉连贯性、情绪连贯性,支持知识库智能复用和跨工具适配(Suno音乐、AI绘画),为数字人带货视频提供高质量提示词生成服务。

majiayu000/claude-skill-registry

Upload and manage files using Google Gemini File API via scripts/. Use for uploading images, audio, video, PDFs, and other files for use with Gemini models. Supports file upload, status checking, and file management. Triggers on "upload file", "file API", "upload image", "upload PDF", "upload video", "file management".

majiayu000/claude-skill-registry

CRITICAL: Use for MolyKit AI chat toolkit. Triggers on: BotClient, OpenAI, SSE streaming, AI chat, molykit, PlatformSend, spawn(), ThreadToken, cross-platform async, Chat widget, Messages, PromptInput, Avatar, LLM

majiayu000/claude-skill-registry

AI and machine learning workflow covering LLM application development, RAG implementation, agent architecture, ML pipelines, and AI-powered features.

majiayu000/claude-skill-registry

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

Related Skills