用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/sammcj/agentic-coding --skill diagrams-as-code命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Summarises the delta between a tool's latest release and the last summary the user saw. Use when the user asks about what's new, the latest release, release notes, or the changelog of one of the supported tools: Claude Code, OpenCode, llama-swap, or llama.cpp.
You **MUST** load this skill before the skill-creator skill AND before making ANY change to, or conducting a review of ANY Agent Skill. Triggers include creating, editing, reviewing, or contributing to any part of an Agent Skill (description, frontmatter, body, references, scripts, trigger evals, conflicts, etc).
Use when creating, editing or debugging Ghostty terminal configuration - config.ghostty files, config option names and their valid values, keybinds and key sequences, themes, fonts, shell integration, or `ghostty +` CLI actions. Covers macOS and Linux/GTK differences.
正在显示 SKILL.md
基于 SOC 职业分类
| name | diagrams-as-code |
| description | Use only when creating architecture diagrams with Python's `diagrams` library (mingrammer/diagrams). |
| allowed-tools | Bash(python3 *) Bash(uv *) Bash(pip install *) Bash(command -v *) Bash(brew install *) Read Write Edit Glob Grep |
Generate architecture and infrastructure diagrams using the Python diagrams library. Diagrams are Python scripts that render to image files via Graphviz.
.py file in the user's working directorypython3 <file>.pycommand -v dot >/dev/null || brew install graphviz
uv pip install --system diagrams 2>/dev/null || pip install diagrams
Without graphviz, the script fails with a cryptic error. Always verify first.
from diagrams import Diagram
with Diagram(
name="Title", # used as default filename (slugified)
filename="output", # override filename (no extension)
direction="LR", # LR | RL | TB | BT
curvestyle="spline", # spline | ortho | curved | polyline
outformat="png", # png | jpg | svg | pdf | dot (or list)
show=False, # ALWAYS False - prevents auto-opening
strict=False, # merge duplicate edges
autolabel=False, # prefix labels with provider/type
graph_attr={}, # graphviz graph attributes
node_attr={}, # graphviz node attributes
edge_attr={}, # graphviz edge attributes
):
...
Always set show=False so the script runs non-interactively.
Import from diagrams.<provider>.<category>:
from diagrams.aws.compute import EC2, Lambda, ECS
from diagrams.aws.database import RDS, Aurora
from diagrams.aws.network import ELB, Route53, CloudFront
from diagrams.k8s.compute import Pod, Deployment
from diagrams.onprem.database import PostgreSQL, MySQL
from diagrams.onprem.network import Nginx
See references/providers.md for the full provider and category listing with common node names.
ELB("lb") >> EC2("web") >> RDS("db") # left to right
RDS("db") << EC2("web") # right to left
RDS("primary") - RDS("replica") # undirected
ELB("lb") >> [EC2("w1"), EC2("w2")] # fan-out to list
Operator precedence matters: - (subtraction) binds more tightly than >> / << (bitshift) in Python, so A >> B - C parses as A >> (B - C). Wrap in parentheses when mixing: (A >> B) - C.
from diagrams import Cluster
with Cluster("VPC"):
with Cluster("Private Subnet"):
svc = [ECS("svc1"), ECS("svc2")]
Unlimited nesting depth. Clusters accept graph_attr for styling (e.g. background colour).
from diagrams import Edge
node_a >> Edge(label="HTTPS", color="darkgreen", style="dashed") >> node_b
Attributes: label (text on the edge), color (X11 name or hex), style (solid | dashed | dotted | bold).
from diagrams.custom import Custom
svc = Custom("My Service", "./icon.png") # local PNG, ideally 256x256
TB for layered/hierarchical diagrams, LR for pipelines and flowsgraph_attr={"bgcolor": "transparent"}outformat=["png", "svg"]Node from diagrams and create blank junctions with Node("", shape="plaintext", width="0", height="0"), or merge overlapping edges with graph_attr={"concentrate": "true", "splines": "spline"}uv run handles the dependency automatically:
# /// script
# dependencies = ["diagrams"]
# ///