SKILL-PROJECT: Skill for OpenCode

.opencode/skills/xml-diagram/SKILL.md

xml-diagram is a skill for OpenCode from BeWaterMyFriend7/SKILL-PROJECT. It costs 105 tokens per session (1,263 once invoked), scanned A, original, Apache-2.0.

A generator for editable Draw.io diagrams, the XML-based files used by diagrams.net for architecture, process, relationship, and planning diagrams.

In plain words
What is it for?
Use it for architecture diagrams, flowcharts, state and sequence diagrams, entity-relationship diagrams, dependency maps, comparisons, timelines, and roadmaps.
Why use it?
It creates diagrams that can be reopened and changed in Draw.io while requiring the structure and layout to be planned before generating the file.

Skill for OpenCode

Written for OpenCode: installed under .opencode/.

This is BeWaterMyFriend7/SKILL-PROJECT's own configuration. It tells OpenCode how to work on SKILL-PROJECT itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything SKILL-PROJECT configures →

Reuse

Borrowing it

Nothing to install: this file belongs to BeWaterMyFriend7/SKILL-PROJECT. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/BeWaterMyFriend7/SKILL-PROJECT/main/.opencode/skills/xml-diagram/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/BeWaterMyFriend7/SKILL-PROJECT

Made for: OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for xml-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/bewatermyfriend7/skill-project/xml-diagram/github.svg)](https://agentmods.dev/skills/bewatermyfriend7/skill-project/xml-diagram)
Your own site
<a href="https://agentmods.dev/skills/bewatermyfriend7/skill-project/xml-diagram"><img src="https://agentmods.dev/badge/skills/bewatermyfriend7/skill-project/xml-diagram/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for xml-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/bewatermyfriend7/skill-project/xml-diagram"><img src="https://agentmods.dev/badge/skills/bewatermyfriend7/skill-project/xml-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,263 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.01263
Opus 5 $0.00053 $0.00632
Sonnet 5 $0.00021 $0.00253
Haiku 4.5 $0.00011 $0.00126

Measured 10d ago against content hash 982cf43a9f62, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

xml-diagram scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.opencode/skills/xml-diagram/SKILL.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Draw.io XML 图形生成器

生成可编辑、可复核的 Draw.io XML。禁止从用户自然语言直接跳到 XML;必须先完成需求分析和详细图形 DSL。

工作流程

1. 分析需求

明确用途、受众、核心结论、内容范围、图形类型、主要实体或步骤、阅读方向和浅色/深色主题。区分用户确认内容、合理推断和待确认事实。

完成条件:能够用一段自然语言说明“这张图向谁说明什么,按什么顺序阅读”。

2. 生成详细 DSL

读取 references/diagram-dsl.md。DSL 必须覆盖叙事、布局、区域、节点、关系、颜色语义、假设和质量预期,并明确模板名称、布局模式、间距和画布策略。

完成条件:只阅读 DSL 即可还原图形,XML 阶段不再猜测业务语义或布局意图。

3. 精确选择模板并生成 XML

按图形类型精确匹配一个模板:

图形类型 模板
业务、应用、技术、部署架构 templates/architecture.drawio
数据架构 templates/architecture-data.drawio
线性流程 templates/flow-linear.drawio
分支或异常流程 templates/flow-branching.drawio
状态图 templates/state.drawio
生命周期 templates/lifecycle.drawio
时序图 templates/sequence.drawio
ER 图 templates/relationship-er.drawio
依赖关系 templates/relationship-dependency.drawio
知识关系 templates/relationship-knowledge.drawio
对比 templates/comparison.drawio
决策矩阵 templates/decision-matrix.drawio
SWOT templates/swot.drawio
时间线或里程碑 templates/timeline.drawio
路线图 templates/roadmap.drawio
总结图 templates/summary.drawio

必须读取并复用模板骨架:保留标准画布、必要语义元素、正确的 mxGeometry 写法和基础布局,再替换内容、增删节点并动态调整坐标。禁止只参考配色后凭空重建一份相似 XML。

强制设置:

  • UTF-8 无 BOM;
  • mxGraphModel 显式设置 grid="0"
  • 每个 mxGeometry 包含 as="geometry"
  • 可见节点只使用 width/height,禁止 w/h
  • 可见节点宽高为正数;
  • ID 唯一,边引用存在节点;
  • 标题不用下划线或装饰横线;
  • 浅色和深色使用相同坐标、尺寸、圆角、间距和连线;
  • 架构一级标题置于对应容器外部上方,左侧对齐并保持 8~12px 紧密间距;
  • 架构二级卡片标题使用独立、居中的标题条,内容标签从标题条下方开始;
  • 架构同级卡片等宽、等高、等距,末行不足时整体居中,容器高度随实际内容行数调整;
  • 架构图默认减少箭头;
  • 数据架构先根据需求对候选层执行保留、合并、删除、拆分或新增,禁止输出空层;
  • 数据架构必须复用通用架构图的一级标题、一级容器、二级分组卡片、独立标题条和内容标签规范;示例层级只是候选内容,不得据此另造视觉骨架;
  • 数据治理、安全、运维等贯穿能力使用同款架构分组区域表达,不使用窄而高的彩色长柱;
  • 数据架构只保留一条主数据流或少量必要的实时/离线分支,详细表级或字段级血缘应拆为关系图;
  • 时序图包含起点、终点、所有参与者的完整生命线、请求链和返回链。

4. 执行自动检查

读取 references/quality-rules.md,运行:

python -X utf8 scripts/validate.py <file-or-directory> --strict

错误和严格模式警告必须修复。不得通过删除必要内容或缩小字体规避问题。

5. 渲染检查并交付

.drawio 渲染或在 diagrams.net 中打开,检查颜色、布局、重叠、字体、线条、图例和空白。发现问题时返回 DSL 或布局阶段修正。

Read the full file on GitHub · 88 lines

Files

What ships with it

40 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 88 lines · 105 tokens per session scan A 982cf43a9f62

Subscribe to this mod's changes

xml-diagram is a skill published in the GitHub repository BeWaterMyFriend7/SKILL-PROJECT (51 stars, last pushed 2d ago), licensed Apache-2.0. It adds 105 tokens to every session and 1,263 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ralph with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 50 tokens

accessibility

Consolidated accessibility skill entrypoint for WCAG 2.2, ARIA Authoring Practices, cognitive accessibility, Section 508, EN 301 549, design intent verification, and the Accessibility Planner workflow.

microsoft/hve-core · 47 tokens

make-resume

A Chinese-language tool for creating editable HTML resumes that can be changed in a browser and printed to PDF. It uses available resume templates when they are installed and otherwise provides a simpler fallback.

Hisn00w/ASu-skills · 86 tokens