postgres-commit-history-article
它能做什么
这个技能查看两个提交之间的 PostgreSQL 提交历史,并撰写一篇关于对数据库用户有影响的改动的文章。适合关注 PostgreSQL 版本发布的 DBA 和开发者。
适用场景
- ✓你想了解两个提交之间 PostgreSQL 有哪些改动的时候。
- ✓你想写一篇关于 PostgreSQL 新功能、面向 DBA 和开发者的文章的时候。
- ✓你需要用 PostgreSQL 测试或文档核对用法示例的时候。
技能链接
https://github.com/digoal/blog/blob/master/skills/postgres-commit-history-article/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请查看这两个 ID 之间的 PostgreSQL 提交,写一篇中文文章,介绍 DBA 应该了解的改动。”
每周 5 个新技能,1 分钟读完。
工作原理
它先收集提交信息而不看完整差异,挑选有价值的改动,再对照文档和测试核对示例,然后写出文章。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Postgres Commit History Article
Goal
Turn a PostgreSQL commit range into a publishable Chinese Markdown article for DBA and application developers when the range contains valuable user-facing or operator-facing changes. Work from commit logs first, then only deep-read full commit messages for selected valuable groups. Before writing usage examples, inspect relevant SQL tests, documentation, or source context so examples are rich and correct. Do not analyze code diffs unless needed to understand a mechanism or produce a practical example.
Inputs
Expect the user to run the skill from a PostgreSQL git checkout and provide:
commitid1 commitid2
Treat the range as inclusive of both endpoints. If the order is unclear, test both ancestry directions and use the direction that produces a valid range; otherwise ask for clarification.
Workflow
Verify context.
- Confirm
git rev-parse --show-toplevelsucceeds. - Confirm the repository looks like PostgreSQL, for example
src/backend,src/include, andconfigure.acexist. - Create
markdown/in the current project if missing.
- Confirm
Collect commit metadata without diffs.
- Prefer
scripts/collect_pg_commits.pyfrom this skill. - Run it from the PostgreSQL repository root:
- Prefer
python3 /path/to/postgres-commit-history-article/scripts/collect_pg_commits.py commitid1 commitid2 --output markdown/postgres-commit-range.json
- The JSON includes inclusive commits, short ids, authors, dates, subjects, full bodies, revert relationships, merge flags, and suggested chronological/reverse order.
First-pass analysis from short descriptions only.
- Read every commit subject.
- Exclude commits that were reverted inside the selected range. Exclude both the reverting commit and the reverted commit unless the revert itself carries lasting user-facing value.
- Treat typo, buildfarm-only, test-only, documentation-only, translation-only, and mechanical cleanup commits as low priority unless they expose an important operational change.
- Select commits with clear value for DBAs or application developers: performance, reliability, observability, planner/executor behavior, SQL features, replication, recovery, backup, storage, concurrency, security, compatibility, extension APIs, client tooling, migration risk, and behavior changes.
- If no commits remain with clear DBA or application-developer value, stop here. Return an analysis summary in the chat and do not write a Markdown article file.
Group related commits.
- Group commit ids that solve the same problem, evolve the same feature, fix follow-ups for the same change, or are authored by the same person around the same subsystem.
- Prefer problem-oriented group names, not file/subsystem names. Example: "降低逻辑复制槽失效风险" is better than "replication commits".
- Preserve each group's commit short ids and authors.
Deep-read only selected groups.
- For each selected group, read the full commit messages from the collected JSON or with
git show -s --format=fuller <commit>. - Still avoid code diff analysis. Inspect diff only when the full message is insufficient to explain the mechanism, compatibility impact, or example.
- Capture exact behavior changes, affected users, constraints, GUCs/options/functions/catalogs, and upgrade caveats.
- For each selected group, read the full commit messages from the collected JSON or with
Verify example material before writing usage examples.
- Before writing each
使用示例, inspect nearby authoritative material for that feature:- SQL regression tests:
src/test/regress/sql/,src/test/isolation/specs/,src/test/subscription/t/,src/test/recovery/t/, extension test SQL, or TAP tests. - Documentation:
doc/src/sgml/, especially pages for SQL commands, functions, catalogs, GUCs, monitoring views, replication, backup/recovery, and release notes. - Source context only when tests/docs do not expose enough syntax or operational detail.
- SQL regression tests:
- Prefer examples adapted from committed tests or docs, then simplify them for readers.
- If a commit introduces SQL syntax, functions, catalog columns, GUCs, views, command options, psql/client behavior, replication/recovery operations, or extension APIs, verify the exact names and valid usage from tests/docs before writing.
- Record the evidence used for each example in your working notes and mention key paths when useful in the article.
- If tests/docs/source do not provide enough confidence, do not fabricate a runnable SQL example. Use an oper
- Before writing each
常见问题
它会阅读每一处代码改动吗?
不会。它先看提交日志,只对选定的有价值的分组阅读完整说明。
需要 PostgreSQL 的代码检出吗?
需要。技能必须在 PostgreSQL git 检出目录中运行。
如果没有有价值的改动怎么办?
如果该范围内没有有价值的改动,技能就不会写文章。
详情
作者的原始描述
Analyze PostgreSQL git commit history between two commit ids and, when valuable DBA/application-developer changes exist, write a Chinese Markdown article for WeChat/公众号 readers with examples checked against SQL tests, docs, or relevant source. Use when the user is inside a PostgreSQL source checkout and provides two commit ids, asks to interpret Postgres commits, summarize a release/development window, identify DBA/application-developer value from commit logs, group related commits, exclude reverted commits, and either output a sourced article under the current project's markdown directory or
repo: digoal/blog
热度
- GitHub 星标
- 8.6k
- 排名
- #12371
- 许可证
- GPL-2.0
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
article-to-podcast-script
8.6k帮你的智能体把 Markdown 文章改写成播客脚本,支持一到四位说话人,并保存为文本文件,默认使用中文。
axiom-explainer
8.6k帮你的智能体写一篇清晰的中文文章,讲解一个观点、定律或理论,并附上例子、适用范围和简单示意图。
blog-cover-poster
8.6k帮你的智能体把文章或笔记做成一组竖版海报图,包括封面和若干张讲解要点的幻灯片。
buffett
8.6k帮你的智能体用沃伦·巴菲特的思路分析公司和股票,参考他关于护城河、管理层和安全边际的观点。