Generate an interactive Excalidraw architecture diagram showing products and features in a clean hierarchy. Use whenever the user mentions architecture diagram, portfolio diagram, product-feature diagram, "show me the structure", "visualize the portfolio", portfolio architecture, feature map, product tree, "how do the products relate", or wants a visual overview of how products and features fit together — even if they don't say "architecture" explicitly.
From cogni-portfolionpx claudepluginhub cogni-work/insight-wave --plugin cogni-portfolioThis skill is limited to using the following tools:
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Builds 3-5 year financial models for startups with cohort revenue projections, cost structures, cash flow, headcount plans, burn rate, runway, and scenario analysis.
Generate an interactive Excalidraw diagram that visualizes the product-feature hierarchy of a cogni-portfolio project. Products appear as large container rectangles with features nested directly inside — no category groupings, no cross-product bridges. The diagram is editable on the live canvas, and user changes are preserved across runs.
Read portfolio.json in the current working directory or a user-specified path. If no portfolio project is found, tell the user to run the portfolio-setup skill first.
Read portfolio.json for the language field — if present, communicate with the user in that language. Technical terms, skill names, and CLI commands remain in English.
Check whether {project-dir}/output/architecture.excalidraw exists.
If it exists — import it onto the canvas via import_scene(filePath="...", mode="replace") so the user's previous edits are visible. Then offer options:
For option (b): read products/features JSON, call query_elements to find existing elements by their IDs (product-{slug}, feature-{slug}), compute the diff, add only missing elements using the layout from Step 4 (appending to the right of existing products).
For option (c): iterate feature elements on canvas, call update_element to change backgroundColor and strokeColor where readiness has changed.
If it does not exist — proceed to Step 3 (fresh generation).
Read all products/*.json and features/*.json from the project directory.
Build two data structures:
{slug, name, maturity, revenue_model} sorted by nameproduct_slug → array of {slug, name, purpose, readiness, sort_order} sorted by sort_order then by slugImportant: Ignore the category field on features. Features appear directly inside their product — no category sub-groupings.
Compute summary stats: product count, feature count, readiness breakdown (GA/Beta/Planned).
For fresh generation, call clear_canvas first.
| Parameter | Value |
|---|---|
| Canvas padding | 60px |
| Product width | 300px |
| Product gap | 40px horizontal |
| Product header height | 60px (name + metadata) |
| Feature width | 260px (20px inset each side) |
| Feature height | 56px when any feature in project has purpose, otherwise 40px |
| Feature gap | 12px vertical |
| Feature top margin | 20px below header |
Product at index i:
x = 60 + i × (300 + 40)y = 60width = 300height = 60 + 20 + (feature_count × (40 + 12)) + 20 (bottom padding)Determine feature_height once for the project: if any feature across all products has a purpose field, use 56px; otherwise use 40px. This keeps all feature rectangles the same height for visual consistency.
Feature at index j inside product at index i:
x = product_x + 20y = product_y + 60 + 20 + j × (feature_height + 12)width = 260height = feature_height| Readiness | backgroundColor | strokeColor | strokeStyle |
|---|---|---|---|
| ga | #bbf7d0 | #166534 | solid |
| beta | #fef08a | #92400e | solid |
| planned | #e5e7eb | #6b7280 | dashed |
Product rectangles: backgroundColor: "#f8fafc", strokeColor: "#334155", strokeWidth: 2
Use roughness: 0 and fontFamily: 2 (sans-serif) for a clean, professional look.
For each product, create these elements via batch_create_elements:
type: "rectangle", id: "product-{slug}"type: "text", bold, fontSize: 20, centered in header, id: "product-label-{slug}"type: "text", fontSize: 14, maturity + revenue_model below name, color #64748b, id: "product-meta-{slug}"type: "rectangle", colored by readiness, id: "feature-{slug}"type: "text", fontSize: 16, vertically centered at y + 8 when purpose exists or vertically centered when absent, id: "feature-label-{slug}"purpose field exists) — type: "text", fontSize: 12, color #64748b, positioned at y + 30 within the feature rectangle, id: "feature-purpose-{slug}". When purpose is absent, omit this element.After creating all elements for one product, call group_elements(elementIds=[...]).
Unassigned features (product_slug not matching any product): place in a final column with a red-bordered rectangle titled "Unassigned Features".
After all products are rendered, call snapshot_scene(name="architecture-complete").
get_canvas_screenshot and display itAsk the user: "Would you like to make any changes, or shall I save the diagram?"
update_element/delete_element/create_element, or let them edit directly on the canvasexport_scene(filePath="{project-dir}/output/architecture.excalidraw")describe_scene, write the .excalidraw JSON via Write tool:
{
"type": "excalidraw",
"version": 2,
"source": "portfolio-architecture",
"elements": [...],
"appState": {"viewBackgroundColor": "#ffffff"}
}
export_to_excalidraw_url for a shareable linkRun $CLAUDE_PLUGIN_ROOT/scripts/project-status.sh <project-dir> to determine project state. Then present a context-aware menu — always offer the core options, plus conditional options based on data:
Always available:
products skillfeatures skilldashboard-refresher agentoutput/architecture.excalidrawConditional (show when relevant):
purpose field. Say: "X of Y features are missing purpose statements. Adding them would make this diagram more informative for customers. Want me to draft them?" Delegate to the features skill.features skill quality completion gate.propositions skill.portfolio-resume skill for a full status overview.$CLAUDE_PLUGIN_ROOT/skills/portfolio-setup/references/data-model.md for complete entity schemas