Skip to content

Commit 576117d

Browse files
committed
chore: copy cursor skills to claude
1 parent 550ec5a commit 576117d

4 files changed

Lines changed: 456 additions & 0 deletions

File tree

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
name: polish-document
3+
description: Polish and optimize documentation following Mintlify writing standards, then validate with broken-links check. Use when improving, optimizing, polishing, or reviewing documentation quality.
4+
---
5+
6+
# Polish Documentation
7+
8+
Optimize documents following Mintlify writing standards and validate links.
9+
10+
## Quick Start
11+
12+
1. Detect target files (see below)
13+
2. Read standards: [standards.md](standards.md)
14+
3. Read components: [components.md](components.md)
15+
4. Optimize document content
16+
5. Run `mint broken-links` to validate
17+
18+
## Target File Detection
19+
20+
**Default behavior**: Check for uncommitted changes in documentation directories.
21+
22+
```bash
23+
git diff --name-only HEAD -- '*.mdx'
24+
git diff --name-only --cached -- '*.mdx'
25+
```
26+
27+
If uncommitted `.mdx` files exist:
28+
- List the detected files
29+
- Confirm with user before proceeding
30+
31+
If no uncommitted changes:
32+
- Ask user to specify the document path(s)
33+
- Example: "Which document would you like to polish? (e.g., zh/platform/xxx.mdx)"
34+
35+
## Optimization Workflow
36+
37+
### 1. Check Frontmatter
38+
39+
Ensure required fields exist:
40+
41+
```yaml
42+
---
43+
title: "Clear, specific title"
44+
description: "Concise explanation of page purpose"
45+
---
46+
```
47+
48+
### 2. Improve Structure
49+
50+
**Before:** Plain text listing steps in a paragraph.
51+
52+
**After:** Use `<Steps>` component with clear step titles. Each step should have a descriptive title and concise content. Code examples within steps should use proper code blocks with language identifiers.
53+
54+
### 3. Add Callouts
55+
56+
**Before:** `Note: Delete operation cannot be undone.`
57+
58+
**After:** Use `<Warning>` component: wrap important warnings with the Warning component and add helpful context like backup reminders.
59+
60+
### 4. Format Code
61+
62+
**Before:** Inline code mixed with text like "Run command npm install"
63+
64+
**After:** Use separate code blocks with language identifiers. Add a brief introduction before the code block.
65+
66+
### 5. Validate Links
67+
68+
Run the broken links check:
69+
70+
```bash
71+
mint broken-links
72+
```
73+
74+
**Interpreting results:**
75+
76+
- **parsing error in .cursor/**: Ignore these errors. They come from skill/rule markdown files that use MDX syntax examples. These files are excluded from publishing via `.mintignore`.
77+
- **broken links in polished files**: Must be fixed before completing the task.
78+
- **broken links in other files**: Report to user but don't block the polishing task.
79+
80+
## Quick Reference
81+
82+
### Component Selection
83+
84+
| Content Type | Recommended Component |
85+
|--------------|----------------------|
86+
| Step-by-step instructions | `<Steps>` |
87+
| Important warnings | `<Warning>` |
88+
| Best practices | `<Tip>` |
89+
| Additional notes | `<Note>` |
90+
| Platform-specific | `<Tabs>` |
91+
| Multi-language code | `<CodeGroup>` |
92+
93+
### Writing Style
94+
95+
- ✅ Use "you" (second person)
96+
- ✅ Active voice
97+
- ✅ Concise and direct
98+
- ❌ Avoid "users should..."
99+
- ❌ Avoid passive voice
100+
101+
## Output Report
102+
103+
After optimization, provide a report:
104+
105+
```markdown
106+
## Optimization Report
107+
108+
### Structure Improvements
109+
- [x] Added frontmatter
110+
- [x] Restructured steps using Steps component
111+
112+
### Component Optimizations
113+
- [x] Changed notes to Warning component
114+
- [x] Added language identifier to code blocks
115+
116+
### Link Validation
117+
- ✅ No broken links in polished files
118+
- ⚠️ X broken links found in other files (not related to this task)
119+
```
120+
121+
**Note:** If `mint broken-links` shows parsing errors from `.cursor/` directory, these can be safely ignored as they are excluded from publishing.
122+
123+
## Resources
124+
125+
- Writing standards: [standards.md](standards.md)
126+
- Component reference: [components.md](components.md)
Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
# Mintlify Components Reference
2+
3+
Component selection guide and usage examples.
4+
5+
## Component Selection
6+
7+
| Scenario | Component | Description |
8+
|----------|-----------|-------------|
9+
| Step-by-step | `<Steps>` | Ordered instructions |
10+
| Platform-specific | `<Tabs>` | macOS/Windows/Linux etc. |
11+
| Multi-language code | `<CodeGroup>` | Same feature in different languages |
12+
| Additional info | `<Accordion>` | Collapsible detailed content |
13+
| Helpful notes | `<Note>` | Extra useful information |
14+
| Best practices | `<Tip>` | Expert advice |
15+
| Important warnings | `<Warning>` | Potential issues |
16+
| Neutral info | `<Info>` | Background context |
17+
| Success confirmation | `<Check>` | Completion status |
18+
| Image display | `<Frame>` | Bordered image container |
19+
| Link cards | `<Card>` / `<CardGroup>` | Related page navigation |
20+
21+
## Callout Components
22+
23+
### Note
24+
25+
```mdx
26+
<Note>
27+
Supplementary information that doesn't interrupt the main flow.
28+
</Note>
29+
```
30+
31+
### Tip
32+
33+
```mdx
34+
<Tip>
35+
Best practice recommendations to improve efficiency.
36+
</Tip>
37+
```
38+
39+
### Warning
40+
41+
```mdx
42+
<Warning>
43+
This operation is irreversible. Please proceed with caution.
44+
</Warning>
45+
```
46+
47+
### Info
48+
49+
```mdx
50+
<Info>
51+
Background information or neutral announcements.
52+
</Info>
53+
```
54+
55+
## Structure Components
56+
57+
### Steps
58+
59+
```mdx
60+
<Steps>
61+
<Step title="First step title">
62+
Detailed step description.
63+
</Step>
64+
65+
<Step title="Second step title">
66+
Detailed step description.
67+
68+
<Warning>
69+
Notes can be nested within steps.
70+
</Warning>
71+
</Step>
72+
</Steps>
73+
```
74+
75+
### Tabs
76+
77+
Use Tabs for platform-specific content:
78+
79+
```mdx
80+
<Tabs>
81+
<Tab title="macOS">
82+
Installation command for macOS (use bash code block)
83+
</Tab>
84+
<Tab title="Linux">
85+
Installation command for Linux (use bash code block)
86+
</Tab>
87+
</Tabs>
88+
```
89+
90+
Each Tab can contain code blocks with appropriate language identifiers.
91+
92+
### Accordion
93+
94+
```mdx
95+
<AccordionGroup>
96+
<Accordion title="FAQ 1">
97+
Answer content.
98+
</Accordion>
99+
100+
<Accordion title="FAQ 2">
101+
Answer content.
102+
</Accordion>
103+
</AccordionGroup>
104+
```
105+
106+
## Code Components
107+
108+
### Single Code Block
109+
110+
Use triple backticks with language and optional filename:
111+
112+
```python config.py
113+
API_KEY = os.environ.get('API_KEY')
114+
```
115+
116+
### CodeGroup
117+
118+
Wrap multiple code blocks in CodeGroup for multi-language examples:
119+
120+
```mdx
121+
<CodeGroup>
122+
(JavaScript code block with "Node.js" label)
123+
(Python code block with "Python" label)
124+
</CodeGroup>
125+
```
126+
127+
### Request/Response
128+
129+
Use RequestExample and ResponseExample for API documentation:
130+
131+
```mdx
132+
<RequestExample>
133+
(cURL code block showing the request)
134+
</RequestExample>
135+
136+
<ResponseExample>
137+
(JSON code block with status code, e.g., "200")
138+
</ResponseExample>
139+
```
140+
141+
## Media Components
142+
143+
### Frame
144+
145+
```mdx
146+
<Frame>
147+
<img src="/images/screenshot.png" alt="Feature screenshot description" />
148+
</Frame>
149+
150+
<Frame caption="Image caption text">
151+
<img src="/images/diagram.png" alt="Architecture diagram" />
152+
</Frame>
153+
```
154+
155+
### Video
156+
157+
```mdx
158+
<video
159+
controls
160+
className="w-full aspect-video rounded-xl"
161+
src="https://example.com/video.mp4"
162+
></video>
163+
```
164+
165+
## Navigation Components
166+
167+
### Card
168+
169+
```mdx
170+
<Card title="Quick Start" icon="rocket" href="/quickstart">
171+
Complete your first setup in 5 minutes.
172+
</Card>
173+
```
174+
175+
### CardGroup
176+
177+
```mdx
178+
<CardGroup cols={2}>
179+
<Card title="API Documentation" icon="code" href="/api">
180+
Complete API reference.
181+
</Card>
182+
183+
<Card title="Integration Guide" icon="plug" href="/integrations">
184+
Third-party system integrations.
185+
</Card>
186+
</CardGroup>
187+
```
188+
189+
## API Documentation
190+
191+
### ParamField
192+
193+
```mdx
194+
<ParamField path="id" type="string" required>
195+
Unique resource identifier.
196+
</ParamField>
197+
198+
<ParamField query="limit" type="integer" default="20">
199+
Result count limit, range 1-100.
200+
</ParamField>
201+
```
202+
203+
### ResponseField
204+
205+
```mdx
206+
<ResponseField name="data" type="object">
207+
Response data object.
208+
209+
<Expandable title="Properties">
210+
<ResponseField name="id" type="string">
211+
Resource ID.
212+
</ResponseField>
213+
</Expandable>
214+
</ResponseField>
215+
```

0 commit comments

Comments
 (0)