{"id":100100,"plugin_id":"plugin_asdk_app_6ae72d9926148191be288bf70fbcf8ee","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-11-17T00:12:43.181Z","digest":"9e5d99701f77371ac3d3ba571dbfcfbba6200476f68a273e170adb7354372272","against":null,"payload":{"description":"Author and edit nifdi block-and-connector diagrams — architecture diagrams, flowcharts, system and network diagrams — through a nifdi MCP server: the hosted one (server \"nifdi\", diagrams in the nifdi cloud, a Pro account) or the local one (server \"nifdi-diagram\", .nifdi.svg files in the project). Use when building or changing a diagram of boxes and arrows, recreating one from a picture or a written description, or when a task mentions nifdi, a nifdi.app diagram link, .nifdi.svg files, diagrams-as-code, or the nifdi tools. Covers the block model, containment versus attachment, the placement grammar for labels and badges, the semantic style vocabulary, connectors and their labels, and the render-and-fix loop that keeps what you build looking like what you meant.","included_files":[{"relative_path":"references/authoring-model.md","size_in_bytes":6485},{"relative_path":"references/cloud.md","size_in_bytes":3121},{"relative_path":"references/connectors.md","size_in_bytes":4901},{"relative_path":"references/local-workspace.md","size_in_bytes":2067},{"relative_path":"references/placement.md","size_in_bytes":7004},{"relative_path":"references/styling.md","size_in_bytes":6146},{"relative_path":"references/workflow.md","size_in_bytes":5704}],"name":"nifdi","skill_md_contents":"---\nname: nifdi\ndescription: Author and edit nifdi block-and-connector diagrams — architecture diagrams, flowcharts, system and network diagrams — through a nifdi MCP server: the hosted one (server \"nifdi\", diagrams in the nifdi cloud, a Pro account) or the local one (server \"nifdi-diagram\", .nifdi.svg files in the project). Use when building or changing a diagram of boxes and arrows, recreating one from a picture or a written description, or when a task mentions nifdi, a nifdi.app diagram link, .nifdi.svg files, diagrams-as-code, or the nifdi tools. Covers the block model, containment versus attachment, the placement grammar for labels and badges, the semantic style vocabulary, connectors and their labels, and the render-and-fix loop that keeps what you build looking like what you meant.\nlicense: Apache-2.0\nmetadata:\n  nifdi-mcp-version: \"0.3.0\"\n---\n\n# Building diagrams with nifdi\n\nnifdi is a **structured** diagram editor: containers, text and icons, wired by paths.\nReach for it when the picture is boxes and arrows. It is not a vector canvas — the server\nowns layout, and completes and repairs geometry rather than honouring pixel-exact\ncomposition. Fighting that is the single most expensive mistake available here.\n\n## The model in one screen\n\nA diagram is a tree of **blocks** plus **paths** that wire them.\n\n- **container** — a box that holds other blocks. Nesting is containment: a `<container>`\n  holds its children directly, and there is no nested `<canvas>`.\n- **text** — words.\n- **icon** — artwork, referenced by `asset=\"library:name\"` (find one with `search_icons`)\n  or `asset=\"#asset-…\"` for artwork already in the diagram.\n- **path** — a connector between two blocks, wired through `<from>` and `<to>`.\n\nBlocks carry `pos=\"x y\"` and `size=\"w h\"`, **both optional**. Omitted geometry is completed\nby the server; a declared `pos` arranges blocks *against one another* rather than fixing\ncanvas coordinates. Style is a `<style>` block of `selector { property: value; }` rules with\nnifdi's own semantic property names — not CSS.\n\n## Keep the diagram id\n\nThere is no current diagram. `create_diagram` returns the id every diagram-scoped tool needs;\nfor an existing diagram, get that id from `list_diagrams`. Keep it and pass it as `diagramId`\non every call that reads, edits, preflights or renders that diagram. A pasted editor URL is also\naccepted wherever `diagramId` is taken.\n\nWhat an id looks like, and what it means, depends on where the server keeps diagrams. Read one\nof these before your first `create_diagram`:\n\n| The tools come from | Diagrams are | Read |\n|---|---|---|\n| the server named `nifdi`, at `https://nifdi.app/api/mcp` | in the nifdi cloud; ids are short codes such as `Kq3vR8xTn2Wd` | [references/cloud.md](references/cloud.md) |\n| the server named `nifdi-diagram`, run by `npx @nifdi/mcp` | `.nifdi.svg` files in the project; ids are paths such as `design/system.nifdi.svg` | [references/local-workspace.md](references/local-workspace.md) |\n\nIf both servers are connected, a diagram that belongs in the repository is local, and one the\nperson shares or edits in the browser is cloud. Never copy a diagram from one to the other unless\nasked.\n\n```xml tool=insert\n<container id=\"vpc\" size=\"400 240\"><text place=\"on top-edge\">Production VPC</text>\n  <icon id=\"api\" asset=\"aws:amazon-ec2\"><text>API server</text></icon></container>\n```\n\nThat fragment shows the two relationships that matter, and they are **different**:\n\n- `<icon>` is **inside** the container — containment. It lives in the box.\n- `<text place=\"on top-edge\">` is **attached** to the container — it is the box's title,\n  riding its border, and it travels with the box.\n\n## The one rule to internalise: attach labels, never place them beside\n\nText sitting beside, above or below an icon in the picture you are recreating **is that\nicon's label**. A name across a container's top border **is that container's attached\nchild**. Author both as nested elements naming a `place` — never as a sibling text block\npositioned next to the host.\n\nThis is not a style preference. Attachment is what makes a label travel when anything moves,\nre-routes or reflows. A sibling text block is left behind by the first push, the first\nre-route, the first resize — and then you pay to reposition it, every time, forever.\n\n```xml tool=insert\n<icon asset=\"aws:amazon-ec2\"><text>Amazon EC2</text></icon>\n```\n\nA bare `<text>` inside an `<icon>` is the default caption below it. Name a side for anything\nelse. Connectors take labels the same way — a `<text>` nested inside the `<path>`.\n\nIf you have already authored a free text block beside an icon, that is repairable: delete it\nand `set_text` the icon with `place` naming that side.\n\n→ Full placement grammar, the slot rules, and the recipes (icon with a caption *and* a\ncorner badge, a title astride a border that carries its own label): **[references/placement.md](references/placement.md)**\n\n## How to build one\n\nWork incrementally and look at what you made.\n\n1. **`create_diagram`** and keep the returned id, or use **`list_diagrams`** to find an\n   existing one's id.\n2. Pass that **`diagramId`** to every diagram-scoped call below. **`insert`** blocks — a\n   fragment at a time, nested as the picture nests. Not\n   `set_diagram`; reserve that for replacing a whole diagram.\n3. **`connect`** to wire them.\n4. **`set_style`** to style them. It is the most forgiving styling path and reports back\n   every declaration it skipped.\n5. **`render_diagram`** — and *look*.\n6. Fix what you see, and render again before you call it finished.\n\nStep 5 is not optional. You are building something visual, and layout, overlap, routing, a\ncaption that landed on the wrong host and a colour that reads wrong are all things the XML\ncan be right about and the picture wrong about. An agent that never renders is working\nblind, and every sweep that worked blind shipped a diagram it would not have shipped.\n\n→ The loop in full, preflight, recovery from a bad edit, undo and history:\n**[references/workflow.md](references/workflow.md)**\n\n## What each reference is for\n\n| Read | When |\n|---|---|\n| [references/authoring-model.md](references/authoring-model.md) | Writing nifdi XML: blocks, ids, containment, geometry completion, canonical form, icons and assets, fonts |\n| [references/placement.md](references/placement.md) | Attaching anything — labels, titles, badges. The `place` grammar, slots, chaining, worked recipes |\n| [references/styling.md](references/styling.md) | Colour, borders, shadows, fonts. The semantic vocabulary, selectors, and the scope rules that decide what a later block inherits |\n| [references/connectors.md](references/connectors.md) | Wiring blocks: `connect` modes, connector labels, what routing does and undoes |\n| [references/workflow.md](references/workflow.md) | The build loop, preflighting, diagnosing a surprising result, undo and history |\n| [references/cloud.md](references/cloud.md) | The hosted `nifdi` server: cloud ids, the editor link, the Pro plan and the read limit |\n| [references/local-workspace.md](references/local-workspace.md) | The local `nifdi-diagram` server: paths as ids, diagrams in the repository |\n\n## Working habits that pay\n\n- **Read before you write.** `get_diagram` is the source of truth, and its output is the\n  canonical shape to copy when writing XML back.\n- **Keep the handle.** There is no remembered selection; carry `diagramId` from\n  `create_diagram` or `list_diagrams` through the whole build loop.\n- **Preflight anything large.** `normalize_diagram` parses without editing and reports what\n  it would do. What it accepts, `insert` and `set_diagram` honour.\n- **Believe the result, not your intent.** Every tool reports what actually happened, and\n  says when it skipped or substituted something. That sentence is the cheapest debugging you\n  will get; read it rather than assuming the call did what you asked.\n- **Let the server place things.** Omit `pos`/`size` where you do not care. Declared\n  geometry that fights the content floor lands on the floor, and the result says so.\n- **`insert` never replaces.** A fragment naming an id that is already taken is added under\n  a *generated* id, and the substitution is reported. To edit an existing block, use\n  `set_text` / `set_style` / `move` / `resize` on it, or `delete` it first.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}