Agent skill

flowchart

This skill should be used when the user asks to "create a flowchart", "update a flowchart", "draw a flowchart", "visualize a workflow", "diagram a process or algorithm", or needs to represent decision trees, state transitions, or workflows using Mermaid.

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/hhk7734/hhk7734/tree/main/skills/flowchart

SKILL.md

Update Flowchart

When to use this skill

Use this skill when creating a new Mermaid flowchart or updating an existing one. This covers syntax for nodes, shapes, links, subgraphs, and styling.

Instructions

  1. Start with flowchart: Every flowchart must start with this keyword followed by the direction.
    • flowchart TD (Top-Down)
    • flowchart LR (Left-Right)
    • flowchart BT (Bottom-Top)
    • flowchart RL (Right-Left)
  2. Define Nodes:
    • Metadata Syntax: id@{ shape: <shape-name>, label: "label text" }
    • Common Shapes:
      • rect: Rectangle (default)
      • rounded: Rounded Rectangle
      • stadium: Stadium
      • subroutine: Subroutine
      • cyl: Cylinder (Database)
      • circ: Circle
      • dbl-circ: Double Circle
      • diam: Diamond (Decision)
      • hex: Hexagon
      • lean-r / lean-l: Parallelogram (Lean Right/Left)
      • trap-b / trap-t: Trapezoid (Base Bottom/Top)
      • odd: Odd Shape
      • event: Event
      • proc: Process
      • doc: Document
      • manual-input: Manual Input
      • manual-file: Manual File
      • card: Card
      • stored-data: Stored Data
    • Note: Legacy syntax (e.g., id[text]) is still supported but metadata syntax is preferred for newer features.
  3. Define Links:
    • Solid: A --> B
    • Dotted: A -.-> B
    • Thick: A ==> B
    • Open: A --- B
    • With text:
      • A -->|text| B
      • A -- text --> B
      • A -. text .-> B
      • A == text ==> B
  4. Special Characters:
    • Use quotes for text with special characters: id["Text with (special) chars"]
    • For multi-line labels, use <br/> instead of \n: id["Line 1<br/>Line 2"]
  5. Subgraphs:
    mermaid
    subgraph Title
        direction TB
        A --> B
    end
    
  6. Styling:
    • style id fill:#f9f,stroke:#333,stroke-width:4px
    • classDef className fill:#f9f,stroke:#333
    • class id className

Example

mermaid
flowchart LR
    A@{ shape: rect, label: "Start" } --> B@{ shape: diam, label: "Is it working?" }
    B -- Yes --> C@{ shape: rect, label: "Great!" }
    B -- No --> D@{ shape: rect, label: "Debug" }
    D --> B

    subgraph SubSystem
        direction TB
        E@{ shape: cyl, label: "Database" } <--> F@{ shape: rounded, label: "API" }
    end

    C --> F

Expand your agent's capabilities with these related and highly-rated skills.

hhk7734/hhk7734

sequence-diagram

This skill should be used when the user asks to "create a sequence diagram", "update a sequence diagram", "draw a sequence diagram", "visualize component interactions", or needs to represent time-ordered interactions between actors or system components using Mermaid.

0 0
Explore
hhk7734/hhk7734

using-git-worktrees

This skill should be used when the user asks to "create a worktree", "set up an isolated workspace", "use git worktrees", or is starting feature work that needs isolation from the current workspace. Also use this before executing any implementation plan that requires a clean branch baseline.

0 0
Explore
mattpocock/skills

obsidian-vault

Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.

111,310 9,758
Explore
mattpocock/skills

setup-pre-commit

Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.

111,310 9,758
Explore
mattpocock/skills

scaffold-exercises

Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.

111,310 9,758
Explore
mattpocock/skills

edit-article

Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

111,310 9,758
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results