Skip to content

Commit c8917ef

Browse files
committed
skill: enhance SQL convention
1 parent 00852a7 commit c8917ef

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

.cursor/skills/pgweekly-blog-generation/SKILL.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Generates English and Chinese technical blog posts from PostgreSQL mailing list
4545
- Technical Details (implementation, edge cases, performance)
4646
- Current Status (patch/discussion state)
4747
- Conclusion (summary, implications)
48+
- **SQL examples:** follow the [SQL examples convention](#sql-examples-convention) below (both languages).
4849

4950
6. **Save** both versions:
5051
- English: `src/en/{year}/{week}/{descriptive-filename}.md`
@@ -75,6 +76,28 @@ Generates English and Chinese technical blog posts from PostgreSQL mailing list
7576
| Chinese | Professional 中文 technical writing, natural terminology (不要直译) |
7677
| Both | Code blocks with syntax highlighting; links to docs/references |
7778

79+
## SQL examples convention
80+
81+
**Default:** If the thread topic can reasonably be illustrated with **SQL** (new/changed functions, syntax, `EXPLAIN`, DDL, GUCs demonstrable in SQL, query patterns, regression-test-style snippets from patches), include a **dedicated subsection** with one or more examples in **both** the English and Chinese posts. Readers expect copy-pasteable snippets.
82+
83+
**What to include**
84+
85+
- Fenced blocks with `sql` syntax highlighting.
86+
- Examples grounded in the thread or attachments (e.g. `strings.sql` / `uuid.sql` from patches, or minimal repros of discussed behavior).
87+
- Short comments on **expected shape of results** or **version/commit requirements** when the feature is not in a released PostgreSQL yet—avoid implying examples run on every existing install without a caveat.
88+
89+
**When to skip**
90+
91+
- The discussion is purely internal (e.g. executor internals with no user-visible SQL), or SQL would be misleading or enormous. In those cases, C snippets or prose are enough; do not force SQL.
92+
93+
**Placement**
94+
95+
- Usually under **Technical Analysis** or **Technical Details** (e.g. `### SQL examples` / `### SQL 示例`); keep EN and CN structurally aligned.
96+
97+
**Parity**
98+
99+
- Chinese and English posts should carry the **same** examples (same statements; comments may be localized).
100+
78101
## Terminology (Chinese)
79102

80103
When writing the Chinese version, use these standard translations:

BLOG_GENERATION_PROMPT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ I need you to act as a PostgreSQL expert and technical writer to generate a high
3636
- **Technical Analysis:**
3737
- Key discussion points and decisions
3838
- Code examples or patch highlights (if relevant)
39+
- **SQL examples:** When the topic can be shown with SQL (functions, DDL, queries, `EXPLAIN`, patterns from regression tests), add a subsection with copy-pasteable `sql` blocks in **both** English and Chinese; include version/caveats if needed. Skip only when SQL would be misleading or not applicable—see `SQL examples convention` in `.cursor/skills/pgweekly-blog-generation/SKILL.md`.
3940
- Evolution of the solution (compare patch versions if multiple exist)
4041
- **Community Insights:**
4142
- Important reviewer feedback

0 commit comments

Comments
 (0)