Generates mind map data files for the toolbox mind maps collection
Use this skill when creating new mind maps or updating existing ones for the toolbox mind maps collection at /toolbox/mindmaps/.
src/content/mindmaps/MindMap / MindMapNode data modelid, a human-readable label, and optional notesUse this skill when you need to:
Each mind map lives in its own JSON file:
src/content/mindmaps/<slug>.json
The filename (without .json) becomes the URL slug. For example:
src/content/mindmaps/ci-cd-pipelines.json → /toolbox/mindmaps/ci-cd-pipelines/The Astro content collection (type: "data") picks up all files automatically — no registration needed. The [slug] dynamic route generates one page per JSON file.
interface MindMapRef {
/** Target node ID this node references. */
targetId: string;
/** Optional label describing the relationship (e.g. "deploys via", "depends on"). */
label?: string;
}
interface MindMapNode {
/** Unique id (kebab-case, e.g. "k8s-pods"). */
id: string;
/** Display label shown on the node. */
label: string;
/** Optional CSS color for this branch (hex string). */
color?: string;
/** Optional detailed notes (plain text, Markdown-friendly). */
notes?: string;
/** Optional annotation — a short tag/badge shown on the node (e.g. "key concept", "gotcha", "critical"). */
annotation?: string;
/** Cross-branch references to other nodes. Rendered as dashed connector lines. */
refs?: MindMapRef[];
/** Child nodes. Leaf nodes omit or use []. */
children?: MindMapNode[];
}
src/content.config.ts){
"title": "Human-readable title",
"description": "Short description for cards and SEO.",
"tags": ["lowercase", "tags"],
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"root": {
"id": "root",
"label": "Root Label",
"notes": "Optional notes on the root.",
"annotation": "Optional short badge text",
"refs": [
{ "targetId": "another-node-id", "label": "relationship label" }
],
"children": []
}
}
Note: The slug field is not included in the JSON — it is derived from the filename by Astro.
src/content/mindmaps/<slug>.json following the schema above.pnpm build to confirm no schema or TypeScript errors.pnpm dev and navigate to /toolbox/mindmaps/ to verify the card appears and the detail page renders."terraform-modules")."k8s-pods", "helm-charts").notes.color (hex string) to first-level children of the root for branch distinction."#326CE5" for Kubernetes blue).color on every node.notes.refs to connect a node to nodes in other branches (rendered as dashed lines).targetId (must be a valid node ID in the same mind map) and an optional label.id: "root".Create src/content/mindmaps/ci-cd-pipelines.json:
{
"title": "CI/CD Pipelines",
"description": "Continuous Integration and Delivery concepts, tools, and best practices.",
"tags": ["devops", "ci-cd", "automation"],
"createdAt": "2026-03-01T00:00:00Z",
"updatedAt": "2026-03-01T00:00:00Z",
"root": {
"id": "root",
"label": "CI/CD Pipelines",
"notes": "Automating build, test, and deployment workflows for faster, safer releases.",
"children": [
{
"id": "ci",
"label": "Continuous Integration",
"color": "#2563EB",
"notes": "Merging code frequently with automated builds and tests.",
"children": [
{ "id": "ci-build", "label": "Build Automation", "notes": "..." },
{ "id": "ci-testing", "label": "Automated Testing", "notes": "..." }
]
},
{
"id": "cd",
"label": "Continuous Delivery",
"color": "#16A34A",
"notes": "Keeping code in a deployable state at all times.",
"children": [
{ "id": "cd-staging", "label": "Staging Environments", "notes": "..." },
{ "id": "cd-rollbacks", "label": "Rollback Strategies", "notes": "..." }
]
}
]
}
}
This automatically generates:
/toolbox/mindmaps//toolbox/mindmaps/ci-cd-pipelines//zh-hant/toolbox/mindmaps/Before finalising a mind map, verify:
id values are unique within the mind mapid is "root"color settags are lowercasecreatedAt and updatedAt are valid ISO 8601notes are present on all nodes with non-obvious labelspnpm build succeeds with 0 errors# Type-check and build
pnpm build
# Preview
pnpm dev
# Open http://localhost:4321/toolbox/mindmaps/
| Purpose | Path |
|---|---|
| Mind map data files | src/content/mindmaps/<slug>.json |
| Collection schema | src/content.config.ts |
| TypeScript interfaces | src/data/mindmaps.ts |
| React components | src/components/mindmaps/ |
| English index page | src/pages/toolbox/mindmaps/index.astro |
| English detail page | src/pages/toolbox/mindmaps/[slug]/index.astro |
| Chinese index page | src/pages/zh-hant/toolbox/mindmaps/index.astro |
| Chinese detail page | src/pages/zh-hant/toolbox/mindmaps/[slug]/index.astro |
| This skill | .opencode/skills/mindmap-generator/SKILL.md |