architecture-diagram — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited architecture-diagram (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
End-to-end architecture diagram generation. Gathers system information, produces an HTML file, renders it to PNG via Chrome headless, and delivers the final image. The entire export is automated -- the user never needs to open a browser or run a script manually.
Two visual styles: dark theme (default, SVG-based) and light theme (div-based, print-friendly).
Before writing markup, identify from the request (ask clarifying questions if anything is ambiguous):
tmp/ in the project directory)When the request references a blog post or design document, read it and extract component names and relationships before writing markup.
Ask the user for clarification only when the system description is genuinely ambiguous. Do not ask questions that can be reasonably inferred.
Dark theme (default): Copy resources/template.html as the starting point. Includes inline SVG, CSS, grid background, arrowhead marker, export toolbar stub, and example component patterns.
Light theme: Build from the patterns in references/diagram-styles.md. Div-based layout with CSS classes (.node .service, .db, .group), Inter font, white #FFFFFF background.
For either style, do not start from a blank file. Save the working HTML to tmp/ with a descriptive filename (e.g., tmp/my-project-architecture.html).
Dark theme: SVG <rect> + <text> pairs.
Light theme: div elements with category CSS classes.
Assign colors by semantic type:
| Type | Dark Stroke | Light Class | Use For |
|---|---|---|---|
| Frontend | #22d3ee (cyan) | .service | Web apps, mobile clients, SPAs |
| Backend | #34d399 (emerald) | .server | API servers, microservices, workers |
| Database | #a78bfa (violet) | .storage | SQL, NoSQL, caches, object stores |
| Cloud | #fbbf24 (amber) | .infra | AWS/GCP/Azure managed services |
| Security | #fb7185 (rose) | .external | Auth providers, WAFs, IAM |
| Message Bus | #fb923c (orange) | .storage | Kafka, RabbitMQ, SQS, event buses |
| External | #94a3b8 (slate) | .external | Third-party APIs, CDN, SaaS |
For exact fill values, SVG code snippets, and light-theme CSS, consult:
references/design-system.mdreferences/diagram-styles.mdstroke-dasharray="8,4"), amber, rx="12"stroke-dasharray="4,4"), rose, transparent fill.group class with dashed #bbb borderPlace boundary labels at the top-left corner inside the boundary.
Dark theme: SVG <line> or <path> with marker-end="url(#arrowhead)".
#64748bstroke-dasharray="5,5"), rose #fb7185Light theme: CSS .arrow-down (shaft + triangle head) or .connector-h (Unicode arrows).
Z-order (dark theme): draw arrows after the background grid but before component boxes. SVG renders in document order. To mask arrows behind semi-transparent boxes, add an opaque <rect fill="#0f172a"> beneath the styled rect. Full pattern in references/design-system.md.
Component A: y=70, height=60 -> ends at y=130
Gap: y=130 to y=170 -> 40px gap, bus at y=140 (20px tall)
Component B: y=170, height=60 -> ends at y=230Place the legend OUTSIDE all boundary boxes. Calculate the lowest boundary edge, start the legend at least 20px below it. Extend the SVG viewBox (dark) or body height (light) if needed.
After saving the HTML file, immediately render it to PNG using the screenshot script:
bash scripts/screenshot.sh tmp/diagram.html tmp/diagram.pngThe script:
google-chrome, google-chrome-stable, chromium-browser, or chromium in PATHsaved: <path> (<width>x<height>)Override dimensions when auto-detect fails or the diagram needs a specific size:
bash scripts/screenshot.sh tmp/diagram.html tmp/diagram.png 1200 900This step is mandatory. Do not stop after writing the HTML. Always produce the PNG.
Read the generated PNG file and check:
If issues are found, fix the HTML and re-run Step 8.
Report the exact file paths of both artifacts:
HTML: tmp/my-project-architecture.html
PNG: tmp/my-project-architecture.pngThe HTML file is the editable source. The PNG is the deliverable. Keep both unless the user asks to remove the HTML.
The dark-theme HTML also contains a browser-based export toolbar (Copy/PNG/PDF via html2canvas + jsPDF) for ad-hoc re-export. This is a convenience feature -- the primary export is always via scripts/screenshot.sh.
| Type | Dark (SVG viewBox) | Light (body px) |
|---|---|---|
| Standard | 1000 x 680 | 1200 x 900 |
| Wide | 1200 x 680 | 1200 x 900 |
| Tall | 1000 x 900 | 1200 x 1200 |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.