agentleFS
d-o-hubd-o-hub/github-template-ai-agents/.agents/skills/architecture-diagram/SKILL.md

architecture-diagram

Skill2 starsChanged 12 days agoMITView on GitHub

Generate or update a project architecture SVG diagram by scanning the live project structure. Use this skill whenever the user asks to regenerate, refresh, or update the architecture diagram, or when skills, agents, or commands have been added/removed and the diagram is stale — even if they just say "update the diagram" or "regenerate the architecture SVG". Triggers on phrases like "update the diagram", "regenerate the architecture SVG", "sync the diagram", or "diagram is out of date". Not for readme-best-practices.

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use competitor-news-monitor, blocked-page-recovery and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • aivrarSkill

    competitor-news-monitor

    Watch named companies for material news; cited digests.

    Also in 6 projects that use this

  • aivrarSkill

    blocked-page-recovery

    Recover blocked/paywalled/WAF'd pages via fallbacks.

    Also in 6 projects that use this

  • john-data-chenSkill

    teams-meeting-pipeline

    Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.

    Also in 8 projects that use this

  • john-data-chenSkill

    touchdesigner-mcp

    Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.

    Also in 5 projects that use this

  • Tommy-ywSkill

    songwriting-and-ai-music

    Songwriting craft, AI music generation prompts (Suno focus), parody/adaptation techniques, phonetic tricks, and lessons learned. These are tools and ideas, not rules. Break any of them when the art calls for it.

    Also in 9 projects that use this

  • mae616Skill

    p5js

    p5.js(クリエイティブコーディング)のProcessing由来「コードでスケッチ」思想を軸に、setup/drawループ・座標系・インタラクション・パフォーマンス最適化を整理する。p5.js、Processing、クリエイティブコーディング、ジェネラティブアート、インタラクティブ表現、ビジュアルプログラミング、Canvas描画、パーティクル、フラクタル、ノイズ表現に関する相談で必ず使うこと。ユーザーが「コードでアート」「動くビジュアル」「インタラクティブな描画」と言った場合にも適用する。

    Also in 9 projects that use this

  • +3 more from aivrar

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 42 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the bash tool to find the project root (directory containing .agents/):

    line 28
  2. Very specific:

    If .agents/ is not in the current directory, search upward or ask the user to confirm the project root before continuing.

    line 36
  3. Distinctive:

    After the script exits:

    line 59
  4. Distinctive:

    If counts differ from the last known state, summarise what changed

    line 62
  5. Distinctive:

    All fields are optional — the script uses sensible defaults when the file is absent.

    line 86

“Common” is measured: kept by at least 6 in 10 of the 42 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Architecture Diagram

Generates an architecture SVG diagram by scanning the live project structure.

When to Use

  • User asks to update / regenerate / sync the architecture diagram
  • Skills, agents, or commands have changed
  • First-time setup (diagram doesn't exist yet)

Execution

Step 1 — locate project root

Use the bash tool to find the project root (directory containing .agents/):

# From wherever the agent is currently working
pwd
ls .agents/ .opencode/ 2>/dev/null || echo "NOT_FOUND"

If .agents/ is not in the current directory, search upward or ask the user to confirm the project root before continuing.

Step 2 — run the generator script

Copy the script from the skill bundle into a temp location and run it from the project root:

python /path/to/skill/scripts/generate_diagram.py \
  --root . \
  --out docs/architecture.svg

The script auto-discovers:

  • Skills → .agents/skills/*/SKILL.md (reads name: from frontmatter)
  • Agents → */agents/*.md (uses filename stem)
  • Commands → */commands/*.md (uses filename stem, strips leading /)

It writes a self-contained SVG to --out (default: docs/architecture.svg).

Step 3 — confirm and report

After the script exits:

  1. Tell the user the output path
  2. Report counts: N skills · M agents · K commands
  3. If counts differ from the last known state, summarise what changed

Output

docs/architecture.svg — a standalone SVG output file, viewBox 680 × auto, compatible with GitHub README embedding (example: ![Architecture](docs/architecture.svg)).

Customisation

The script reads an optional docs/diagram-config.json if present:

{
  "title": "Project Architecture",
  "project_name": "My Project",
  "author": "maintainer",
  "pipeline_stages": [
    {"name": "build", "color": "teal"},
    {"name": "test", "color": "blue"},
    {"name": "deploy", "color": "green"}
  ]
}

All fields are optional — the script uses sensible defaults when the file is absent.

Bundled Scripts

  • scripts/generate_diagram.py — Main generator script

See Also

  • readme-best-practices — README and documentation best practices
  • skill-creator — Create and improve skills

Rationalizations

RationalizationReality
"The diagram is close enough, no need to regenerate"Stale diagrams mislead new contributors and mask architectural drift.
"I'll update the diagram manually in an editor"Manual SVG edits break on next regeneration and introduce inconsistencies.
"Architecture diagrams are just decoration"Diagrams are the primary onboarding tool for understanding system structure.

Red Flags

  • Committing architecture changes without regenerating the diagram
  • Manually editing the SVG instead of using the generator script
  • Ignoring diagram regeneration when adding/removing skills or agents

Voice & Context

  • Default: professional + blog
  • Reference: voice-profiles skill for definitions and auto-detection.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.