【GitHub Copilot】awesome-copilot の Skills と Instructions で draw.io アーキテクチャ図を自動生成する 【GitHub Copilot】awesome-copilot の Skills と Instructions で draw.io アーキテクチャ図を自動生成する
- はじめに アーキテクチャ設計図を書くのって、地味に時間がかかる上に、めんどくさいことが多いと思います。
- 本記事では awesome-copilot というコミュニティ公式コレクションから厳選した Skills と Instructions
アーキテクチャ設計図の作成は、システムの全体像をチームで共有するうえで欠かせない作業だが、手作業での図示は地味に時間がかかり、後回しにされがちだ。こうした負担を軽減する手段として、GitHub Copilot のカスタマイズ機能を使い、作図ツール draw.io 向けの図を自動生成するアプローチが紹介されている。
中心となるのは「awesome-copilot」と呼ばれるコミュニティ主導のコレクションだ。これは GitHub Copilot の挙動を調整するための Instructions(指示)や、特定タスクに特化した Skills(スキル)、プロンプト集などを集めたリポジトリで、用途に応じて自分のプロジェクトに取り込んで利用できる。Instructions はコーディング規約や出力形式といった前提をモデルに常時伝える役割を持ち、Skills はより具体的な作業手順を切り出して再利用しやすくする仕組みだと位置づけられる。
draw.io は内部的に XML 形式で図を表現しているため、テキスト生成を得意とする大規模言語モデルと相性がよい。適切な Instructions と Skills を組み合わせれば、コードや構成情報からノードや接続線を含む XML を生成させ、それを draw.io に読み込ませて図として可視化する、という流れが想定される。設計者は完成形を一から描くのではなく、生成結果をたたき台として調整する形に作業の重心を移せるとみられる。
本記事では awesome-copilot というコミュニティ公式コレクションから厳選した Skills と Instructions
同種の発想は以前から存在し、Mermaid や PlantUML のようにテキストから図を描く記法は AI との組み合わせで広く使われてきた。draw.io 形式を直接出力させる利点は、生成後に GUI 上で手軽にレイアウトを微調整できる点にあると考えられる。エディタ統合型の AI 開発支援は Cursor など競合でも進んでおり、図の自動化はその応用例の一つと位置づけられる。
一方で、生成された図が必ずしも設計意図を正確に反映するとは限らず、レイアウトや粒度の調整には人手による確認が引き続き必要になる可能性がある。GitHub は Copilot のカスタマイズ機能を継続的に拡張しており、こうしたコミュニティ資産を活用する手法は今後さらに広がっていくと考えられる。
Creating architecture diagrams is one of those tasks that quietly consumes engineering time. Drawing boxes, aligning arrows, and keeping the picture in sync with the actual system is tedious, and the results often go stale the moment the design changes. A recent walkthrough on Qiita demonstrates a workflow that aims to reduce that friction by using GitHub Copilot together with curated assets from the awesome-copilot collection to generate draw.io architecture diagrams automatically.
The central idea is to combine two of Copilot's customization mechanisms, Skills and Instructions, drawn from awesome-copilot. That repository is a community-maintained catalog of reusable Copilot configuration files, including custom instructions, prompt files, chat modes, and skill definitions. Rather than writing prompts from scratch each time, developers can pull in tested building blocks that nudge Copilot toward a specific output style or task. In this case, the selected assets are tuned so that Copilot produces diagram definitions instead of prose or code.
Instructions in Copilot are persistent guidance that shapes how the model responds within a repository or workspace. They typically live in files such as copilot-instructions.md or scoped instruction files, and they let teams encode conventions, preferred terminology, and constraints. Skills are a more recent extension of this customization surface, packaging targeted capabilities that Copilot can invoke for particular jobs. Used together, the Instructions establish the rules of the road, while the Skill provides the focused ability to translate a described system into a structured diagram artifact.
The technical detail that makes this practical is the file format behind draw.io, also known as diagrams.net. A .drawio file is fundamentally XML, describing shapes, their coordinates, labels, and the connections between them. Because that structure is text-based and well documented, a large language model can generate it directly. The workflow described has Copilot emit the diagram XML from a natural-language description of an architecture, after which the file can be opened and edited in the draw.io editor or its Visual Studio Code extension. Keeping the source as text also means the diagram can live in version control alongside the code it represents, making changes reviewable in pull requests.
This approach fits a broader pattern often called diagrams as code, where visual artifacts are generated from textual definitions rather than drawn by hand. Tools like Mermaid, PlantUML, and the Python-based Diagrams library have popularized the concept, and many of them integrate with Markdown renderers and documentation pipelines. Generating draw.io XML through Copilot is a variation on that theme, with the advantage that the output remains fully editable in a mature graphical tool rather than being locked into a rendering-only format. The trade-off is that draw.io XML is more verbose and less human-friendly to author manually, which is precisely why delegating it to an AI assistant appears appealing.
Context around the tooling matters here. awesome-copilot is part of a growing ecosystem of shareable Copilot customizations, and Microsoft and GitHub have steadily expanded the ways teams can tailor the assistant's behavior, from repository-level instructions to agent-style features. Skills in particular reflect a move toward more composable, task-specific extensions. Readers should note that the exact capabilities and file conventions in this area are still evolving, so the specific Skill and Instruction formats demonstrated may change as the platform matures.
Some caveats are worth keeping in mind. Generated diagrams are only as accurate as the description provided and the model's interpretation of it, so the output is likely to need human review for correctness, layout clarity, and completeness. Automated placement can produce cramped or overlapping elements that require manual tidying, and the model may omit components or misrepresent relationships in complex systems. The technique is best viewed as a way to produce a solid first draft quickly rather than a finished, authoritative diagram.
For teams evaluating this, the prerequisites are modest: an active GitHub Copilot subscription, the draw.io editor or its VS Code extension, and a willingness to experiment with the configuration files from awesome-copilot. The payoff is a faster path from a written design to a visual one, with the diagram stored as text that can evolve with the codebase. As AI assistants increasingly handle structured-output tasks, generating editable diagrams from descriptions looks like a natural and incremental extension of how developers already work.
本ページの本文・要約は AI による自動生成です。正確性は元記事 (qiita.com) をご確認ください。