Skip to content

Commit fb6e942

Browse files
committed
add agent skills and polish permission docs
- Add translate-zh-to-en and polish-document skills - Add AGENTS.md for AI agent guidance - Add English README - Polish permission-design docs with Mintlify components - Fix broken links in RUM documentation - Add .mintignore for excluding skill files
1 parent 4afe59c commit fb6e942

17 files changed

Lines changed: 1330 additions & 681 deletions

File tree

.cursor/rules/rule.md

Lines changed: 0 additions & 399 deletions
This file was deleted.

.cursor/rules/term.md

Lines changed: 0 additions & 119 deletions
This file was deleted.
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)

0 commit comments

Comments
 (0)