rea-analysis-optimization
MOmorluto/rea486k8,943 new stars in the last 7 days
Draw network/architecture diagrams (AWS, Azure, Cisco) from a natural-language description or from a proposed system architecture, using the drawthe.net MCP server's YAML DSL and icon tools. Use this skill whenever the user asks to "draw a diagram", "create an architecture diagram", "visualize this infrastructure", "sketch the network", or asks you to propose/illustrate a system design.
This skill teaches an agent how to turn a description (or a proposed architecture) into a drawthe.net YAML diagram and render it via the drawthe.net MCP server's tools. The result should be a build blueprint: someone reading it should understand what to provision, how traffic and data move, what is required versus optional, and what to configure next.
When authoring system architecture diagrams in YAML, adhere strictly to these architectural visual design principles:
white) unless the user requests another treatment.black for labels and #334155 for connections/borders). Do not use the historical orange renderer defaults for blueprint styling.#F1F5F9 with #94A3B8. Container color should establish hierarchy without competing with the topology.strokeDashArray: [4, 4]): Asynchronous events, metadata/telemetry flows, or logical/trust boundaries.bottomMiddle for north-to-south flows, and keep it consistent unless a collision is unavoidable.textLocation across the entire diagram. Use the selected group/icon placement consistently; the established blueprint default is bottomMiddle. Never mix alignments within the same diagram unless a documented collision makes it unavoidable.text: attribute (e.g., text: "Auth Service") instead of raw technical identifiers (e.g., auth_svc_node_01).The drawthe.net MCP server must be connected and expose these tools:
get_dsl_reference — returns the full YAML DSL syntax reference.list_icon_families — lists available icon families and icon counts.list_icons — lists/searches icon names within a family.get_icon / get_icon_svg — preview a specific icon (PNG/SVG) to confirm it looks right before using it.render_diagram — renders a YAML diagram to PNG or SVG.Read the DSL reference first. Call get_dsl_reference before
writing any YAML if you have not already seen it in this conversation.
Do not guess at the syntax — the diagram, title, icons, notes,
groups, and connections sections each have specific required and
optional fields.
Identify the components in the description. Break the request down into concrete entities (servers, load balancers, databases, gateways, VPCs/VNets, users, external services, etc.) and the connections between them. If the user proposes an architecture rather than describing an existing one, design a sensible one first (reasonable tiers, redundancy, networking boundaries), then diagram it.
State the architecture assumption in the title or a note when the request is ambiguous. For example, RHDH on ROSA is materially different from RHDH on EKS or RHDH on EC2.
Design the blueprint before choosing icons. Organize it into these layers where they apply:
Do not draw every plausible service. Include a component only when it answers a deployment question, and mark it as required, optional, or external in its label or notes.
Choose the right icon family based on vendor keywords in the request — there is no fixed default family. Inspect the request for vendor/platform signals:
aws2026 (preferred, current) or aws (legacy).azure2026 (preferred), or azureCloud /
azureEnterprise (legacy).cisco2026 (preferred) or cisco (legacy).*2026 families.
Call list_icon_families if you're unsure what's available.Never invent an icon name. For every component, call list_icons
with the family and a keyword query (e.g. query: "load_balanc") to find
the real icon name before writing an icon: reference in YAML. Use
get_icon or get_icon_svg to visually confirm an ambiguous match
before committing to it.
Always prefer a meaningful, accurate icon over a generic
placeholder. If an exact icon for a component doesn't exist in the
chosen family, search for the closest conceptually similar icon (e.g. a
generic "server" or "compute" icon for an unlisted service type) rather
than defaulting to a plain box or an unrelated icon. Only fall back to a
generic shape (e.g. via notes) if truly no reasonable icon exists in
any relevant family.
Write the YAML diagram using the DSL: define diagram (grid size,
background), optionally title, then icons (with x/y grid
coordinates, using relative positions like x: "+1" where convenient),
groups to box related components together, and connections between
icon keys. Use YAML anchors for repeated styling if helpful.
Start from the light, readable style below unless the user explicitly requests a different visual treatment:
diagram: fill: "white" gridLines: false groupPadding: 0.4 title: color: "black" fill: "white" logoFill: "none" stroke: "black" type: "box" heightPercentage: 6 group: &group - { color: "black", stroke: "#94a3b8", fill: "#f1f5f9" } connection: &connection color: "#334155" stroke: "#334155"
Use groups as a list of objects, not a map. Layer groups must be
visibly distinct from a white canvas. For a hierarchy, use a restrained
sequence of light fills so the layers can be scanned without competing
with the topology, for example: foundation #eaf2f8, request/data flow
#eef6ee, platform #fff7e6, and workloads/dependencies #f1f5f9.
Keep the border treatment consistent across all groups. Use
Choose one textLocation for every group heading before laying out the
diagram, and use it consistently across the hierarchy. bottomMiddle is
often a good choice for north-to-south flows because headings sit outside
the incoming edge of each layer. Label placement must be consistent
unless consistency is impossible because the label is blocked. If a
connection, icon, or note crosses or obscures a heading, first fix the
layout by moving the affected component, changing spacing, or rerouting
the connection. Only when those fixes cannot remove the collision may one
heading use another position, and that exception must be documented.
Do not set iconFill, iconStroke,
or preserveWhite globally without previewing the selected family first;
those overrides can erase or wash out native vendor icon artwork.
Never rely on renderer defaults for presentation output: the historical
defaults use orange and are intended for backward compatibility. Always
specify a background, title colors, group styling, and connection colors.
For blueprint icons, set color: "black", fill: "white", and a dark
stroke explicitly so labels remain readable around vendor artwork.
Every icon must have an explicit human-readable text label. Never
expect the viewer to infer a service from an icon or filename. Keep icon
labels short (normally one to three words), such as RHDH, ROSA,
PostgreSQL, and Route 53; put (required), (optional), or
(external) in notes or a legend rather than shrinking a long label until
it becomes unreadable. Use notes for configuration detail rather than
packing prose into icon labels.
Use connections to show meaningful flows, not merely membership. Add
notes that explain numbered flows such as 1. DNS resolves the public hostname, 2. ingress terminates TLS, and 3. RHDH accesses PostgreSQL and secrets. Avoid a dense web of lines from one central icon to every
service; group dependencies and use notes to explain shared access.
For layered network, platform, or application diagrams, orient the dominant data or request flow north-to-south: producers, users, or external/WAN edge at the top; routing, security, or core next; access, platform, or processing tiers below that; and databases, storage, or downstream consumers at the bottom. If the system's dominant flow is different, state the assumption and preserve one clear direction rather than mixing vertical and horizontal reading orders. Reuse the same x coordinates across tiers wherever devices form a logical column or pair. Inspect every group heading against the rendered connection paths and icons. Do not leave a label underneath a line or behind an icon. Prefer repairing the layout while preserving the chosen label position; use a different position only when the collision cannot otherwise be removed.
Within each layer, calculate and use an intentional spacing rhythm for sibling icons. Equal-role nodes should use equal x intervals unless a documented architectural grouping requires otherwise. Do not move one icon to solve a collision and leave the remaining layer on an accidental set of unequal gaps; rebalance the entire layer and update its connections.
For nontrivial diagrams, perform at least three render-review passes: render the initial layout, inspect the actual SVG and PNG/SVG preview, correct spacing/labels/connections, and render again. Repeat until the topology, hierarchy, label placement, and whitespace are stable. Do not deliver a diagram based only on YAML inspection or a single successful render command.
Render with render_diagram. Default to format: png unless the
user asks for SVG (e.g. for further editing). Always read the
warnings returned in the response — a warning like "Icon not found"
means a placeholder was drawn instead of a real icon; if you see one,
go back to list_icons and fix the reference, then re-render.
Run the blueprint quality gate. Before presenting the result, verify that the image answers these questions:
Reject and revise any diagram with unlabeled icons, unexplained vendor artwork, ambiguous flows, decorative components, or a layout that cannot be read at normal viewing size.
Iterate. If the rendered layout looks cramped, overlapping, or
components are misaligned, adjust the diagram grid size (rows/
columns) or icon x/y coordinates and re-render rather than leaving
a poor-quality diagram. Check the actual image preview, not just the
tool response: the canvas must be light and opaque, labels must be
readable, groups must not overlap unrelated groups, and connection lines
must not dominate the diagram. Increase the grid size before shrinking
labels or packing more components into one cell.
Always deliver the source YAML. After the diagram passes the quality
gate, save the complete YAML as a new .yaml document and provide that
document to the user alongside the rendered image. Never provide only a
screenshot or an inline abbreviated snippet; the YAML is the editable
blueprint the user will build from and revise later.
npm run mcp in this repo, or
configure your MCP host to spawn npx tsx mcp/server.ts from the repo
root). It has no network dependency for rendering.aws (231), aws2026
(303), azure2026 (636), azureCloud (208), azureEnterprise (101),
cisco (295), cisco2026 (295). Always confirm current counts/names via
list_icon_families/list_icons rather than relying on this list, since
icon sets may be refreshed over time.MOmorluto/rea486k8,943 new stars in the last 7 days
Diagnose hard bugs and performance regressions by building a feedback loop with tests or scripts.
MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days
MAmattpocock/skills337k4,978 new stars in the last 7 days