[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D2RADF6EY1C287NS52VRHQ":3,"skill-same:01M7D2RADF6EY1C287NS52VRHQ":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M7D2RADF6EY1C287NS52VRHQ","archify",null,"Create professional architecture, workflow, sequence, data-flow, and lifecycle\u002Fstate diagrams as standalone HTML files with SVG graphics, a built-in dark\u002Flight theme toggle, and one-click export to PNG \u002F JPEG \u002F WebP \u002F SVG. Accepts plain-language descriptions or pasted Mermaid code (flowchart, sequenceDiagram, stateDiagram) and lays the diagram out from scratch in archify style. Use when the user asks for system architecture diagrams, infrastructure diagrams, cloud architecture visualizations, security diagrams, network topology, technical workflows, approval flows, runbooks, CI\u002FCD flows, process diagrams, API call sequences, request lifecycles, data pipelines, ETL\u002FELT maps, PII boundaries, data lineage, state machines, lifecycle diagrams, status transitions, or asks to convert\u002Fbeautify a Mermaid diagram.","om-scogo\u002Fskillsh-scraper","om-scogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160466840?v=4","01M79AWB6DFVCQ7RK70CS34B96","Om Achrekar","01M79AWB6ZM9SKR8KDH1WSSM22",0,"MIT","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Ftt-a1i-archify\u002Farchify\u002Farchify\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: archify\ndescription: Create professional architecture, workflow, sequence, data-flow, and lifecycle\u002Fstate diagrams as standalone HTML files with SVG graphics, a built-in dark\u002Flight theme toggle, and one-click export to PNG \u002F JPEG \u002F WebP \u002F SVG. Accepts plain-language descriptions or pasted Mermaid code (flowchart, sequenceDiagram, stateDiagram) and lays the diagram out from scratch in archify style. Use when the user asks for system architecture diagrams, infrastructure diagrams, cloud architecture visualizations, security diagrams, network topology, technical workflows, approval flows, runbooks, CI\u002FCD flows, process diagrams, API call sequences, request lifecycles, data pipelines, ETL\u002FELT maps, PII boundaries, data lineage, state machines, lifecycle diagrams, status transitions, or asks to convert\u002Fbeautify a Mermaid diagram.\nlicense: MIT\nmetadata:\n  version: \"2.11\"\n  author: tt-a1i\n  based_on: Cocoon-AI\u002Farchitecture-diagram-generator (MIT, v1.0)\n---\n\n# Archify Skill\n\nCreate professional technical diagrams as self-contained HTML files with inline SVG, a theme toggle, and a built-in image\u002FSVG export menu.\n\nEvery diagram ships with a **dark\u002Flight theme toggle** (persists in `localStorage`, respects `prefers-color-scheme`), an **export menu** (copy PNG to clipboard; download PNG\u002FJPEG\u002FWebP rasterized natively at up to 4× resolution; download a **dual-theme SVG** that follows the embedding host's `prefers-color-scheme` — ideal for GitHub READMEs), and a **CSS-variable color system** that keeps both themes consistent.\n\n## Setup\n\nNo dependency installation is required. The distributed skill includes standalone validators compiled from all five JSON Schemas, so schema and layout validation work immediately after installation. The generated HTML and the renderer runtime are both dependency-free.\n\nRun `node bin\u002Farchify.mjs doctor` to verify an installation. Run `node bin\u002Farchify.mjs demo [output-directory]` to generate a ready-to-open example before creating the first custom diagram.\n\nIf you have no shell access at all (e.g. the skill was added as project knowledge), fall back to architecture mode for every request: hand-place SVG into `assets\u002Ftemplate.html` following the Design System below, and run the self-review checklist before delivering.\n\n## Choosing a Diagram Type\n\n| Type | Use for | How |\n|------|---------|-----|\n| `architecture` | System components, cloud resources, services, security boundaries, infrastructure | `renderers\u002Farchitecture\u002Frender-architecture.mjs` + JSON (or hand-place SVG when renderers can't run) |\n| `workflow` | Technical flows, approval gates, tool calls, runbooks, CI\u002FCD, incident response | `renderers\u002Fworkflow\u002Frender-workflow.mjs` + JSON |\n| `sequence` | API call chains, request lifecycles, cache fallback, async traces, return paths | `renderers\u002Fsequence\u002Frender-sequence.mjs` + JSON |\n| `dataflow` | Pipelines, ETL\u002FELT, PII isolation, lineage, warehouse sync, consumers | `renderers\u002Fdataflow\u002Frender-dataflow.mjs` + JSON |\n| `lifecycle` | State machines, status transitions, wait states, retries, terminal states | `renderers\u002Flifecycle\u002Frender-lifecycle.mjs` + JSON |\n\nTrigger phrases: \"architecture\u002Fsystem\u002Fcloud diagram\" → `architecture` (unless clearly process-oriented). \"workflow\u002Fflow\u002Fprocess\u002Frunbook\u002Fapproval\u002FCI-CD\u002Fincident\" → `workflow`. \"sequence\u002Finteraction\u002Fcall chain\u002Fwho calls whom\" → `sequence`. \"data flow\u002Fpipeline\u002FETL\u002Flineage\u002FPII\u002Fgovernance\" → `dataflow`. \"state\u002Fstatus\u002Flifecycle\u002Fstate machine\u002Fretry\u002Fterminal\" → `lifecycle`.\n\n## Mermaid as an Input Dialect\n\nWhen the user pastes Mermaid code, do NOT try to render or parse it mechanically — read it for structure and **lay out from scratch** in the matching archify mode:\n\n| Mermaid | Archify mode | Mapping |\n|---------|--------------|---------|\n| `flowchart` \u002F `graph` | `workflow` (or `architecture` if it's a component map) | `subgraph` → lane or region boundary; node shape `{}` (diamond) → decision\u002Fsecurity node; `-->` labels → edge labels (use sparingly); `classDef`\u002F`style` → nearest semantic type |\n| `sequenceDiagram` | `sequence` | `participant` → participants (pick semantic `type` from the name); `->>` → message, `-->>` → `return` variant; `Note` → message `note`; `rect` blocks → segments |\n| `stateDiagram` | `lifecycle` | states → states (pick `start`\u002F`active`\u002F`waiting`\u002F`success`\u002F`failure` from names); `[*]` start\u002Fend → `start` type \u002F `terminal` lane; transition labels → event-like labels |\n\nDrop Mermaid styling; keep only the topology and meaning. You choose grouping, lane order, and what deserves emphasis — that judgment is the product.\n\n## Layout principles (read before placing)\n\nArchify's readability comes from **spatial narrative**, not from drawing every dependency as an arrow. Before you write coordinates or edge lists, plan one clear story:\n\n1. **One main path** — left → right (architecture) or lane → column (workflow). The reader should trace the happy path without crossing lines.\n2. **Few labeled edges** — label only cross-boundary or non-obvious transitions on the main path. Adjacent steps stay unlabeled.\n3. **Short side branches** — permissions, storage, bots, CI: connect **up or down** from the nearest node on the main path. Never route a secondary edge diagonally across unrelated components.\n4. **Cards for detail** — policies, tech stack notes, and \"also connects to X\" belong in summary cards, not as extra arrows.\n5. **Mode fit** — process \u002F approval \u002F tool-call stories → `workflow` or `sequence`. Component maps with ≤12 nodes → `architecture`. If the diagram needs 20+ edges, remove edges until the main path is obvious.\n\nWorked examples on this pattern: `examples\u002Farchify-repo.architecture.json` (this repo) and `examples\u002Fmaka-architecture.architecture.json` (third-party desktop app).\n\nWhen validation fails on label overlap, read the **Suggested fix** lines (coordinates \u002F `labelAt` \u002F `labelDy`) and apply them directly — do not guess offsets blindly.\n\n## Renderer Modes (architecture \u002F workflow \u002F sequence \u002F dataflow \u002F lifecycle)\n\nAll five modes follow the same loop:\n\n1. **Read first**: the schema (`schemas\u002F\u003Ctype>.schema.json`) and the complete worked example (`examples\u002F*.{architecture,workflow,sequence,dataflow,lifecycle}.json`) — copy its patterns instead of guessing field shapes.\n2. Write `\u003Cname>.\u003Ctype>.json`.\n3. Render: `node bin\u002Farchify.mjs render \u003Ctype> \u003Cinput>.json \u003Coutput>.html` (paths relative to this skill's folder).\n4. Validate the generated artifact: `node bin\u002Farchify.mjs validate \u003Ctype> \u003Cinput>.json --json`, or check an existing HTML file with `node bin\u002Farchify.mjs check \u003Coutput>.html`. This catches malformed SVG output, non-finite SVG values, two-point diagonal arrows, and arrows crossing the legend.\n5. If either step fails, the error names the JSON path or the fix (thresholds, valid ranges, which knob to change). Fix the JSON and re-run; never edit the renderer.\n\nSchema violations exit non-zero with path-prefixed messages like `\u002Fnodes\u002F3 (id\u002Flabel: \"router\") must NOT have additional properties`. The renderers additionally fail fast on layout problems: node\u002Fstate overlap (including cross-lane), labels colliding with nodes or other labels, labels wider than their node, out-of-range columns\u002Frows, too-short edges, workflow edges crossing unrelated nodes, and legends outside the viewBox. CJK text is measured at double width automatically.\n\nSet `meta.animation: \"trace\"` only when the user asks for motion or a presentation\u002Fdemo view. It adds lightweight SVG\u002FCSS trace animation to renderer-marked arrows and nodes, respects `prefers-reduced-motion`, and leaves the default static output unchanged.\n\n### Workflow\n\n```json\n{\n  \"schema_version\": 1,\n  \"diagram_type\": \"workflow\",\n  \"meta\": { \"title\": \"Release Workflow\", \"subtitle\": \"PR to production\", \"output\": \"release.html\" },\n  \"lanes\": [ { \"id\": \"dev\", \"label\": \"Developer\" }, { \"id\": \"ci\", \"label\": \"CI\" }, { \"id\": \"exceptions\", \"label\": \"Exception Handling\", \"variant\": \"exception\" } ],\n  \"phases\": [ { \"id\": \"intake\", \"label\": \"Intake\", \"fromCol\": 0, \"toCol\": 1 } ],\n  \"groups\": [ { \"id\": \"checks\", \"label\": \"Parallel checks\", \"lane\": \"ci\", \"fromCol\": 1, \"toCol\": 3, \"variant\": \"emphasis\" } ],\n  \"mainPath\": [\"pr\", \"build\"],\n  \"nodes\": [\n    { \"id\": \"pr\", \"lane\": \"dev\", \"col\": 0, \"type\": \"frontend\", \"label\": \"Open PR\", \"sublabel\": \"feature branch\" },\n    { \"id\": \"build\", \"lane\": \"ci\", \"col\": 1, \"type\": \"backend\", \"label\": \"Build\", \"sublabel\": \"lint + test\", \"tag\": \"blocking\" }\n  ],\n  \"edges\": [\n    { \"from\": \"pr\", \"to\": \"build\", \"label\": \"webhook\", \"variant\": \"emphasis\", \"fromSide\": \"bottom\", \"toSide\": \"top\", \"route\": \"drop\" }\n  ],\n  \"cards\": []\n}\n```\n\n**Layout budget**: 6 columns (`col` 0–5) at fixed x positions `[88, 220, 300, 430, 500, 625]` — columns 1↔2 and 3↔4 are only 70–80px apart, so default-width (92px) nodes in those adjacent columns of the same lane overlap; skip a column or shrink `width`. Lane content width is 640px. Omit `meta.viewBox` — the renderer sizes height to the lane count automatically. Use `phases` for top-of-diagram story beats, `groups` to frame parallel work or a branch inside one lane, and `lane.variant: \"exception\"` for error\u002Fretry\u002Ffallback lanes. `mainPath` is optional but recommended: list the happy-path node ids in order so the renderer can catch missing edges or accidental backward movement. Edge routes: `straight`, `drop` (bend between lanes; `bias` 0–1 picks where), `outside-right`, `return-left`, `bottom-channel`, `up-channel`, or explicit `via` points. Keep adjacent-step edges unlabeled; reserve labels for cross-lane transitions, approvals, async traces, and returns.\n\n### Sequence\n\n```json\n{\n  \"schema_version\": 1,\n  \"diagram_type\": \"sequence\",\n  \"meta\": { \"title\": \"Cache Miss Request\", \"subtitle\": \"auth and cache fallback\", \"output\": \"cache-miss.html\" },\n  \"participants\": [\n    { \"id\": \"web\", \"type\": \"frontend\", \"label\": \"Web App\", \"sublabel\": \"React UI\" },\n    { \"id\": \"api\", \"type\": \"backend\", \"label\": \"API\", \"sublabel\": \"handler\" }\n  ],\n  \"segments\": [ { \"from\": 160, \"to\": 320, \"label\": \"01 \u002F AUTH\" } ],\n  \"messages\": [\n    { \"from\": \"web\", \"to\": \"api\", \"y\": 200, \"label\": \"GET \u002Fdata\", \"variant\": \"emphasis\" },\n    { \"from\": \"api\", \"to\": \"web\", \"y\": 290, \"label\": \"200 JSON\", \"variant\": \"return\" }\n  ],\n  \"activations\": [ { \"participant\": \"api\", \"from\": 190, \"to\": 300, \"type\": \"backend\" } ],\n  \"cards\": []\n}\n```\n\n**Layout budget**: participants sit at x = 62 + index×108, so a 920-wide viewBox fits at most 8. Message `y` must stay within `[160, viewBox_height − 83]`; messages that share horizontal space need ≥28px vertical separation; arrows need ≥60px horizontal span. `segments[].from\u002Fto` and `activations[].from\u002Fto` are **y pixel coordinates**, not participant ids. A taller `meta.viewBox` (default `[920, 760]`) buys more timeline room. Keep labels short: \"GET \u002Fpath\", \"verify JWT\", \"cache miss\", \"200 JSON\".\n\n### Dataflow\n\n```json\n{\n  \"schema_version\": 1,\n  \"diagram_type\": \"dataflow\",\n  \"meta\": { \"title\": \"Product Analytics\", \"subtitle\": \"events to consumers\", \"output\": \"analytics.html\" },\n  \"stages\": [ { \"label\": \"Sources\" }, { \"label\": \"Ingest\" }, { \"label\": \"Store\" } ],\n  \"nodes\": [\n    { \"id\": \"web\", \"type\": \"frontend\", \"label\": \"Web App\", \"stage\": 0, \"row\": 0, \"sublabel\": \"clickstream\" },\n    { \"id\": \"kafka\", \"type\": \"messagebus\", \"label\": \"Kafka\", \"stage\": 1, \"row\": 0, \"tag\": \"accepted events\" }\n  ],\n  \"flows\": [\n    { \"from\": \"web\", \"to\": \"kafka\", \"label\": \"events\", \"classification\": \"PII touch\", \"variant\": \"emphasis\" }\n  ],\n  \"cards\": []\n}\n```\n\n**Layout budget**: 2–5 stages at x = 100 + stage×215; 5 rows (`row` 0–4) at y `[128, 242, 356, 470, 584]`; default node 112×58. Default viewBox `[940, 720]`. Flow labels are mandatory and asset-like (\"clickstream\", \"identity map\", \"feature vectors\"); put sensitivity in `classification` (\"PII touch\", \"approved only\", \"non-PII\"). Variants: `emphasis` = primary path, `security` = PII\u002Fpolicy\u002Fconsent, `dashed` = async\u002Fbatch.\n\n### Lifecycle\n\n```json\n{\n  \"schema_version\": 1,\n  \"diagram_type\": \"lifecycle\",\n  \"meta\": { \"title\": \"Agent Run Lifecycle\", \"subtitle\": \"states and terminal outcomes\", \"output\": \"agent-run.html\" },\n  \"lanes\": [\n    { \"id\": \"main\", \"label\": \"Lifecycle phases\" },\n    { \"id\": \"waiting\", \"label\": \"Interruptions\" },\n    { \"id\": \"terminal\", \"label\": \"Terminal exits\" }\n  ],\n  \"states\": [\n    { \"id\": \"queued\", \"type\": \"start\", \"label\": \"Queued\", \"lane\": \"main\", \"col\": 0, \"step\": \"01\" },\n    { \"id\": \"running\", \"type\": \"active\", \"label\": \"Executing\", \"lane\": \"main\", \"col\": 2, \"step\": \"02\" },\n    { \"id\": \"approval\", \"type\": \"waiting\", \"label\": \"Needs Approval\", \"lane\": \"waiting\", \"col\": 0 },\n    { \"id\": \"done\", \"type\": \"success\", \"label\": \"Completed\", \"lane\": \"terminal\", \"col\": 2 }\n  ],\n  \"transitions\": [\n    { \"from\": \"queued\", \"to\": \"running\", \"variant\": \"emphasis\" },\n    { \"from\": \"running\", \"to\": \"approval\", \"label\": \"needs approval\", \"variant\": \"security\", \"fromSide\": \"bottom\", \"toSide\": \"right\" },\n    { \"from\": \"running\", \"to\": \"done\", \"label\": \"success\", \"variant\": \"emphasis\", \"fromSide\": \"bottom\", \"toSide\": \"top\" }\n  ],\n  \"cards\": []\n}\n```\n\n**Layout budget — lane ids are semantic and reserved**: `main` is required and maps to the top phase band (cols 0–4); `terminal` maps to the bottom outcome band (cols 0–2); **every other lane id shares the single middle event band** (cols 0–2) — separate same-band states with different `col` or `yOffset`. Band headers render from your lane labels. Default viewBox `[980, 660]`. Keep transition labels event-like and sparse (\"retry\", \"timeout\", \"cancel\"); prefer state `tag`s, `step` numbers, and summary cards over label-heavy arrows. Put terminal states in the `terminal` lane so endings are unambiguous.\n\n### Per-mode deep guidance\n\nEach renderer has a README with its full design language (route presets, semantic types, story guidance): `renderers\u002Fworkflow\u002FREADME.md`, `renderers\u002Fsequence\u002FREADME.md`, `renderers\u002Fdataflow\u002FREADME.md`, `renderers\u002Flifecycle\u002FREADME.md`. Read the matching one before your first diagram of that mode in a session.\n\n## Architecture Mode\n\nArchitecture has the same read-schema-then-render loop as the other modes — prefer it. Hand-placed SVG is the fallback for when renderers can't run.\n\n```json\n{\n  \"schema_version\": 1,\n  \"diagram_type\": \"architecture\",\n  \"meta\": { \"title\": \"Sample Web App\", \"subtitle\": \"3-tier SaaS on AWS\", \"output\": \"web-app.html\" },\n  \"components\": [\n    { \"id\": \"users\", \"type\": \"external\", \"label\": \"Users\", \"sublabel\": \"Browser\", \"pos\": [40, 300] },\n    { \"id\": \"api\", \"type\": \"backend\", \"label\": \"API Server\", \"sublabel\": \"FastAPI :8000\", \"pos\": [460, 300] },\n    { \"id\": \"db\", \"type\": \"database\", \"label\": \"PostgreSQL\", \"sublabel\": \":5432\", \"pos\": [680, 300] }\n  ],\n  \"boundaries\": [\n    { \"kind\": \"region\", \"label\": \"AWS us-west-2\", \"wraps\": [\"api\", \"db\"] }\n  ],\n  \"connections\": [\n    { \"from\": \"users\", \"to\": \"api\", \"label\": \"HTTPS\", \"variant\": \"emphasis\" },\n    { \"from\": \"api\", \"to\": \"db\", \"label\": \"SQL\" }\n  ],\n  \"cards\": []\n}\n```\n\nRender: `node bin\u002Farchify.mjs render architecture \u003Cinput>.json \u003Coutput>.html`.\n\n**Free placement** — `pos: [x, y]` is the component's top-left; `size: [w, h]` defaults to `[120, 60]`. Unlike typed modes there is no lane\u002Fstage grid — asymmetric placement is yours to choose. `meta.viewBox` is optional (auto-fitted).\n\n**Grid placement (#8)** — when manual coordinates are painful, set semantic cells instead of doing arithmetic:\n\n```json\n{\n  \"layout\": { \"mode\": \"grid\", \"cols\": 7, \"origin\": [40, 100], \"gapX\": 24, \"gapY\": 48, \"cellW\": 120, \"cellH\": 60 },\n  \"components\": [\n    { \"id\": \"agents\", \"type\": \"frontend\", \"label\": \"Agent Hosts\", \"row\": 1, \"col\": 1 },\n    { \"id\": \"ir\", \"type\": \"messagebus\", \"label\": \"JSON IR\", \"row\": 1, \"col\": 2 }\n  ]\n}\n```\n\n`pos` still wins when present (override one cell). This is **not** auto-layout — spacing is fixed cell math. Example: `examples\u002Farchify-repo-grid.architecture.json`.\n\n**Inspect layout (#9)** — after editing JSON, dump computed boxes without opening HTML:\n\n```bash\nnode bin\u002Farchify.mjs inspect architecture my.architecture.json\n# or: node bin\u002Farchify.mjs validate architecture my.architecture.json --layout-json\n```\n\nOutput includes component rects, boundaries, connection point paths, and label positions.\n\n**The renderer does the mechanical work that used to be hand-tuned**, so you only choose coordinates and meaning:\n\n- **Free coordinates** — `pos: [x, y]` is the component's top-left; `size: [w, h]` defaults to `[120, 60]`. Unlike the typed modes there is no lane\u002Fstage grid — asymmetric placement is yours to choose. `meta.viewBox` is optional (auto-fitted to your components + a legend row).\n- **Grid placement** — optional `layout.mode: \"grid\"` with `row`\u002F`col` per component (see above). Not dagre; fixed cell spacing only.\n- **Boundaries from `wraps`** — list the component ids a `region` (dashed amber) or `security-group` (dashed rose) encloses; the renderer computes the box with correct 30\u002F50 padding automatically. Never hand-arithmetic a boundary again.\n- **Connections** route like edges (`variant`, `fromSide`\u002F`toSide`, `route: straight|orthogonal-h|orthogonal-v|auto`, `via`, `labelDx\u002FlabelDy\u002FlabelAt`). For a vertical labeled connection, push the label into the gap with `labelDy` (the validator will tell you if it lands on a box).\n- The renderer auto-emits the two-rect `c-mask` pattern, draws arrows before boxes (z-order), builds the legend from the component types you used, and **fails fast on component overlap, off-canvas components\u002Fboundaries, unknown wraps\u002Fconnection ids, label-vs-component collisions, and non-finite coordinates** — the same reliability the other four modes already had.\n\n### Hand-placed fallback (no renderer available)\n\nWhen Node\u002Fajv can't run, copy `assets\u002Ftemplate.html` and place SVG by hand. Study the worked diagram inside the template and `examples\u002Fweb-app.html` for coordinate idioms, follow the Design System below, and run the self-review checklist before delivering.\n\n### The Cardinal Rule: CSS classes, not inline colors\n\nThe theme toggle works by switching CSS custom properties. Hardcoded `fill=\"rgba(...)\"` or `stroke=\"#22d3ee\"` will NOT update on theme change. Always use the class system:\n\n```svg\n\u003Crect x=\"X\" y=\"Y\" width=\"W\" height=\"H\" rx=\"6\" class=\"c-mask\"\u002F>\n\u003Crect x=\"X\" y=\"Y\" width=\"W\" height=\"H\" rx=\"6\" class=\"c-backend\" stroke-width=\"1.5\"\u002F>\n\u003Ctext x=\"CX\" y=\"CY\" class=\"t-primary\" font-size=\"11\" font-weight=\"600\" text-anchor=\"middle\">API Server\u003C\u002Ftext>\n\u003Ctext x=\"CX\" y=\"CY+16\" class=\"t-muted\" font-size=\"9\" text-anchor=\"middle\">FastAPI :8000\u003C\u002Ftext>\n```\n\n### Design system\n\nComponent fills `c-frontend` (clients\u002FUI), `c-backend` (services\u002FAPIs), `c-database` (stores\u002Fcaches), `c-cloud` (managed infra), `c-security` (auth\u002Fsecrets), `c-messagebus` (Kafka\u002Fqueues), `c-external` (3rd parties); text accents `t-\u003Csame>` plus neutrals `t-primary` \u002F `t-muted` \u002F `t-dim`. Arrows `a-default`, `a-emphasis` (hot path), `a-security` (dashed), `a-dashed` (async) — always set `stroke-width` and pair `marker-end=\"url(#arrowhead[-variant])\"` with the matching class. Boundaries: `c-security-group` (dashed rose), `c-region` (dashed amber), `c-lane` (swimlane).\n\nTypography inherits JetBrains Mono from the SVG root. Sizes: 11–12px component names, 9px sublabels, 8px annotations, 7px tiny labels.\n\n### Hard layout rules\n\n- **Two-rect pattern everywhere**: opaque `c-mask` rect first, styled `c-\u003Ctype>` rect on top — semi-transparent fills otherwise let arrows bleed through.\n- **Arrows before components** in document order (SVG paints in order; arrows must sit behind boxes).\n- **Vertical stacking**: ≥40px gap between components; inline connectors (message buses, 20px tall) live inside the gap, never overlapping boxes.\n- **Boundary padding**: boundary `y` = inner `y` − 30, boundary `height` = inner `height` + 50, label baseline 18px below the boundary top.\n- **Legend placement**: outside ALL boundary boxes, ≥20px below the lowest one; grow the viewBox if needed.\n\n### Self-review checklist (run before delivering)\n\n1. `grep -E 'fill=\"(#|rgb)|stroke=\"(#|rgb)' out.html` inside the SVG returns nothing except the template's own defs (Cardinal Rule).\n2. Every `c-\u003Ctype>` rect has an identical-geometry `c-mask` rect immediately before it.\n3. All `\u003Cline>`\u002F`\u003Cpath>` arrows appear before all component rects in document order.\n4. Compute max(y + height) over all SVG elements: viewBox height must exceed it by ≥20px; same for x\u002Fwidth.\n5. Legend y is below every boundary's y + height.\n6. The `.toolbar`, `\u003Cscript>` blocks, and `:root` \u002F `[data-theme]` CSS are untouched — they ARE the theme toggle and export menu.\n\n## Output\n\nA single self-contained `.html`: embedded CSS (Google Fonts loads async and degrades to system monospace offline), inline SVG, ~19KB embedded JS for theme + export. It renders directly in any modern browser. Raster exports render natively at up to 4× the viewBox (large diagrams step down to 3×\u002F2× to stay under canvas limits); the SVG download is dual-theme self-contained and follows the host's `prefers-color-scheme` (manual override via `svg[data-theme=\"...\"]`).\n","# Archify Skill\n\nCreate professional technical diagrams as self-contained HTML files with inline SVG, a theme toggle, and a built-in image\u002FSVG export menu.\n\nEvery diagram ships with a **dark\u002Flight theme toggle** (persists in `localStorage`, respects `prefers-color-scheme`), an **export menu** (copy PNG to clipboard; download PNG\u002FJPEG\u002FWebP rasterized natively at up to 4× resolution; download a **dual-theme SVG** that follows the embedding host's `prefers-color-scheme` — ideal for GitHub READMEs), and a **CSS-variable color system** that keeps both themes consistent.\n\n## Setup\n\nNo dependency installation is required. The distributed skill includes standalone validators compiled from all five JSON Schemas, so schema and layout validation work immediately after installation. The generated HTML and the renderer runtime are both dependency-free.\n\nRun `node bin\u002Farchify.mjs doctor` to verify an installation. Run `node bin\u002Farchify.mjs demo [output-directory]` to generate a ready-to-open example before creating the first custom diagram.\n\nIf you have no shell access at all (e.g. the skill was added as project knowledge), fall back to architecture mode for every request: hand-place SVG into `assets\u002Ftemplate.html` following the Design System below, and run the self-review checklist before delivering.\n\n## Choosing a Diagram Type\n\n| Type | Use for | How |\n|------|---------|-----|\n| `architecture` | System components, cloud resources, services, security boundaries, infrastructure | `renderers\u002Farchitecture\u002Frender-architecture.mjs` + JSON (or hand-place SVG when renderers can't run) |\n| `workflow` | Technical flows, approval gates, tool calls, runbooks, CI\u002FCD, incident response | `renderers\u002Fworkflow\u002Frender-workflow.mjs` + JSON |\n| `sequence` | API call chains, request lifecycles, cache fallback, async traces, return paths | `renderers\u002Fsequence\u002Frender-sequence.mjs` + JSON |\n| `dataflow` | Pipelines, ETL\u002FELT, PII isolation, lineage, warehouse sync, consumers | `renderers\u002Fdataflow\u002Frender-dataflow.mjs` + JSON |\n| `lifecycle` | State machines, status transitions, wait states, retries, terminal states | `renderers\u002Flifecycle\u002Frender-lifecycle.mjs` + JSON |\n\nTrigger phrases: \"architecture\u002Fsystem\u002Fcloud diagram\" → `architecture` (unless clearly process-oriented). \"workflow\u002Fflow\u002Fprocess\u002Frunbook\u002Fapproval\u002FCI-CD\u002Fincident\" → `workflow`. \"sequence\u002Finteraction\u002Fcall chain\u002Fwho calls whom\" → `sequence`. \"data flow\u002Fpipeline\u002FETL\u002Flineage\u002FPII\u002Fgovernance\" → `dataflow`. \"state\u002Fstatus\u002Flifecycle\u002Fstate machine\u002Fretry\u002Fterminal\" → `lifecycle`.\n\n## Mermaid as an Input Dialect\n\nWhen the user pastes Mermaid code, do NOT try to render or parse it mechanically — read it for structure and **lay out from scratch** in the matching archify mode:\n\n| Mermaid | Archify mode | Mapping |\n|---------|--------------|---------|\n| `flowchart` \u002F `graph` | `workflow` (or `architecture` if it's a component map) | `subgraph` → lane or region boundary; node shape `{}` (diamond) → decision\u002Fsecurity node; `-->` labels → edge labels (use sparingly); `classDef`\u002F`style` → nearest semantic type |\n| `sequenceDiagram` | `sequence` | `participant` → participants (pick semantic `type` from the name); `->>` → message, `-->>` → `return` variant; `Note` → message `note`; `rect` blocks → segments |\n| `stateDiagram` | `lifecycle` | states → states (pick `start`\u002F`active`\u002F`waiting`\u002F`success`\u002F`failure` from names); `[*]` start\u002Fend → `start` type \u002F `terminal` lane; transition labels → event-like labels |\n\nDrop Mermaid styling; keep only the topology and meaning. You choose grouping, lane order, and what deserves emphasis — that judgment is the product.\n\n## Layout principles (read before placing)\n\nArchify's readability comes from **spatial narrative**, not from drawing every dependency as an arrow. Before you write coordinates or edge lists, plan one clear story:\n\n1. **One main path** — left → right (architecture) or lane → column (workflow). The reader should trace the happy path without crossing lines.\n2. **Few labeled edges** — label only cross-boundary or non-obvious transitions on the main path. Adjacent steps stay unlabeled.\n3. **Short side branches** — permissions, storage, bots, CI: connect **up or down** from the nearest node on the main path. Never route a secondary edge diagonally across unrelated components.\n4. **Cards for detail** — policies, tech stack notes, and \"also connects to X\" belong in summary cards, not as extra arrows.\n5. **Mode fit** — process \u002F approval \u002F tool-call stories → `workflow` or `sequence`. Component maps with ≤12 nodes → `architecture`. If the diagram needs 20+ edges, remove edges until the main path is obvious.\n\nWorked examples on this pattern: `examples\u002Farchify-repo.architecture.json` (this repo) and `examples\u002Fmaka-architecture.architecture.json` (third-party desktop app).\n\nWhen validation fails on label overlap, read the **Suggested fix** lines (coordinates \u002F `labelAt` \u002F `labelDy`) and apply them directly — do not guess offsets blindly.\n\n## Renderer Modes (architecture \u002F workflow \u002F sequence \u002F dataflow \u002F lifecycle)\n\nAll five modes follow the same loop:\n\n1. **Read first**: the schema (`schemas\u002F\u003Ctype>.schema.json`) and the complete worked example (`examples\u002F*.{architecture,workflow,sequence,dataflow,lifecycle}.json`) — copy its patterns instead of guessing field shapes.\n2. Write `\u003Cname>.\u003Ctype>.json`.\n3. Render: `node bin\u002Farchify.mjs render \u003Ctype> \u003Cinput>.json \u003Coutput>.html` (paths relative to this skill's folder).\n4. Validate the generated artifact: `node bin\u002Farchify.mjs validate \u003Ctype> \u003Cinput>.json --json`, or check an existing HTML file with `node bin\u002Farchify.mjs check \u003Coutput>.html`. This catches malformed SVG output, non-finite SVG values, two-point diagonal arrows, and arrows crossing the legend.\n5. If either step fails, the error names the JSON path or the fix (thresholds, valid ranges, which knob to change). Fix the JSON and re-run; never edit the renderer.\n\nSchema violations exit non-zero with path-prefixed messages like `\u002Fnodes\u002F3 (id\u002Flabel: \"router\") must NOT have additional properties`. The renderers additionally fail fast on layout problems: node\u002Fstate overlap (including cross-lane), labels colliding with nodes or other labels, labels wider than their node, out-of-range columns\u002Frows, too-short edges, workflow edges crossing unrelated nodes, and legends outside the viewBox. CJK text is measured at double width automatically.\n\nSet `meta.animation: \"trace\"` only when the user asks for motion or a presentation\u002Fdemo view. It adds lightweight SVG\u002FCSS trace animation to renderer-marked arrows and nodes, respects `prefers-reduced-motion`, and leaves the default static output unchanged.\n\n### Workflow\n\n```json\n{\n  \"schema_version\": 1,\n  \"diagram_type\": \"workflow\",\n  \"meta\": { \"title\": \"Release Workflow\", \"subtitle\": \"PR to production\", \"output\": \"release.html\" },\n  \"lanes\": [ { \"id\": \"dev\", \"label\": \"Developer\" }, { \"id\": \"ci\", \"label\": \"CI\" }, { \"id\": \"exceptions\", \"label\": \"Exception Handling\", \"variant\": \"exception\" } ],\n  \"phases\": [ { \"id\": \"intake\", \"label\": \"Intake\", \"fromCol\": 0, \"toCol\": 1 } ],\n  \"groups\": [ { \"id\": \"checks\", \"label\": \"Parallel checks\", \"lane\": \"ci\", \"fromCol\": 1, \"toCol\": 3, \"variant\": \"emphasis\" } ],\n  \"mainPath\": [\"pr\", \"build\"],\n  \"nodes\": [\n    { \"id\": \"pr\", \"lane\": \"dev\", \"col\": 0, \"type\": \"frontend\", \"label\": \"Open PR\", \"sublabel\": \"feature branch\" },\n    { \"id\": \"build\", \"lane\": \"ci\", \"col\": 1, \"type\": \"backend\", \"label\": \"Build\", \"sublabel\": \"lint + test\", \"tag\": \"blocking\" }\n  ],\n  \"edges\": [\n    { \"from\": \"pr\", \"to\": \"build\", \"label\": \"webhook\", \"variant\": \"emphasis\", \"fromSide\": \"bottom\", \"toSide\": \"top\", \"route\": \"drop\" }\n  ],\n  \"cards\": []\n}\n```\n\n**Layout budget**: 6 columns (`col` 0–5) at fixed x positions `[88, 220, 300, 430, 500, 625]` — columns 1↔2 and 3↔4 are only 70–80px apart, so default-width (92px) nodes in those adjacent columns of the same lane overlap; skip a column or shrink `width`. Lane content width is 640px. Omit `meta.viewBox` — the renderer sizes height to the lane count automatically. Use `phases` for top-of-diagram story beats, `groups` to frame parallel work or a branch inside one lane, and `lane.variant: \"exception\"` for error\u002Fretry\u002Ffallback lanes. `mainPath` is optional but recommended: list the happy-path node ids in order so the renderer can catch missing edges or accidental backward movement. Edge routes: `straight`, `drop` (bend between lanes; `bias` 0–1 picks where), `outside-right`, `return-left`, `bottom-channel`, `up-channel`, or explicit `via` points. Keep adjacent-step edges unlabeled; reserve labels for cross-lane transitions, approvals, async traces, and returns.\n\n### Sequence\n\n```json\n{\n  \"schema_version\": 1,\n  \"diagram_type\": \"sequence\",\n  \"meta\": { \"title\": \"Cache Miss Request\", \"subtitle\": \"auth and cache fallback\", \"output\": \"cache-miss.html\" },\n  \"participants\": [\n    { \"id\": \"web\", \"type\": \"frontend\", \"label\": \"Web App\", \"sublabel\": \"React UI\" },\n    { \"id\": \"api\", \"type\": \"backend\", \"label\": \"API\", \"sublabel\": \"handler\" }\n  ],\n  \"segments\": [ { \"from\": 160, \"to\": 320, \"label\": \"01 \u002F AUTH\" } ],\n  \"messages\": [\n    { \"from\": \"web\", \"to\": \"api\", \"y\": 200, \"label\": \"GET \u002Fdata\", \"variant\": \"emphasis\" },\n    { \"from\": \"api\", \"to\": \"web\", \"y\": 290, \"label\": \"200 JSON\", \"variant\": \"return\" }\n  ],\n  \"activations\": [ { \"participant\": \"api\", \"from\": 190, \"to\": 300, \"type\": \"backend\" } ],\n  \"cards\": []\n}\n```\n\n**Layout budget**: participants sit at x = 62 + index×108, so a 920-wide viewBox fits at most 8. Message `y` must stay within `[160, viewBox_height − 83]`; messages that share horizontal space need ≥28px vertical separation; arrows need ≥60px horizontal span. `segments[].from\u002Fto` and `activations[].from\u002Fto` are **y pixel coordinates**, not participant ids. A taller `meta.viewBox` (default `[920, 760]`) buys more timeline room. Keep labels short: \"GET \u002Fpath\", \"verify JWT\", \"cache miss\", \"200 JSON\".\n\n### Dataflow\n\n```json\n{\n  \"schema_version\": 1,\n  \"diagram_type\": \"dataflow\",\n  \"meta\": { \"title\": \"Product Analytics\", \"subtitle\": \"events to consumers\", \"output\": \"analytics.html\" },\n  \"stages\": [ { \"label\": \"Sources\" }, { \"label\": \"Ingest\" }, { \"label\": \"Store\" } ],\n  \"nodes\": [\n    { \"id\": \"web\", \"type\": \"frontend\", \"label\": \"Web App\", \"stage\": 0, \"row\": 0, \"sublabel\": \"clickstream\" },\n    { \"id\": \"kafka\", \"type\": \"messagebus\", \"label\": \"Kafka\", \"stage\": 1, \"row\": 0, \"tag\": \"accepted events\" }\n  ],\n  \"flows\": [\n    { \"from\": \"web\", \"to\": \"kafka\", \"label\": \"events\", \"classification\": \"PII touch\", \"variant\": \"emphasis\" }\n  ],\n  \"cards\": []\n}\n```\n\n**Layout budget**: 2–5 stages at x = 100 + stage×215; 5 rows (`row` 0–4) at y `[128, 242, 356, 470, 584]`; default node 112×58. Default viewBox `[940, 720]`. Flow labels are mandatory and asset-like (\"clickstream\", \"identity map\", \"feature vectors\"); put sensitivity in `classification` (\"PII touch\", \"approved only\", \"non-PII\"). Variants: `emphasis` = primary path, `security` = PII\u002Fpolicy\u002Fconsent, `dashed` = async\u002Fbatch.\n\n### Lifecycle\n\n```json\n{\n  \"schema_version\": 1,\n  \"diagram_type\": \"lifecycle\",\n  \"meta\": { \"title\": \"Agent Run Lifecycle\", \"subtitle\": \"states and terminal outcomes\", \"output\": \"agent-run.html\" },\n  \"lanes\": [\n    { \"id\": \"main\", \"label\": \"Lifecycle phases\" },\n    { \"id\": \"waiting\", \"label\": \"Interruptions\" },\n    { \"id\": \"terminal\", \"label\": \"Terminal exits\" }\n  ],\n  \"states\": [\n    { \"id\": \"queued\", \"type\": \"start\", \"label\": \"Queued\", \"lane\": \"main\", \"col\": 0, \"step\": \"01\" },\n    { \"id\": \"running\", \"type\": \"active\", \"label\": \"Executing\", \"lane\": \"main\", \"col\": 2, \"step\": \"02\" },\n    { \"id\": \"approval\", \"type\": \"waiting\", \"label\": \"Needs Approval\", \"lane\": \"waiting\", \"col\": 0 },\n    { \"id\": \"done\", \"type\": \"success\", \"label\": \"Completed\", \"lane\": \"terminal\", \"col\": 2 }\n  ],\n  \"transitions\": [\n    { \"from\": \"queued\", \"to\": \"running\", \"variant\": \"emphasis\" },\n    { \"from\": \"running\", \"to\": \"approval\", \"label\": \"needs approval\", \"variant\": \"security\", \"fromSide\": \"bottom\", \"toSide\": \"right\" },\n    { \"from\": \"running\", \"to\": \"done\", \"label\": \"success\", \"variant\": \"emphasis\", \"fromSide\": \"bottom\", \"toSide\": \"top\" }\n  ],\n  \"cards\": []\n}\n```\n\n**Layout budget — lane ids are semantic and reserved**: `main` is required and maps to the top phase band (cols 0–4); `terminal` maps to the bottom outcome band (cols 0–2); **every other lane id shares the single middle event band** (cols 0–2) — separate same-band states with different `col` or `yOffset`. Band headers render from your lane labels. Default viewBox `[980, 660]`. Keep transition labels event-like and sparse (\"retry\", \"timeout\", \"cancel\"); prefer state `tag`s, `step` numbers, and summary cards over label-heavy arrows. Put terminal states in the `terminal` lane so endings are unambiguous.\n\n### Per-mode deep guidance\n\nEach renderer has a README with its full design language (route presets, semantic types, story guidance): `renderers\u002Fworkflow\u002FREADME.md`, `renderers\u002Fsequence\u002FREADME.md`, `renderers\u002Fdataflow\u002FREADME.md`, `renderers\u002Flifecycle\u002FREADME.md`. Read the matching one before your first diagram of that mode in a session.\n\n## Architecture Mode\n\nArchitecture has the same read-schema-then-render loop as the other modes — prefer it. Hand-placed SVG is the fallback for when renderers can't run.\n\n```json\n{\n  \"schema_version\": 1,\n  \"diagram_type\": \"architecture\",\n  \"meta\": { \"title\": \"Sample Web App\", \"subtitle\": \"3-tier SaaS on AWS\", \"output\": \"web-app.html\" },\n  \"components\": [\n    { \"id\": \"users\", \"type\": \"external\", \"label\": \"Users\", \"sublabel\": \"Browser\", \"pos\": [40, 300] },\n    { \"id\": \"api\", \"type\": \"backend\", \"label\": \"API Server\", \"sublabel\": \"FastAPI :8000\", \"pos\": [460, 300] },\n    { \"id\": \"db\", \"type\": \"database\", \"label\": \"PostgreSQL\", \"sublabel\": \":5432\", \"pos\": [680, 300] }\n  ],\n  \"boundaries\": [\n    { \"kind\": \"region\", \"label\": \"AWS us-west-2\", \"wraps\": [\"api\", \"db\"] }\n  ],\n  \"connections\": [\n    { \"from\": \"users\", \"to\": \"api\", \"label\": \"HTTPS\", \"variant\": \"emphasis\" },\n    { \"from\": \"api\", \"to\": \"db\", \"label\": \"SQL\" }\n  ],\n  \"cards\": []\n}\n```\n\nRender: `node bin\u002Farchify.mjs render architecture \u003Cinput>.json \u003Coutput>.html`.\n\n**Free placement** — `pos: [x, y]` is the component's top-left; `size: [w, h]` defaults to `[120, 60]`. Unlike typed modes there is no lane\u002Fstage grid — asymmetric placement is yours to choose. `meta.viewBox` is optional (auto-fitted).\n\n**Grid placement (#8)** — when manual coordinates are painful, set semantic cells instead of doing arithmetic:\n\n```json\n{\n  \"layout\": { \"mode\": \"grid\", \"cols\": 7, \"origin\": [40, 100], \"gapX\": 24, \"gapY\": 48, \"cellW\": 120, \"cellH\": 60 },\n  \"components\": [\n    { \"id\": \"agents\", \"type\": \"frontend\", \"label\": \"Agent Hosts\", \"row\": 1, \"col\": 1 },\n    { \"id\": \"ir\", \"type\": \"messagebus\", \"label\": \"JSON IR\", \"row\": 1, \"col\": 2 }\n  ]\n}\n```\n\n`pos` still wins when present (override one cell). This is **not** auto-layout — spacing is fixed cell math. Example: `examples\u002Farchify-repo-grid.architecture.json`.\n\n**Inspect layout (#9)** — after editing JSON, dump computed boxes without opening HTML:\n\n```bash\nnode bin\u002Farchify.mjs inspect architecture my.architecture.json\n# or: node bin\u002Farchify.mjs validate architecture my.architecture.json --layout-json\n```\n\nOutput includes component rects, boundaries, connection point paths, and label positions.\n\n**The renderer does the mechanical work that used to be hand-tuned**, so you only choose coordinates and meaning:\n\n- **Free coordinates** — `pos: [x, y]` is the component's top-left; `size: [w, h]` defaults to `[120, 60]`. Unlike the typed modes there is no lane\u002Fstage grid — asymmetric placement is yours to choose. `meta.viewBox` is optional (auto-fitted to your components + a legend row).\n- **Grid placement** — optional `layout.mode: \"grid\"` with `row`\u002F`col` per component (see above). Not dagre; fixed cell spacing only.\n- **Boundaries from `wraps`** — list the component ids a `region` (dashed amber) or `security-group` (dashed rose) encloses; the renderer computes the box with correct 30\u002F50 padding automatically. Never hand-arithmetic a boundary again.\n- **Connections** route like edges (`variant`, `fromSide`\u002F`toSide`, `route: straight|orthogonal-h|orthogonal-v|auto`, `via`, `labelDx\u002FlabelDy\u002FlabelAt`). For a vertical labeled connection, push the label into the gap with `labelDy` (the validator will tell you if it lands on a box).\n- The renderer auto-emits the two-rect `c-mask` pattern, draws arrows before boxes (z-order), builds the legend from the component types you used, and **fails fast on component overlap, off-canvas components\u002Fboundaries, unknown wraps\u002Fconnection ids, label-vs-component collisions, and non-finite coordinates** — the same reliability the other four modes already had.\n\n### Hand-placed fallback (no renderer available)\n\nWhen Node\u002Fajv can't run, copy `assets\u002Ftemplate.html` and place SVG by hand. Study the worked diagram inside the template and `examples\u002Fweb-app.html` for coordinate idioms, follow the Design System below, and run the self-review checklist before delivering.\n\n### The Cardinal Rule: CSS classes, not inline colors\n\nThe theme toggle works by switching CSS custom properties. Hardcoded `fill=\"rgba(...)\"` or `stroke=\"#22d3ee\"` will NOT update on theme change. Always use the class system:\n\n```svg\n\u003Crect x=\"X\" y=\"Y\" width=\"W\" height=\"H\" rx=\"6\" class=\"c-mask\"\u002F>\n\u003Crect x=\"X\" y=\"Y\" width=\"W\" height=\"H\" rx=\"6\" class=\"c-backend\" stroke-width=\"1.5\"\u002F>\n\u003Ctext x=\"CX\" y=\"CY\" class=\"t-primary\" font-size=\"11\" font-weight=\"600\" text-anchor=\"middle\">API Server\u003C\u002Ftext>\n\u003Ctext x=\"CX\" y=\"CY+16\" class=\"t-muted\" font-size=\"9\" text-anchor=\"middle\">FastAPI :8000\u003C\u002Ftext>\n```\n\n### Design system\n\nComponent fills `c-frontend` (clients\u002FUI), `c-backend` (services\u002FAPIs), `c-database` (stores\u002Fcaches), `c-cloud` (managed infra), `c-security` (auth\u002Fsecrets), `c-messagebus` (Kafka\u002Fqueues), `c-external` (3rd parties); text accents `t-\u003Csame>` plus neutrals `t-primary` \u002F `t-muted` \u002F `t-dim`. Arrows `a-default`, `a-emphasis` (hot path), `a-security` (dashed), `a-dashed` (async) — always set `stroke-width` and pair `marker-end=\"url(#arrowhead[-variant])\"` with the matching class. Boundaries: `c-security-group` (dashed rose), `c-region` (dashed amber), `c-lane` (swimlane).\n\nTypography inherits JetBrains Mono from the SVG root. Sizes: 11–12px component names, 9px sublabels, 8px annotations, 7px tiny labels.\n\n### Hard layout rules\n\n- **Two-rect pattern everywhere**: opaque `c-mask` rect first, styled `c-\u003Ctype>` rect on top — semi-transparent fills otherwise let arrows bleed through.\n- **Arrows before components** in document order (SVG paints in order; arrows must sit behind boxes).\n- **Vertical stacking**: ≥40px gap between components; inline connectors (message buses, 20px tall) live inside the gap, never overlapping boxes.\n- **Boundary padding**: boundary `y` = inner `y` − 30, boundary `height` = inner `height` + 50, label baseline 18px below the boundary top.\n- **Legend placement**: outside ALL boundary boxes, ≥20px below the lowest one; grow the viewBox if needed.\n\n### Self-review checklist (run before delivering)\n\n1. `grep -E 'fill=\"(#|rgb)|stroke=\"(#|rgb)' out.html` inside the SVG returns nothing except the template's own defs (Cardinal Rule).\n2. Every `c-\u003Ctype>` rect has an identical-geometry `c-mask` rect immediately before it.\n3. All `\u003Cline>`\u002F`\u003Cpath>` arrows appear before all component rects in document order.\n4. Compute max(y + height) over all SVG elements: viewBox height must exceed it by ≥20px; same for x\u002Fwidth.\n5. Legend y is below every boundary's y + height.\n6. The `.toolbar`, `\u003Cscript>` blocks, and `:root` \u002F `[data-theme]` CSS are untouched — they ARE the theme toggle and export menu.\n\n## Output\n\nA single self-contained `.html`: embedded CSS (Google Fonts loads async and degrades to system monospace offline), inline SVG, ~19KB embedded JS for theme + export. It renders directly in any modern browser. Raster exports render natively at up to 4× the viewBox (large diagrams step down to 3×\u002F2× to stay under canvas limits); the SVG download is dual-theme self-contained and follows the host's `prefers-color-scheme` (manual override via `svg[data-theme=\"...\"]`).\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"version":26,"based_on":27},"tt-a1i","2.11","Cocoon-AI\u002Farchitecture-diagram-generator (MIT, v1.0)","main","8859218955d9504cd18b59e7892100718039d3b4","data\u002Fskills\u002Ftt-a1i-archify\u002Farchify\u002Farchify",1,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper","https:\u002F\u002Fgithub.com\u002Fom-scogo","SDE-1 @ Scogo ","2026-07-18 12:22:46",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add om-scogo\u002Fskillsh-scraper --skill archify",{"tool":42,"command":43},"bunx","bunx skills add om-scogo\u002Fskillsh-scraper --skill archify",{"tool":45,"command":46},"pnpm","pnpm dlx skills add om-scogo\u002Fskillsh-scraper --skill archify","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Ftt-a1i-archify\u002Farchify\u002Farchify\u002FSKILL.md",true,[],[51,58,63,70,75,82],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7D6MC9FAAEV4CMNYX8W7JTG","arxiv-search","Search arXiv physics, math, and computer science preprints using natural language queries. Powered by Valyu semantic search.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002Fskills\u002Farxiv-search\u002FSKILL.md",[],[],{"skillNo":59,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7D6M85CKKN87TA98VCQV4H7","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002FSkill.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7D4ZTCS4DR3CE4JY06X84T2","working-with-legacy-code","Safely change and test untested codebases using Feathers' \"Working Effectively with Legacy Code\". Use when the user mentions \"legacy code\", \"no tests\", \"untested codebase\", \"how do I test this\", \"seams\", \"characterization tests\", \"golden master\", \"sprout method\", \"afraid to change this code\", \"monster method\", \"dependency breaking\", or \"inherited a messy codebase\". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout\u002Fwrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002Fworking-with-legacy-code\u002FSKILL.md",[],[],{"skillNo":71,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7D4ZHZKJD2RSNGAF63V14P4","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002FSkill.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7D4ZB4CJBFW5JE67CPH2QRV","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", \"type hierarchy\", \"variable fonts\", \"FOUT\u002FFOIT\", \"typographic scale\", or \"the text is hard to read\". Also trigger when choosing between system fonts and web fonts, optimizing font-loading performance, or designing readable long-form content. Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":83,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7D4Z4MVYVY3NMJ18BNV6WNA","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002FSkill.md",[],[]]