You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .cursor/skills/pgweekly-blog-generation/SKILL.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,19 @@ Generates English and Chinese technical blog posts from PostgreSQL mailing list
22
22
-`attachments/` - **Downloaded patches** (e.g. `.patch` files from the mailing list)
23
23
-`attachments.txt` - List of downloaded attachment filenames
24
24
25
-
3.**Analyze** content:
25
+
3.**Verify** all patch set versions are downloaded (required before analyze):
26
+
- Read `thread.md` and `thread.html` to identify all patch versions referenced in the thread (e.g. v1, v2, v3, v4, v5…; also patterns like `0001-`, `0002-` in patch series)
27
+
- List files in `attachments/` and compare: every referenced version must have a corresponding downloaded file
28
+
- If any referenced version is missing:
29
+
- Run `python3 tools/fetch_data.py --thread-dir "data/threads/YYYY-MM-DD/<thread-id>"` to retry downloading missing attachments
30
+
- If still missing, do not proceed with analysis; report the missing versions and ask the user to verify the thread or manually add the patches
31
+
- Only proceed to analyze/generate once all referenced patch versions are present in `attachments/`
32
+
33
+
4.**Analyze** content:
26
34
- If multiple patch versions (v1, v2, v3...), run `diff -u` between versions to explain evolution
27
35
- Identify main topic, key decisions, reviewer feedback
28
36
29
-
4.**Generate** TWO blog posts with this structure:
37
+
5.**Generate** TWO blog posts with this structure:
- Filename: kebab-case from main topic (e.g. `planner-count-optimization`)
42
50
43
-
6.**Update** SUMMARY.md and year READMEs:
51
+
7.**Update** SUMMARY.md and year READMEs:
44
52
- Add entries under both `# 🇬🇧 English` and `# 🇨🇳 中文`
45
53
- Follow existing hierarchy: year → week → link to article
46
54
-**Put the new week/article at the top** (newest first): insert the new week immediately after the year line, so the latest week appears first in the list.
- This will download the HTML, convert to Markdown, and save attachments
21
21
22
-
2. **Analyze the content:**
22
+
2. **Verify all patch set versions are downloaded:**
23
+
- Identify all patch versions referenced in the thread (v1, v2, v3…; or 0001-, 0002- in patch series)
24
+
- Ensure every referenced version exists in `attachments/`
25
+
- If any are missing, run `python3 tools/fetch_data.py --thread-dir "data/threads/YYYY-MM-DD/<thread-id>"` to retry; do not proceed until all are present
26
+
27
+
3. **Analyze the content:**
23
28
- Read the converted Markdown file in `data/threads/YYYY-MM-DD/<thread-id>/thread.md`
24
29
- Review the original HTML if you need more context
25
30
- Check the `attachments/` folder for any patch files
26
31
- If there are multiple patch versions (v1, v2, v3, etc.), use `diff` to understand what changed between versions
27
32
28
-
3. **Generate a technical blog post with:**
33
+
4. **Generate a technical blog post with:**
29
34
- **Clear title:** Based on the main topic discussed
30
35
- **Introduction:** Brief context and why this matters
31
36
- **Technical Analysis:**
@@ -42,12 +47,12 @@ I need you to act as a PostgreSQL expert and technical writer to generate a high
42
47
- **Current Status:** Where the patch/discussion stands
43
48
- **Conclusion:** Summary and implications for PostgreSQL users
44
49
45
-
4. **Write TWO versions (English and Chinese):**
50
+
5. **Write TWO versions (English and Chinese):**
46
51
- **English version:** Professional technical writing style, clear explanations
47
52
- **Chinese version:** Professional Chinese technical writing, natural terminology
48
53
- **Both versions:** Code blocks with proper syntax highlighting, links to documentation
49
54
50
-
5. **Save the blogs:**
55
+
6. **Save the blogs:**
51
56
- Determine the appropriate year and week number based on the thread date or current date
52
57
- Generate a descriptive filename based on the content
53
58
- **Create directories if needed and save TWO files:**
@@ -80,13 +85,17 @@ Act as a PostgreSQL core developer and technical writer. Generate a comprehensiv
- Identify all patch versions referenced in the thread (v1, v2, v3…; 0001-, 0002-…)
90
+
- Ensure every referenced version exists in `attachments/`; if any missing, run `python3 tools/fetch_data.py --thread-dir "data/threads/YYYY-MM-DD/<thread-id>"` and do not proceed until all are present
91
+
92
+
**Step 3: Content Analysis**
84
93
Review:
85
94
- Markdown content: `data/threads/*/thread.md`
86
95
- Patches in: `data/threads/*/attachments/`
87
96
- For multiple patch versions, run: `diff -u v1-*.patch v2-*.patch` to see evolution
88
97
89
-
**Step 3: Blog Structure**
98
+
**Step 4: Blog Structure**
90
99
91
100
Create a blog with these sections:
92
101
@@ -153,7 +162,7 @@ For each major version:
153
162
- Related documentation
154
163
- Previous related discussions (if mentioned)
155
164
156
-
**Step 4: File Management**
165
+
**Step 5: File Management**
157
166
- Determine year and week: [Calculate from thread date or today's date]
158
167
- Create paths: `src/en/{year}/{week}/` and `src/cn/{year}/{week}/`
159
168
- Filename: [Generate from main topic, lowercase-with-hyphens]
@@ -191,16 +200,17 @@ For faster processing:
191
200
Generate a PostgreSQL technical blog from this thread: {THREAD_ID_OR_URL}
3. Compare patch versions if multiple exist (use diff)
196
-
4. Write a technical blog covering:
203
+
2. Verify all patch set versions referenced in the thread are downloaded; retry with `--thread-dir` if any are missing; do not proceed until all are present
204
+
3. Read the Markdown content and patches
205
+
4. Compare patch versions if multiple exist (use diff)
206
+
5. Write a technical blog covering:
197
207
- What problem is being solved
198
208
- How the solution works
199
209
- Key discussion points
200
210
- Patch evolution (if applicable)
201
211
- Current status
202
-
5. Save to: `src/{year}/{appropriate-week}/{descriptive-name}.md`
203
-
6. Update `src/SUMMARY.md`
212
+
6. Save to: `src/{year}/{appropriate-week}/{descriptive-name}.md`
213
+
7. Update `src/SUMMARY.md`
204
214
205
215
Write as a PostgreSQL expert. Focus on technical accuracy and clarity.
206
216
```
@@ -250,11 +260,12 @@ I have {N} PostgreSQL mailing list threads to convert into blog posts. Process t
0 commit comments