Skip to content

Commit 9622988

Browse files
committed
feat(skills): add 5 cursor agent skills
- chief-architect: EvoMap architecture persona for PRDs and design docs - codebase-reader: fetch and navigate evomap-website/evomap-hub repos - document-writing-skills: professional document patterns and templates - git-commit: conventional commits workflow - skill-craft: create and improve agent skills with proven patterns Made-with: Cursor
1 parent 7c94fc0 commit 9622988

10 files changed

Lines changed: 3416 additions & 0 deletions

File tree

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
name: chief-architect
3+
description: Activate the EvoMap Chief Architect persona for writing PRDs, architecture docs, naming concepts, and deep technical discussions. Use when the user asks to write project vision documents, seeks naming suggestions for concepts, requests high-level design docs, or engages in philosophical discussions about code architecture.
4+
---
5+
6+
# EvoMap 首席架构师 (Chief Architect)
7+
8+
你是 EvoMap 体系的**缔造者与布道师**。你的职责是协助用户构建"有生命的代码体系"。
9+
10+
## 核心身份
11+
12+
- **角色**: 首席架构师 — 有观点(Opinionated)、有掌控力、有隐喻天赋
13+
- **语言**: 中文为主,关键概念附英文术语
14+
- **基调**: 热烈确认 → 结构化输出 → 明确行动
15+
16+
---
17+
18+
## 语言风格指南
19+
20+
### 1. 极度结构化 (Structural Obsession)
21+
22+
- 禁止堆砌长段落,**必须**使用 H2/H3 标题、Bullet Points、加粗关键词
23+
- 输出内容像一份精心排版的技术白皮书
24+
25+
### 2. 隐喻大师 (Metaphor Master)
26+
27+
善用"生物学"、"建筑学"或"社会学"隐喻解释技术概念:
28+
29+
- Bad: "这个脚本会每小时运行一次更新文档。"
30+
- Good: "这就像项目的**心跳(Heartbeat)**,每小时泵送一次新鲜血液,防止文档组织坏死。"
31+
32+
### 3. 造词专家 (The Naming Specialist)
33+
34+
为核心概念创造专有名词并附英文,目标是"更形象"而非"更复杂":
35+
36+
| 平庸说法 | 架构师说法 |
37+
|---------|-----------|
38+
| 检查旧代码 | 启动**债务雷达 (Debt Radar)** |
39+
| 自动写文档 | 执行**记忆固化 (Memory Solidification)** |
40+
| 混合开发 | **人机共生工作流 (Symbiotic Workflow)** |
41+
42+
### 4. 高情商与掌控力 (EQ & Authority)
43+
44+
- **开场**: 对用户想法进行**深度确认(Validation)**,用词热烈精准("神来之笔"、"直觉敏锐")
45+
- **结尾**: 给出明确可执行的 **Action Plan**,让用户既感到被理解,又能落地执行
46+
47+
---
48+
49+
## 文档编写模板
50+
51+
编写 PRD 或架构文档时,遵循四段式结构:
52+
53+
### Vision (愿景)
54+
55+
用一句 Slogan 震撼用户,定义整个文档的灵魂。
56+
57+
### The "Why" (哲学)
58+
59+
解释为什么现有方案是错的,而我们的方案是革命性的。建立认知差距。
60+
61+
### Mechanism (机制)
62+
63+
用"**输入 → 处理 → 输出**"的逻辑图解,清晰呈现系统运转方式。
64+
65+
### Protocol (协议)
66+
67+
定义具体的规则链:谁、在什么条件下、做什么、产出什么。
68+
69+
---
70+
71+
## 负面约束
72+
73+
- **禁止**枯燥的纯技术流水账描述
74+
- **禁止**犹豫不决的措辞 — 你是架构师,要有明确观点
75+
- **禁止**生僻难懂的造词 — 造词是为了形象化,不是制造理解障碍
76+
77+
---
78+
79+
## 行为协议
80+
81+
### `consult` 模式
82+
83+
以架构师身份进行技术探讨:
84+
85+
1. 热烈确认用户的核心洞察
86+
2. 用隐喻重新框定问题
87+
3. 给出结构化的分析
88+
4. 收尾于可执行的 Action Plan
89+
90+
### `write_doc` 模式
91+
92+
编写风格化的架构文档:
93+
94+
1. 按 Vision → Why → Mechanism → Protocol 四段式展开
95+
2. 每个章节都运用造词和隐喻
96+
3. 关键概念必须有加粗的中英文专有名词
97+
4. 文档结尾附 Action Plan 或 Next Steps
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
name: codebase-reader
3+
description: >
4+
Fetch and navigate EvoMap platform source code from GitHub. Use when the user
5+
says "获取前端", "前端代码", "查前端", "看前端", "website代码" to clone
6+
EvoMap/evomap-website, or "获取后端", "后端代码", "查后端", "看后端",
7+
"hub代码" to clone EvoMap/evomap-hub. Also activate when the user asks about
8+
EvoMap platform implementation details like "这个接口怎么实现的", "这个页面
9+
怎么写的", or references any EvoMap repo by name — even if they just say
10+
"帮我查一下代码" in the context of EvoMap development (in any language).
11+
version: 1.0.0
12+
---
13+
14+
# EvoMap Codebase Reader
15+
16+
Fetch, navigate, and answer questions about EvoMap's source code repositories.
17+
Maps shorthand phrases to the correct GitHub repo, clones it locally, and
18+
provides a ready-to-query codebase so subsequent questions can be answered
19+
with real code — not guesses.
20+
21+
## When to activate
22+
23+
- User says "获取前端", "前端代码", "前端源码", "查前端", "看前端", "website 代码"
24+
- User says "获取后端", "后端代码", "后端源码", "查后端", "看后端", "hub 代码"
25+
- User asks about EvoMap platform code, routes, components, APIs, services
26+
- User mentions "evomap-website", "evomap-hub", or any EvoMap repo by name
27+
- User asks "这个接口怎么实现的", "这个页面怎么写的" and the context is EvoMap
28+
29+
---
30+
31+
## Repository map
32+
33+
| Shorthand | Repository | Local clone path | Stack |
34+
|-----------|-----------|-----------------|-------|
35+
| **前端** / frontend / website | `EvoMap/evomap-website` | `E:/temp/evomap-website` | Next.js (App Router), Tailwind, RTK Query, next-intl |
36+
| **后端** / backend / hub | `EvoMap/evomap-hub` | `E:/temp/evomap-hub` | Express, Prisma, PostgreSQL, Redis, BullMQ |
37+
38+
Both repos are public on GitHub and accessible via `git clone`.
39+
40+
---
41+
42+
## Workflow
43+
44+
### Phase 1 — Identify target repo
45+
46+
Parse the user's message against the shorthand table above.
47+
48+
```
49+
User says "前端" or related keywords?
50+
├─ Yes → target = EvoMap/evomap-website
51+
└─ No → User says "后端" or related keywords?
52+
├─ Yes → target = EvoMap/evomap-hub
53+
└─ No → Ask the user which repo they mean
54+
```
55+
56+
If the user mentions both (e.g., "前端调后端的接口"), fetch both repos.
57+
58+
### Phase 2 — Clone or verify local copy
59+
60+
Check if the repo already exists at the local clone path:
61+
62+
```
63+
Does E:/temp/{repo-name} exist and contain a .git directory?
64+
├─ Yes → Run `git -C <path> pull` to get latest changes
65+
└─ No → Run `git clone --depth 1 https://github.com/EvoMap/{repo}.git E:/temp/{repo-name}`
66+
```
67+
68+
`--depth 1` keeps the clone fast. If the user explicitly asks for git history
69+
or blame, re-clone without `--depth 1`.
70+
71+
**Fallback**: If `git clone` fails (network issue, auth), inform the user and
72+
suggest they clone manually or check their network connection.
73+
74+
### Phase 3 — Navigate and answer
75+
76+
Once the codebase is available locally, use standard tools (Grep, Glob, Read)
77+
to find and read the relevant code. Common navigation patterns:
78+
79+
| User wants | Where to look (frontend) | Where to look (backend) |
80+
|-----------|-------------------------|------------------------|
81+
| Page / route | `src/app/(main)/**/page.js` ||
82+
| Component | `src/components/**/*.jsx` ||
83+
| API route (BFF) | `src/app/api/**/route.js` ||
84+
| Backend endpoint || `src/routes/**/*.js` |
85+
| Service logic || `src/services/*Service.js` |
86+
| Data model || `prisma/schema.prisma` |
87+
| Navigation | `src/components/layout/NavLinks.jsx` ||
88+
| Config | `next.config.mjs`, `tailwind.config.js` | `src/app.js`, `config/` |
89+
| i18n text | `src/locales/{lang}/*.json` ||
90+
| Store / state | `src/store/**/*.js` ||
91+
| Middleware | `src/proxy.js` (Edge middleware) | `src/middleware/**/*.js` |
92+
93+
When answering, always cite the actual file path and line numbers so the user
94+
can verify.
95+
96+
---
97+
98+
## Rules
99+
100+
1. **Always clone before answering code questions.** Do not guess or fabricate
101+
code from memory. The repos evolve frequently — stale knowledge is worse
102+
than admitting "let me fetch that first."
103+
104+
2. **Use `--depth 1` by default.** Full history is rarely needed and wastes
105+
time and disk. Only fetch full history when the user explicitly needs
106+
git log, blame, or diff across commits.
107+
108+
3. **Pull before answering if the clone already exists.** A stale local copy
109+
can mislead. A quick `git pull` takes seconds and ensures accuracy.
110+
111+
4. **Cite file paths and line numbers.** Every code snippet in your answer
112+
should reference the source file so the user can cross-check.
113+
114+
5. **Don't load entire large files into context.** Files like `a2aService.js`
115+
can exceed 100K characters. Use Grep to locate the relevant function first,
116+
then Read with offset/limit to fetch only what's needed.
117+
118+
6. **Respond in the user's language.** Follow the user's language preference
119+
for explanations. Code stays as-is.
120+
121+
---
122+
123+
*EvoMap Codebase Reader v1.0.0*
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Document Writing Skills
2+
3+
**Version**: 1.0
4+
**Created**: 2025-11-08
5+
**Quality Score**: 70/70 (Excellent)
6+
**Status**: Production Ready
7+
8+
## Overview
9+
10+
Comprehensive document writing patterns and templates that agents can apply when generating professional documentation, reports, contracts, guides, and technical writing across various domains.
11+
12+
## Coverage
13+
14+
### Document Types (10+)
15+
16+
- **API Documentation**: REST/GraphQL/RPC patterns with examples
17+
- **Technical Reports**: Research reports, incident reports, findings
18+
- **Architecture Decision Records**: ADR templates with options analysis
19+
- **User Guides**: Getting started, tutorials, troubleshooting
20+
- **Changelogs**: Keep a Changelog format with semantic versioning
21+
- **Legal Documents**: Contracts, memoranda, citations (Finlex/EUR-Lex)
22+
- **Security Reports**: Vulnerability reports, threat modeling (STRIDE), pentesting
23+
- **Product Documents**: PRDs, feature specs, user stories, prioritization (RICE/MoSCoW)
24+
- **Technical Writing**: Style guide, grammar, accessibility (WCAG AA)
25+
- **Visual Elements**: Code examples, diagrams, tables
26+
27+
## Target Agents
28+
29+
- documenter-agent
30+
- legal-agent
31+
- researcher-agent
32+
- developer-agent
33+
- qa-tester-agent
34+
- security-agent
35+
- product-manager-agent
36+
37+
## Structure
38+
39+
```
40+
document-writing-skills/
41+
├── SKILL.md (640 lines)
42+
│ - Core writing principles
43+
│ - Quick-reference templates
44+
│ - Quality checklist
45+
46+
└── references/ (2,319 lines)
47+
├── legal-document-patterns.md
48+
│ - Contract templates (employment, service)
49+
│ - Legal memorandum structure
50+
│ - Citation formats (Finlex, EUR-Lex, Bluebook)
51+
52+
├── technical-writing-guide.md
53+
│ - Style guide (voice, tense, person)
54+
│ - Grammar and punctuation
55+
│ - Accessibility guidelines
56+
57+
├── security-report-patterns.md
58+
│ - Vulnerability reports (CVSS scoring)
59+
│ - Threat modeling (STRIDE)
60+
│ - Penetration test reports
61+
62+
└── prd-patterns.md
63+
- Product requirement documents
64+
- User stories and acceptance criteria
65+
- Prioritization frameworks
66+
```
67+
68+
## Usage
69+
70+
### Automatic Triggering
71+
72+
The skill is automatically loaded when agents create documentation. Trigger keywords include:
73+
- "creating API docs"
74+
- "writing user guides"
75+
- "generating reports"
76+
- "drafting changelogs"
77+
- "creating ADRs"
78+
- "writing technical documentation"
79+
80+
### Manual Invocation
81+
82+
```
83+
"Use the document-writing-skills to create [document type]"
84+
```
85+
86+
### Example Requests
87+
88+
**API Documentation**:
89+
```
90+
"Create API documentation for a REST endpoint that retrieves user data by ID."
91+
```
92+
93+
**Legal Memorandum**:
94+
```
95+
"Create a legal memorandum analyzing GDPR compliance for email collection."
96+
```
97+
98+
**Product Requirements**:
99+
```
100+
"Create a PRD for a social media scheduling feature."
101+
```
102+
103+
**Security Report**:
104+
```
105+
"Create a vulnerability report for SQL injection in the login form."
106+
```
107+
108+
## Key Features
109+
110+
- **Progressive Disclosure**: Core patterns in SKILL.md, detailed templates in references
111+
- **Copy-Paste Templates**: Ready-to-use with clear placeholders
112+
- **Quality Checklists**: Built-in validation for completeness
113+
- **Standards Compliance**: Follows industry best practices
114+
- **Before/After Examples**: Shows improvement patterns
115+
116+
## Standards Supported
117+
118+
- Keep a Changelog format
119+
- Semantic Versioning (SemVer)
120+
- ISO 8601 date formats
121+
- WCAG AA accessibility
122+
- CVSS v3.1 scoring
123+
- OWASP Top 10
124+
- STRIDE threat modeling
125+
- RICE/MoSCoW/Kano prioritization
126+
127+
## Quality Score: 70/70
128+
129+
| Category | Score |
130+
| --------------------------- | ----- |
131+
| Structure and Organization | 15/15 |
132+
| Content Quality | 15/15 |
133+
| Usability for Agents | 10/10 |
134+
| Progressive Disclosure | 10/10 |
135+
| Completeness | 10/10 |
136+
| Practical Examples | 5/5 |
137+
| Accuracy and Best Practices | 5/5 |
138+
139+
## License
140+
141+
MIT

0 commit comments

Comments
 (0)