Agent Skillsopensquilla/opensquilla › meta-diagram-triangulation

meta-diagram-triangulation

GitHub

扫描代码库并分类最佳图表类型,并行生成PlantUML源码与draw.io XML,最终合成架构文档。适用于RFC或入职文档,兼顾文本审查与可编辑视图需求。

src/opensquilla/skills/exp/meta-diagram-triangulation/SKILL.md opensquilla/opensquilla

Trigger Scenarios

用户提到'diagram triangulation' 用户在消息中提供目标路径或模块引用并请求生成架构图

Install

npx skills add opensquilla/opensquilla --skill meta-diagram-triangulation -g -y
More Options

Non-standard path

npx skills add https://github.com/opensquilla/opensquilla/tree/main/src/opensquilla/skills/exp/meta-diagram-triangulation -g -y

Use without installing

npx skills use opensquilla/opensquilla@meta-diagram-triangulation

指定 Agent (Claude Code)

npx skills add opensquilla/opensquilla --skill meta-diagram-triangulation -a claude-code -g -y

安装 repo 全部 skill

npx skills add opensquilla/opensquilla --all -g -y

预览 repo 内 skill

npx skills add opensquilla/opensquilla --list

SKILL.md

Frontmatter
{
    "kind": "meta",
    "name": "meta-diagram-triangulation",
    "always": false,
    "triggers": [
        "diagram triangulation",
        "triangulate diagrams",
        "架构三视图",
        "出双视图架构图"
    ],
    "provenance": {
        "origin": "opensquilla-original",
        "license": "Apache-2.0"
    },
    "composition": {
        "steps": [
            {
                "id": "scan_repo",
                "kind": "agent",
                "with": {
                    "task": "Scan the target path identified in the user's invocation for\narchitectural structure. Extract:\n  * Top-level modules \/ packages under the target path\n  * Inter-module import dependencies (who imports who)\n  * Hotspot files (most-changed in the last 90 days)\n  * Public surface: classes, functions, protocols exported via __init__.py\n\nUser invocation (target path is somewhere in this string):\n{{ inputs.user_message | xml_escape | truncate(400) }}\n\nReply with a structured summary, max 1500 chars:\n  ## Target path\n  <resolved absolute path>\n\n  ## Modules (top-level)\n  - <module\/>: <one-line description>\n\n  ## Dependencies\n  <module> → <module>\n  ...\n\n  ## Hotspots\n  - <file>: <commit count last 90d>\n\n  ## Public surface\n  - <ClassName>: <one-line role>\n"
                },
                "skill": "history-explorer"
            },
            {
                "id": "classify_kind",
                "kind": "llm_classify",
                "with": {
                    "task": "Based on this codebase scan, which diagram kind is most informative\nfor an architecture doc? Pick ONE of:\n  - class: data structures \/ OO hierarchy dominant\n  - sequence: cross-module call flows dominant\n  - component: module-level boxes + arrows dominant\n  - deploy: infra \/ process layout dominant\n  - flow: data pipeline \/ staged processing dominant\n\nScan output:\n{{ outputs.scan_repo | truncate(1500) }}\n"
                },
                "depends_on": [
                    "scan_repo"
                ],
                "output_choices": [
                    "class",
                    "sequence",
                    "component",
                    "deploy",
                    "flow"
                ]
            },
            {
                "id": "render_plantuml",
                "kind": "agent",
                "with": {
                    "task": "Generate a PlantUML diagram source of kind `{{ outputs.classify_kind }}`\nfrom this codebase scan. Use idiomatic PlantUML syntax bracketed by\n`@startuml` ... `@enduml`. Aim for 10-20 boxes\/arrows; do not over-render.\n\nScan output:\n---\n{{ outputs.scan_repo | truncate(2000) }}\n---\n\nWrite the source to: `{{ inputs.workspace_dir }}\/diagrams\/arch.puml`\n(create parent dir if missing; overwrite OK).\n\nReply with the absolute output path on a single line, no preamble.\n"
                },
                "skill": "sub-agent",
                "depends_on": [
                    "scan_repo",
                    "classify_kind"
                ]
            },
            {
                "id": "render_drawio",
                "kind": "agent",
                "with": {
                    "task": "Generate a draw.io XML diagram of kind `{{ outputs.classify_kind }}`\nfrom this codebase scan. Use valid draw.io XML:\n  <mxfile><diagram><mxGraphModel><root>\n    <mxCell id=\"0\"\/><mxCell id=\"1\" parent=\"0\"\/>\n    <mxCell id=\"N\" value=\"...\" style=\"...\" vertex=\"1\" parent=\"1\">\n      <mxGeometry ...\/>\n    <\/mxCell>\n    <mxCell ... edge=\"1\" source=\"...\" target=\"...\" parent=\"1\">\n      <mxGeometry ...\/>\n    <\/mxCell>\n  <\/root><\/mxGraphModel><\/diagram><\/mxfile>\n\nAim for 10-20 boxes\/edges to mirror the PlantUML side; layout can be\nsimple grid since the user is expected to re-arrange in draw.io.\n\nScan output:\n---\n{{ outputs.scan_repo | truncate(2000) }}\n---\n\nWrite the XML to: `{{ inputs.workspace_dir }}\/diagrams\/arch.drawio`\n(create parent dir if missing; overwrite OK).\n\nReply with the absolute output path on a single line, no preamble.\n"
                },
                "skill": "sub-agent",
                "depends_on": [
                    "scan_repo",
                    "classify_kind"
                ]
            },
            {
                "id": "compose_doc",
                "kind": "agent",
                "with": {
                    "task": "Compose an architecture document that references both diagram\ndeliverables. The doc body should contain three sections:\n\n1. **Scope** — restate the user's invocation target.\n   User invocation: {{ inputs.user_message | xml_escape | truncate(200) }}\n2. **Diagram kind** — `{{ outputs.classify_kind }}` (one paragraph\n   justifying why this kind was chosen).\n3. **Deliverables** — two bullet items linking the files:\n   - PlantUML source: {{ outputs.render_plantuml }}\n   - draw.io file: {{ outputs.render_drawio }}\n\nSave to: `{{ inputs.workspace_dir }}\/diagrams\/arch.docx`. Reply\nwith the absolute output path on a single line, no preamble."
                },
                "skill": "docx",
                "depends_on": [
                    "render_plantuml",
                    "render_drawio"
                ]
            },
            {
                "id": "persist",
                "kind": "tool_call",
                "tool": "memory_save",
                "tool_args": {
                    "mode": "append",
                    "path": "memory\/architecture-snapshots.md",
                    "content": "=== diagram triangulation ===\ninvocation: {{ inputs.user_message | xml_escape | truncate(200) }}\ndiagram_kind: {{ outputs.classify_kind }}\nplantuml: {{ outputs.render_plantuml | truncate(200) }}\ndrawio: {{ outputs.render_drawio | truncate(200) }}\ndocx: {{ outputs.compose_doc | truncate(200) }}"
                },
                "depends_on": [
                    "compose_doc"
                ],
                "tool_allowlist": [
                    "memory_save"
                ]
            }
        ]
    },
    "description": "Scan a target codebase path, classify the most informative diagram kind, then render it as BOTH a PlantUML source file AND a draw.io XML in parallel, and compose them into a single architecture doc. Use when writing an RFC or onboarding doc and you want a text-friendly (PlantUML) and an editable (drawio) view of the same architecture.",
    "meta_priority": 55
}

Diagram Triangulation (Meta-Skill)

A classifier + parallel render meta-skill. After scanning a target path, an llm_classify step picks the most informative diagram kind (one of class | sequence | component | deploy | flow), then two independent render branches synthesize PlantUML source and draw.io XML for the same scan — running in parallel because they are independent tools serving different downstream uses (git-friendly text review vs. editable canvas).

Trigger surface

Fire by saying diagram triangulation or one of the localized triggers listed in the frontmatter, with the target path or module reference in the same turn.

Fallback

If either render step fails, compose_doc should still produce the docx referencing whichever render succeeded; manually re-run the failed render via sub-agent with the same scan output as input.

Version History

  • 7f72a32 Current 2026-07-05 18:40

Same Skill Collection

src/opensquilla/skills/bundled/advanced-dubbing-studio/SKILL.md
src/opensquilla/skills/bundled/ai-video-script/SKILL.md
src/opensquilla/skills/bundled/audio-cog/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-image-download/SKILL.md
src/opensquilla/skills/bundled/awesome-webpage-research/SKILL.md
src/opensquilla/skills/bundled/AwesomeWebpageMetaSkill/SKILL.md
src/opensquilla/skills/bundled/cron/SKILL.md
src/opensquilla/skills/bundled/docx/SKILL.md
src/opensquilla/skills/bundled/filesystem/SKILL.md
src/opensquilla/skills/bundled/git-diff/SKILL.md
src/opensquilla/skills/bundled/github/SKILL.md
src/opensquilla/skills/bundled/history-explorer/SKILL.md
src/opensquilla/skills/bundled/html-coder/SKILL.md
src/opensquilla/skills/bundled/html-to-pdf/SKILL.md
src/opensquilla/skills/bundled/http-fetch/SKILL.md
src/opensquilla/skills/bundled/latex-compile/SKILL.md
src/opensquilla/skills/bundled/memory/SKILL.md
src/opensquilla/skills/bundled/music-and-singing-studio/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro-openrouter/SKILL.md
src/opensquilla/skills/bundled/nano-banana-pro/SKILL.md
src/opensquilla/skills/bundled/nano-pdf/SKILL.md
src/opensquilla/skills/bundled/openrouter-video-generator/SKILL.md
src/opensquilla/skills/bundled/paper-abstract-author/SKILL.md
src/opensquilla/skills/bundled/paper-citation-planner/SKILL.md
src/opensquilla/skills/bundled/paper-experiment-stub/SKILL.md
src/opensquilla/skills/bundled/paper-outline-author/SKILL.md
src/opensquilla/skills/bundled/paper-preference-planner/SKILL.md
src/opensquilla/skills/bundled/paper-refbib-stub/SKILL.md
src/opensquilla/skills/bundled/paper-revision-author/SKILL.md
src/opensquilla/skills/bundled/paper-section-author/SKILL.md
src/opensquilla/skills/bundled/paper-source-curator/SKILL.md
src/opensquilla/skills/bundled/pptx/SKILL.md
src/opensquilla/skills/bundled/seedance-2-prompt/SKILL.md
src/opensquilla/skills/bundled/skill-creator-linter/SKILL.md
src/opensquilla/skills/bundled/skill-creator-proposals/SKILL.md
src/opensquilla/skills/bundled/skill-creator-smoke-test/SKILL.md
src/opensquilla/skills/bundled/srt-from-script/SKILL.md
src/opensquilla/skills/bundled/stack-trace-generic-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-go-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-js-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-python-probe/SKILL.md
src/opensquilla/skills/bundled/stack-trace-rust-probe/SKILL.md
src/opensquilla/skills/bundled/subtitle-burner/SKILL.md
src/opensquilla/skills/bundled/swe-bench/SKILL.md
src/opensquilla/skills/bundled/text-file-read/SKILL.md
src/opensquilla/skills/bundled/title-card-image/SKILL.md
src/opensquilla/skills/bundled/video-merger/SKILL.md
src/opensquilla/skills/bundled/video-still-animator/SKILL.md
src/opensquilla/skills/bundled/voice-clone-lab/SKILL.md
src/opensquilla/skills/bundled/voice-conversion-studio/SKILL.md
src/opensquilla/skills/bundled/voiceover-studio/SKILL.md
src/opensquilla/skills/bundled/weather/SKILL.md
src/opensquilla/skills/bundled/web-search/SKILL.md
src/opensquilla/skills/bundled/xlsx/SKILL.md
src/opensquilla/skills/exp/meta-arxiv-daily-digest-deck/SKILL.md
src/opensquilla/skills/exp/meta-codereview-current-diff/SKILL.md
src/opensquilla/skills/exp/meta-compliance-audit-bundle/SKILL.md
src/opensquilla/skills/exp/meta-github-pr-watch-digest/SKILL.md
src/opensquilla/skills/exp/meta-issue-to-pr-autopilot/SKILL.md
src/opensquilla/skills/exp/meta-knowledge-base-bootstrap/SKILL.md
src/opensquilla/skills/exp/meta-migration-assistant/SKILL.md
src/opensquilla/skills/exp/meta-multi-format-export-pack/SKILL.md
src/opensquilla/skills/exp/meta-pdf-intelligence/SKILL.md
src/opensquilla/skills/exp/meta-pdf-reformat-pipeline/SKILL.md
src/opensquilla/skills/exp/meta-pre-commit-quality-gate/SKILL.md
src/opensquilla/skills/exp/meta-scheduled-morning-digest/SKILL.md
src/opensquilla/skills/exp/meta-security-review-bundle/SKILL.md
src/opensquilla/skills/exp/meta-spreadsheet-insight/SKILL.md
src/opensquilla/skills/exp/meta-stack-trace-investigator/SKILL.md
src/opensquilla/skills/exp/meta-travel-planner/SKILL.md
src/opensquilla/skills/exp/meta-web-to-pdf-briefing/SKILL.md
tests/_fixtures/meta-paper-write-handwritten.SKILL.md
src/opensquilla/skills/bundled/code-task/SKILL.md
src/opensquilla/skills/bundled/deep-research/SKILL.md
src/opensquilla/skills/bundled/meta-kid-project-planner/SKILL.md
src/opensquilla/skills/bundled/meta-paper-write/SKILL.md
src/opensquilla/skills/bundled/meta-short-drama/SKILL.md
src/opensquilla/skills/bundled/meta-skill-creator/SKILL.md
src/opensquilla/skills/bundled/multi-search-engine/SKILL.md
src/opensquilla/skills/bundled/pdf-toolkit/SKILL.md
src/opensquilla/skills/bundled/skill-creator/SKILL.md
src/opensquilla/skills/bundled/sub-agent/SKILL.md
src/opensquilla/skills/bundled/summarize/SKILL.md
src/opensquilla/skills/bundled/tmux/SKILL.md
src/opensquilla/skills/exp/meta-long-running-build-watchdog/SKILL.md
src/opensquilla/skills/bundled/paper-plot-stub/SKILL.md
src/opensquilla/skills/exp/meta-content-publish-pipeline/SKILL.md
src/opensquilla/skills/exp/meta-home-it-rescue/SKILL.md
src/opensquilla/skills/exp/meta-meeting-to-workflow/SKILL.md
src/opensquilla/skills/exp/meta-research-to-slide-deck/SKILL.md
src/opensquilla/skills/exp/meta-sales-lead-researcher/SKILL.md

Metadata

Files
0
Version
7f72a32
Hash
84c4f8ea
Indexed
2026-07-05 18:40

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-09 05:04
浙ICP备14020137号-1 $Гость$