generate-db-diagram
스타10
포크0
업데이트2026년 2월 3일 04:11
Generate database diagram for a feature
설치
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SKILL.md
readonly메뉴
Generate database diagram for a feature
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Explain how code, a feature, or system works
Generate a commit message for staged changes
Generate PR title and description
Generate sequence 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-db-diagram |
| description | Generate database diagram for a feature |
| argument-hint | ["feature-name"] |
| disable-model-invocation | true |
| allowed-tools | Bash(npx *) |
Generate a Mermaid class diagram representing the database schema related to: $ARGUMENTS
Search the codebase for models, entities, or schema definitions related to the specified feature.
Follow these rules:
FK to ModelName (foreign key / belongs to)O2O to ModelName (one-to-one)M2M to ModelName (many-to-many)Model1 "1" --> "many" Model2 : relationship_nameModel1 "1" --> "1" Model2 : relationship_nameModel1 "many" --> "many" Model2 : relationship_nameclassDiagram
class Project {
name
description
status
owner FK to User
}
class Task {
title
completed
project FK to Project
assignee FK to User
}
class User {
email
name
}
Task "many" --> "1" Project : project
Task "many" --> "1" User : assignee
Project "many" --> "1" User : owner
.claude/outputs/db-diagram-<feature-name>.png (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/db-diagram-<feature-name>.png
classDiagram
class Project {
name
description
status
owner FK to User
}
class Task {
title
completed
project FK to Project
assignee FK to User
}
class User {
email
name
}
Task "many" --> "1" Project : project
Task "many" --> "1" User : assignee
Project "many" --> "1" User : owner
EOF
.claude/outputs/db-diagram-<feature-name>.png