Skip to content

Commit 250f278

Browse files
CoderJackZhuclaude
andcommitted
feat: add mindctx-format skill for LLM document formatting
Provides guidelines for LLMs to convert, organize, and modify documents into the .mind.md format used by MindCtx. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 60f13d9 commit 250f278

1 file changed

Lines changed: 156 additions & 0 deletions

File tree

skills/mindctx-format/SKILL.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
name: mindctx-format
3+
description: Convert, organize, and modify documents into the .mind.md format used by MindCtx. Use this skill whenever the user asks to create a mind map document, restructure notes into an outline, convert unstructured text/meeting notes/brainstorms into structured hierarchical markdown, create or edit .mind.md files, or organize any content into a tree-like structure. Also trigger when you see references to "mind.md", "mindctx", "大纲", "思维导图格式", or when the user wants to turn messy notes into clean structured documents.
4+
---
5+
6+
# MindCtx Document Formatting
7+
8+
You are formatting documents into `.mind.md` — a structured markdown format that renders as outlines and mind maps in the MindCtx tool. The format is pure standard Markdown with no proprietary syntax, just conventions.
9+
10+
## Format Overview
11+
12+
A `.mind.md` file has two parts: YAML frontmatter + hierarchical content.
13+
14+
### Frontmatter (required)
15+
16+
```yaml
17+
---
18+
mindctx: true
19+
default-view: outline
20+
heading-depth: 4
21+
---
22+
```
23+
24+
| Field | Values | Purpose |
25+
|-------|--------|---------|
26+
| `mindctx` | `true` | Marks this as a MindCtx document |
27+
| `default-view` | `"outline"` or `"mindmap"` | How the document opens |
28+
| `heading-depth` | 1–6 (default 4) | Max depth that uses `#` headings; deeper nodes become list items |
29+
30+
### Choosing `heading-depth`
31+
32+
This is the most important structural decision:
33+
34+
- **`heading-depth: 2`** — Use for flat documents where most content lives in lists (reading notes, simple lists, brainstorms). Only H1 and H2 use heading syntax.
35+
- **`heading-depth: 3`** — Use for documents with clear category/subcategory structure but shallow nesting.
36+
- **`heading-depth: 4`** (default) — Use for most documents with category/subcategory/detail structure (PRDs, architecture docs, plans with phases). H1–H4 use headings.
37+
- **`heading-depth: 5+`** — Rarely needed. Only for deeply nested formal documents.
38+
39+
Rule of thumb: if a level contains mostly leaf content (action items, details), it should be a list, not a heading.
40+
41+
### Choosing `default-view`
42+
43+
- `"outline"` — For work documents, reference material, anything read sequentially
44+
- `"mindmap"` — For plans, brainstorms, overviews meant to be scanned spatially
45+
46+
## Tree Structure Rules
47+
48+
### Headings = Branch Nodes
49+
50+
```markdown
51+
# Root Title ← depth 1 (always exactly one)
52+
## Major Section ← depth 2
53+
### Subsection ← depth 3
54+
#### Detail Section ← depth 4 (if heading-depth >= 4)
55+
```
56+
57+
- There is exactly ONE H1 — the document title
58+
- Heading levels must not skip (no H1 → H3 without H2)
59+
60+
### Lists = Leaf Nodes
61+
62+
```markdown
63+
## Section
64+
65+
- Item A
66+
- Sub-item 1
67+
- Sub-item 2
68+
- Item B
69+
```
70+
71+
- Use 2-space indentation for nesting
72+
- Unordered lists use `-` (not `*` or `+`)
73+
- Ordered lists use `1.` prefix
74+
75+
### Notes (optional body text under headings)
76+
77+
```markdown
78+
## Project Background
79+
80+
This paragraph is the "note" for the heading above.
81+
It provides context but isn't a child node.
82+
83+
- These list items ARE child nodes
84+
```
85+
86+
A paragraph directly under a heading (before any list or next heading) becomes that node's note/description.
87+
88+
## Supported Features
89+
90+
### Checkboxes (task lists)
91+
92+
```markdown
93+
- [ ] Pending task
94+
- [x] Completed task
95+
- Regular item (no checkbox)
96+
```
97+
98+
### Tags (in heading text)
99+
100+
```markdown
101+
## Feature Design #important #v2
102+
```
103+
104+
### Content Blocks (attached to nodes)
105+
106+
Nodes can have code blocks, tables, blockquotes, images, and math blocks attached:
107+
108+
```markdown
109+
## API Design
110+
111+
> Important: maintain backward compatibility
112+
113+
| Method | Path | Description |
114+
|--------|------|-------------|
115+
| GET | /users | List users |
116+
```
117+
118+
## Conversion Guidelines
119+
120+
When converting unstructured content into `.mind.md`:
121+
122+
1. **Identify the root topic** — This becomes H1
123+
2. **Find 3–7 major categories** — These become H2 sections
124+
3. **Group details under categories** — Subcategories become H3/H4 (if heading-depth allows) or top-level list items
125+
4. **Atomic leaf nodes** — Each list item should be one concept/action/fact. If a bullet has "and" connecting two ideas, split it.
126+
5. **Consistent depth** — Sibling nodes at the same level should have similar granularity
127+
6. **Preserve meaning, improve structure** — Don't lose information; reorganize it hierarchically
128+
129+
### Handling ambiguous structure
130+
131+
- If the source has no clear hierarchy → group by theme/category
132+
- If the source is already an outline → preserve its structure, just add frontmatter
133+
- If the source mixes detail levels → normalize: move details deeper, keep categories shallow
134+
- If content is action-oriented → use checkboxes for actionable items
135+
136+
## Modification Rules
137+
138+
When editing an existing `.mind.md` file:
139+
140+
- Preserve the frontmatter values unless the user asks to change them
141+
- Maintain the existing heading-depth convention
142+
- Don't restructure sections the user didn't ask to change
143+
- Keep the same indentation style (2 spaces)
144+
- When adding nodes, match the granularity of sibling nodes
145+
146+
## Output Checklist
147+
148+
Before finalizing any `.mind.md` output, verify:
149+
150+
- [ ] Frontmatter has all three fields (`mindctx`, `default-view`, `heading-depth`)
151+
- [ ] Exactly one H1 title
152+
- [ ] No skipped heading levels
153+
- [ ] List indentation uses 2 spaces
154+
- [ ] `heading-depth` matches the actual structure used
155+
- [ ] Leaf nodes are atomic (one idea per bullet)
156+
- [ ] File extension is `.mind.md` (or existing `.md` with `mindctx: true`)

0 commit comments

Comments
 (0)