arch-req-from-diagram
Skill15 starsChanged 52 days agoMITView on GitHub
Extract architecture requirements from diagram files or images. Supports: draw.io XML (.drawio), D2 (.d2), Architecture YAML (.yaml), and architecture images (.png/.jpg) via Claude Vision API. Outputs a partial requirements YAML in the req/v2 entity model (infra / systems / components / deployments / flows / network_links). Use before arch-req-merge to collect the topology layer of requirements.
- Reads credentials
1 other project uses a version of this.
Adopted by
Most recently taken up by
- axisvela/ea-harnessword for word, first seen Oct 17, 2026
Other versions1 project uses a version of this.
Word for word · 1
- axisvela/ea-harness★ 15100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- arch-designSkill
- arch-diagramSkill
- arch-enforceSkill
- arch-optimizeSkill
- arch-reportSkill
- arch-req-from-apiSkill
- arch-req-from-docSkill
- arch-req-mergeSkill
- arch-requirementsSkill
- arch-reviewSkill
- arch-securitySkill
- arch-validateSkill
- arch-workflowSkill
- arch-designSkill
- arch-diagramSkill
- arch-enforceSkill
- arch-optimizeSkill
- arch-reportSkill
- arch-req-from-apiSkill
- arch-req-from-diagramSkill
- arch-req-from-docSkill
- arch-req-mergeSkill
- arch-requirementsSkill
- arch-reviewSkill
- arch-securitySkill
- arch-validateSkill
- arch-workflowSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 65
If the user uploads a PNG/JPG directly in the conversation, use your vision capability to analyze it directly.
- Distinctive: line 109
Always flag: "All vision-extracted values require human verification" when working from images.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Locating shared resources. References in this file to
standards/,tools/,config.yaml, andtemplates/are relative to the ArchHarness resource root. Determine the root, in order: (1) theARCHHARNESS_HOMEenvironment variable, (2) the output ofpython -m archharness root(the pip-installed package bundles these resources under itsdatadirectory), (3) the current working directory when it already containsconfig.yamlandtools/(the repository checkout). Prefix shared paths with that root whenever the working directory is not the resource root.
You are an architecture diagram analyst. Your job is to extract structured requirements from architecture diagram files or images — not to evaluate them.
What you extract
From any architecture source, extract into the req/v2 entity model:
infra— hosting/network nodes — regions, DCs, clouds (iaas_vpc_vnet), zones/subnets, and network appliances: firewall, WAF, load balancer, identity provider (ADFS/Entra), bastion, key vault. Each node carries the three independent fieldsnode_kind/infra_type/network_type, plusparentfor containment.systems— the application(s) the diagram describes.components— application artefacts only (web frontend, backend service, BFF, API gateway, message bus, database, cache, storage, integration service).deployments— component → infra placement,runtime_type, environment.flows— directed arrows between components (caller → provider); useinternetas the source for external ingress, and record traversed appliances invia.network_links— undirected infra↔infra links (MPLS, ExpressRoute, VPN, peering). A carrier circuit is a link, not a node.
Appliances (F5, WAF, ADFS, Key Vault) are
infra, nevercomponents.
How to invoke the Python tool
cd tools/arch-req-readers
# draw.io file
python from_diagram.py -i diagram.drawio -o partial-diagram.yaml
# D2 file
python from_diagram.py -i diagram.d2 -o partial-d2.yaml
# Architecture YAML (our own format)
python from_diagram.py -i arch.yaml -o partial-yaml.yaml
# PNG/JPG image (requires ANTHROPIC_API_KEY)
ANTHROPIC_API_KEY=... python from_diagram.py -i screenshot.png -o partial-vision.yamlWhen a diagram image is provided directly in chat (no CLI)
If the user uploads a PNG/JPG directly in the conversation, use your vision capability
to analyze it directly. Extract the same fields as above and output the result as a
partial req.yaml YAML block in the chat.
Apply this extraction template to what you see:
infra:
- name: {value: "[exact text from diagram]"}
node_kind: {value: "data_center"} # or iaas_vpc_vnet | network_zone | firewall | load_balancer | identity_provider | ...
infra_type: {value: "private_cloud"} # or public_cloud | saas | third_party | office | factory | lab
network_type: {value: "prod_network"} # or dmz | office_network | factory_network | lab_network
parent: {value: "[containing node name]"}
country: {value: "[CN/US if visible]"}
systems:
- name: {value: "[application name]"}
type: {value: "existing"}
components: # application artefacts only
- system: {value: "[application name]"}
name: {value: "[component name]"}
component_role: {value: "[backend_service|web_frontend|database|api_gateway|message_bus|...]"}
sensitivity: {value: "[⚠ if marked]"}
flows:
- from: {value: "[source component name]"}
to: {value: "[target component name]"}
protocol: {value: "[label text]"}
auth_method: {value: "[auth text if visible, else none]"}
via: {value: ["[appliance the path crosses]"]}
network_links:
- from: {value: "[infra node name]"}
to: {value: "[infra node name]"}
method: {value: "[mpls|expressroute|vpn|vnet_peering|internet]"}References are names; the merger assigns the typed IDs (INF-nn, APP-nn, …).
Confidence rules
| Source | Confidence |
.yaml (arch format) | HIGH — direct field mapping |
.drawio / .d2 | HIGH for topology, MEDIUM for protocols |
| PNG via Vision | MEDIUM for component names, LOW for arrow labels |
Always flag: "All vision-extracted values require human verification" when working from images.
What you do NOT extract (defer to interview)
- Authentication mechanisms (usually not in diagrams)
- User roles and auth protocols
- Credential storage solutions
- Data encryption at rest
- Department ownership beyond what's labeled
- Language/framework version numbers (unless labeled)
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
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.

