generate-sequence-diagram
星标10
分支0
更新时间2026年2月3日 04:11
Generate sequence diagram for a feature
安装
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
SKILL.md
readonly菜单
Generate sequence diagram for a feature
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Explain how code, a feature, or system works
Generate a commit message for staged changes
Generate PR title and description
Generate database diagram for a feature
Get a general understanding of the codebase (stack, key files, structure, etc) and/or specific feature
Update the changelog based on commits in the current git branch
| name | generate-sequence-diagram |
| description | Generate sequence diagram for a feature |
| argument-hint | ["feature-name"] |
| disable-model-invocation | true |
| allowed-tools | Bash(npx *) |
Generate a simple Mermaid sequence diagram showing the flow of a feature: $ARGUMENTS
Search the codebase to understand how the feature works:
Follow these rules:
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
.claude/outputs/sequence-diagram-<feature-name>.svg (use kebab-case).claude/outputs/ directory with a .gitkeep if it doesn't existnpx @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
.claude/outputs/sequence-diagram-<feature-name>.svg