Spec Kit Diagrams
Convert the current Spec Kit feature into a small set of decision-useful, editable diagrams by composing the installed excalidraw skill.
Dependency
Before generating anything, load the installed excalidraw skill completely and read only the references it routes to for the selected layout. Its required capability is installed alongside this skill; report an invalid materialization if it is unavailable.
Treat this skill's privacy and artifact-selection rules as overrides when they conflict with the base skill.
Resolve the Feature
- Work from the repository root containing
.specify/.
- If the user names a feature directory, use it.
- Otherwise run
.specify/scripts/bash/check-prerequisites.sh --json --paths-only and use FEATURE_DIR.
- If no current feature is resolved, inspect
specs/. Use the only feature when exactly one exists; otherwise ask the user which feature to visualize.
- Never invent missing artifacts. State which available files informed each view.
Read the Artifacts
Read all relevant files in the resolved feature directory:
spec.md: actors, user journeys, priority, requirements, edge cases, and success criteria.
plan.md: architecture, technology choices, boundaries, constraints, and project structure.
research.md: decisions, alternatives, and rejected options.
data-model.md: entities, relationships, states, and validation rules.
contracts/: external interfaces, endpoints, events, schemas, and error behavior.
tasks.md: phases, dependencies, parallel work, and user-story coverage.
Use codebase inspection to verify named components and integrations when implementation already exists.
Choose Views
Generate only views supported by available information. When the user does not name a view, select up to three complementary diagrams:
- User journey from
spec.md: actors, triggers, happy path, decisions, failure paths, and measurable outcome. Prefer swimlanes or a staged flow.
- System architecture from
plan.md, contracts, and verified code: users/channels, application components, data stores, external services, trust boundaries, and major data flows. Prefer layered zones.
- Domain model from
data-model.md: entities, cardinality, ownership, lifecycle states, and invariants. Prefer an ER-style layout.
- Requirement traceability from
spec.md plus tasks.md: user stories and functional requirements mapped to implementation phases or task groups. Show missing coverage clearly.
- Implementation roadmap from
tasks.md: dependency-ordered phases, parallelizable groups, milestones, and critical path. Prefer columns or a dependency graph.
- Decision map from
research.md: decision, drivers, selected option, rejected alternatives, and consequences.
Split overloaded visuals instead of creating one unreadable canvas. Do not copy paragraphs into nodes; use short labels and preserve identifiers such as US1, FR-003, and T012 for traceability.
Generate Artifacts
- Create
FEATURE_DIR/diagrams/ when output is requested.
- For each view, first create a compact JSON source at
diagrams/<view>-diagram-spec.json containing the title, source artifact paths, nodes, edges, groups, and any layout notes.
- Use the base Excalidraw skill to create:
diagrams/<view>.excalidraw
diagrams/<view>-preview.svg
diagrams/<view>-preview.html
- Use
generate_excalidraw.py for simple node-edge views. Use direct Excalidraw scene composition and the base skill's architecture-zone, swimlane, or composed-layout guidance when a generic graph would obscure meaning.
- Run
validate_scene.py on every .excalidraw file and apply the base skill's visual quality gate.
- Visually inspect every SVG preview. Fix overlaps, clipped labels, ambiguous arrows, tiny text, and excessive density before delivery.
Privacy and Safety
- Default to local-only generation. Pass
--no-web-link or omit --web-link in every base script call.
- Do not upload specifications, diagrams, financial information, code-derived architecture, or other project content to Excalidraw or any external service unless the user explicitly requests a shareable web link in the current turn.
- If the user requests a web link, explain that the encrypted scene is stored on Excalidraw's public JSON service and that possession of the full URL grants decryption access.
- Open preview HTML only when its SVG was generated from trusted project artifacts; do not embed or open arbitrary third-party SVG because the preview page inserts SVG markup directly.
- Never call
session_state.py clear.
- Store persistent outputs only under the resolved feature's
diagrams/ directory unless the user chooses another location.
- Preserve the source artifact files; this skill is read-only with respect to
spec.md, plan.md, data-model.md, contracts, and tasks.md.
Delivery
Show the preview images, link the editable .excalidraw files and source JSON files, and summarize:
- which Spec Kit artifacts were used;
- what each diagram communicates;
- any ambiguity, contradiction, or missing coverage discovered while visualizing;
- whether all outputs remained local or a web link was explicitly created.
1---2name: speckit-diagrams3description: Turn GitHub Spec Kit feature artifacts into editable Excalidraw diagrams and local previews. Use when the user asks to visualize, diagram, map, explain visually, or create an architecture, workflow, data model, story map, traceability map, or implementation roadmap from Spec Kit files such as spec.md, plan.md, research.md, data-model.md, contracts/, or tasks.md.4---56# Spec Kit Diagrams78Convert the current Spec Kit feature into a small set of decision-useful, editable diagrams by composing the installed `excalidraw` skill.910## Dependency1112Before generating anything, load the installed `excalidraw` skill completely and read only the references it routes to for the selected layout. Its required capability is installed alongside this skill; report an invalid materialization if it is unavailable.1314Treat this skill's privacy and artifact-selection rules as overrides when they conflict with the base skill.1516## Resolve the Feature17181. Work from the repository root containing `.specify/`.192. If the user names a feature directory, use it.203. Otherwise run `.specify/scripts/bash/check-prerequisites.sh --json --paths-only` and use `FEATURE_DIR`.214. If no current feature is resolved, inspect `specs/`. Use the only feature when exactly one exists; otherwise ask the user which feature to visualize.225. Never invent missing artifacts. State which available files informed each view.2324## Read the Artifacts2526Read all relevant files in the resolved feature directory:2728- `spec.md`: actors, user journeys, priority, requirements, edge cases, and success criteria.29- `plan.md`: architecture, technology choices, boundaries, constraints, and project structure.30- `research.md`: decisions, alternatives, and rejected options.31- `data-model.md`: entities, relationships, states, and validation rules.32- `contracts/`: external interfaces, endpoints, events, schemas, and error behavior.33- `tasks.md`: phases, dependencies, parallel work, and user-story coverage.3435Use codebase inspection to verify named components and integrations when implementation already exists.3637## Choose Views3839Generate only views supported by available information. When the user does not name a view, select up to three complementary diagrams:40411. **User journey** from `spec.md`: actors, triggers, happy path, decisions, failure paths, and measurable outcome. Prefer swimlanes or a staged flow.422. **System architecture** from `plan.md`, contracts, and verified code: users/channels, application components, data stores, external services, trust boundaries, and major data flows. Prefer layered zones.433. **Domain model** from `data-model.md`: entities, cardinality, ownership, lifecycle states, and invariants. Prefer an ER-style layout.444. **Requirement traceability** from `spec.md` plus `tasks.md`: user stories and functional requirements mapped to implementation phases or task groups. Show missing coverage clearly.455. **Implementation roadmap** from `tasks.md`: dependency-ordered phases, parallelizable groups, milestones, and critical path. Prefer columns or a dependency graph.466. **Decision map** from `research.md`: decision, drivers, selected option, rejected alternatives, and consequences.4748Split overloaded visuals instead of creating one unreadable canvas. Do not copy paragraphs into nodes; use short labels and preserve identifiers such as `US1`, `FR-003`, and `T012` for traceability.4950## Generate Artifacts51521. Create `FEATURE_DIR/diagrams/` when output is requested.532. For each view, first create a compact JSON source at `diagrams/<view>-diagram-spec.json` containing the title, source artifact paths, nodes, edges, groups, and any layout notes.543. Use the base Excalidraw skill to create:55 - `diagrams/<view>.excalidraw`56 - `diagrams/<view>-preview.svg`57 - `diagrams/<view>-preview.html`584. Use `generate_excalidraw.py` for simple node-edge views. Use direct Excalidraw scene composition and the base skill's architecture-zone, swimlane, or composed-layout guidance when a generic graph would obscure meaning.595. Run `validate_scene.py` on every `.excalidraw` file and apply the base skill's visual quality gate.606. Visually inspect every SVG preview. Fix overlaps, clipped labels, ambiguous arrows, tiny text, and excessive density before delivery.6162## Privacy and Safety6364- Default to local-only generation. Pass `--no-web-link` or omit `--web-link` in every base script call.65- Do not upload specifications, diagrams, financial information, code-derived architecture, or other project content to Excalidraw or any external service unless the user explicitly requests a shareable web link in the current turn.66- If the user requests a web link, explain that the encrypted scene is stored on Excalidraw's public JSON service and that possession of the full URL grants decryption access.67- Open preview HTML only when its SVG was generated from trusted project artifacts; do not embed or open arbitrary third-party SVG because the preview page inserts SVG markup directly.68- Never call `session_state.py clear`.69- Store persistent outputs only under the resolved feature's `diagrams/` directory unless the user chooses another location.70- Preserve the source artifact files; this skill is read-only with respect to `spec.md`, `plan.md`, `data-model.md`, contracts, and `tasks.md`.7172## Delivery7374Show the preview images, link the editable `.excalidraw` files and source JSON files, and summarize:7576- which Spec Kit artifacts were used;77- what each diagram communicates;78- any ambiguity, contradiction, or missing coverage discovered while visualizing;79- whether all outputs remained local or a web link was explicitly created.