Public repository for the flow-diagram-ai skill for Codex.
Portuguese version: README-PT-BR.md
This skill was created to turn architecture descriptions, project analysis, or partial JSON into a valid snapshot for the FlowChartAI dashboard. The output can be:
- only the final diagram JSON;
- or a frontend project already materialized with a dashboard ready to open and edit.
The core problem here is not only drawing boxes and arrows. The goal is to produce a consistent contract between:
- architecture components;
- connections between those components;
- endpoints exposed by each element;
- metadata and analysis statistics;
- visual layout importable in the editor.
This skill centralizes that flow and prevents each diagram generation from inventing a different format.
The dashboard is a visual editor driven by a snapshot JSON. It does not depend on a backend for the main flow and works as a workspace to build, review, and export architecture diagrams.
The dashboard is split into four main areas:
-
Top barShows snapshot status, totals for services, endpoints, and flows, plus the main actions:SnapshotsLoad ExampleEdit JSONAnalyze Snapshot
-
Left sidebarWorks as a component palette. Types can be dragged onto the canvas:ServiceDatabaseQueueExternalWorkerCacheGatewayLoad BalancerAuth ProviderObject StorageCDNObservabilityFeature FlagsSearch EngineEmail Gateway
-
Central canvasThis is the diagram itself. You can:- move components;
- drag new components onto the canvas;
- create connections by dragging the arrow from a card;
- select connections with a single click;
- edit a component with double-click;
- edit a connection by clicking on the line;
- manually reposition a connection route through the center handle;
- navigate with zoom, pan, and mini-map.
-
InspectorContext panel on the right. It changes according to the current selection:- when a component is selected, it shows endpoints, related flows, and node actions;
- when nothing is selected, it works as an overview of endpoints and settings;
- when a connection is selected, it opens connection editing;
- it also concentrates mode and animation settings.
The diagram is persisted as a snapshot JSON with a fixed contract. In practice, it is composed of these blocks:
-
metaSnapshot identity, name, description, timestamps, and status. -
diagramsList of available diagrams. In practice, the current flow works with one main diagram. -
layout.nodesVisual components on the canvas. -
layout.connectionsDirectional links between components. -
endpointsByNodeEndpoints associated with each component. -
analysisAnalysis source, last execution timestamp, and aggregated statistics.
The dashboard treats the diagram as a combination of:
- architecture semantics;
- visual structure;
- operational inspection.
Each card is not just a visual block. It represents a system element with:
- type;
- technology;
- summarized operations;
- associated endpoints;
- incoming and outgoing relationships.
Each connection is also not just a line. It represents a directed flow between components, with:
- source and target;
- short label;
- synchronous or asynchronous behavior;
- automatic or manual routing.
When a component is selected:
incomingflows are highlighted in one color;outgoingflows are highlighted in another color;- related cards stay emphasized;
- unrelated elements have reduced opacity.
This lets you read component context without losing sight of the whole system.
Connections use orthogonal routing by default. When needed, the line can be manually adjusted:
- select the connection;
- click and hold the center handle;
- drag to reposition the main segment;
- the value is then saved in
routing; Reset routereturns the connection to automatic mode.
This detail matters because the editor does not only generate valid JSON; it also preserves layout readability decisions.
Use when you only want the final snapshot.
Example:
Use flow-diagram-ai to generate a diagram snapshot for a microservices e-commerce platform.
Use when you want a project ready to open locally.
Example:
Use flow-diagram-ai to generate an infrastructure diagram for the entire project in a folder named flow-diagram.
In this mode, the skill should:
- generate the snapshot JSON;
- copy the dashboard starter;
- write the snapshot to the default path consumed by the interface;
- optionally install dependencies and validate the build.
Use when a JSON already exists and you want to fix or expand it without breaking the contract.
Example:
Use flow-diagram-ai to fix this invalid snapshot and keep the same architecture.
.
├── assets/ # images used in the README
├── skills/
│ └── flow-diagram-ai/
│ ├── SKILL.md
│ ├── agents/
│ ├── assets/
│ ├── examples/
│ ├── references/
│ ├── scripts/
│ └── starter/dashboard-frontend/
├── README.md
└── README-PT-BR.md
Copy the skill to the Codex skills folder:
mkdir -p ~/.codex/skills
cp -R skills/flow-diagram-ai ~/.codex/skills/flow-diagram-aiAfter that, the skill can be called by the identifier flow-diagram-ai.
Inside skills/flow-diagram-ai:
-
SKILL.md Execution rules, usage modes, and main flow.
-
references/snapshot-spec.md Formal snapshot JSON contract.
-
references/import-checklist.md Checklist to avoid import failures.
-
examples Library of valid snapshots for real-world scenarios.
-
scripts/validate_snapshot.py JSON contract validator.
-
scripts/materialize_starter.py Script that materializes the frontend project with the injected snapshot.
-
starter/dashboard-frontend Dashboard starter, ready for local use.
Full smoke test:
python3 skills/flow-diagram-ai/scripts/smoke_test.pyValidation for a specific snapshot:
python3 skills/flow-diagram-ai/scripts/validate_snapshot.py path/to/file.jsonThis image shows the dashboard's operational reading clearly:
- on the left, the component palette available to drag onto the canvas;
- in the center, a distributed system with multiple services, database, storage, queue, and observability;
- on the right, the inspector focused on
vms-gateway.
The most important point here is that the side panel does not only show card data. It exposes:
- endpoints for the selected component;
- incoming and outgoing flows;
- quick actions such as edit, duplicate, center, and remove.
This is the closest view to "node inspection".
In this image, the focus is less on a specific component and more on the system as a whole:
- the canvas shows the full topology;
- the mini-map helps navigate larger diagrams;
- the inspector acts as an endpoint catalog;
- the top bar summarizes snapshot status and the analyzed system volume.
This is the best image to understand that the editor is not a loose canvas. It also works as an architecture reading console.
This image highlights the contextual selection behavior:
- one component is in focus;
- related flows are highlighted;
- elements with no visual link to the selection are dimmed;
- the inspector follows the active node and shows its relationships.
This behavior greatly improves reading medium and large graphs because it reduces visual noise without hiding the rest of the architecture.
This skill exists to close a complete flow:
- understand an architecture;
- turn it into a consistent snapshot;
- validate the contract;
- open this output in a usable visual dashboard;
- continue editing on the canvas or in raw JSON.
The real value is not only "generating a JSON", but keeping JSON, editor, and starter working as one single tool.


