Agent skill

Postgres Commit History Article

by digoal in digoal/blog

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…

GPL-2.0Auto-check passedDatabases

Install Postgres Commit History Article

skills CLI
$ npx skills add digoal/blog --skill postgres-commit-history-article -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install digoal/blog postgres-commit-history-article --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/digoal/blog.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/postgres-commit-history-article .claude/skills/postgres-commit-history-article && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
postgres-commit-history-article
GitHub stars
8.6k
Token cost
~2.3k tokens
SKILL.md length
912 words
Files
3 (incl. scripts)
Skills in repo
98
Repo updated
First seen
Licence
GPL-2.0

At a glance

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…

  • Works in 7 steps: Verify context. → Collect commit metadata without diffs. → First-pass analysis from short… → …
  • The user is inside a PostgreSQL source checkout and provides two commit ids
  • SKILL.md covers Goal, Inputs, Workflow and No-Article Output, plus 4 more sections
  • Runs Python scripts from its folder; calls git and python3

What it does

Postgres Commit History Article is an agent skill from digoal/blog. 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…

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `agents/openai.yaml` and `scripts/collect_pg_commits.py`).

It sits in Databases, covering Commit messages, Messaging and chat bots and SQL. It works with PostgreSQL, SQL and WeChat. The repository describes itself as: AI,Opensource,Database,Business,Finance,Minds. git clone --depth 1 https://github.com/digoal/blog. The licence is GPL-2.0.

When your agent uses it

  • 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

Example prompts

  • “/postgres-commit-history-article”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Verify context.
  2. Collect commit metadata without diffs.
  3. First-pass analysis from short descriptions only.
  4. Group related commits.
  5. Deep-read only selected groups.
  6. Verify example material before writing usage examples.
  7. Write the article.

What it can do on your machine

Read from SKILL.md and the folder at commit 69fb793. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Postgres Commit History Article loads about 2.3k tokens when it runs. Until then it costs about 175 tokens; SKILL.md has 912 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~175
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from digoal/blog at commit 69fb793, republished under its GPL-2.0 licence (© digoal). 912 words, ~2,256 tokens.

Download SKILL.mdSave it as .claude/skills/postgres-commit-history-article/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
postgres-commit-history-article
description
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 return a no-article analysis when no valuable commits are present.

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:

text
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

  1. Verify context.

    • Confirm git rev-parse --show-toplevel succeeds.
    • Confirm the repository looks like PostgreSQL, for example src/backend, src/include, and configure.ac exist.
    • Create markdown/ in the current project if missing.
  2. Collect commit metadata without diffs.

    • Prefer scripts/collect_pg_commits.py from this skill.
    • Run it from the PostgreSQL repository root:
bash
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.
  1. 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.
  2. 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.
  3. 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.
  4. 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.
    • 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 operational checklist or validation query and state the limitation.
  5. Write the article.

    • Only write the article when at least one selected group has clear DBA or application-developer value.
    • Output Markdown to markdown/ in the current project. Use a filename like:
text
markdown/postgres-commit-history-<short1>-<short2>.md
  • Use Chinese, suitable for 公众号传播, but keep technical claims precise.
  • Add a brief source note that the analysis is based on git commit logs and full commit messages, not a full code audit.
Show full SKILL.md (274 more words)Show less

No-Article Output

When the selected range has no commits worth a DBA/application-developer article, return a concise Chinese analysis instead of creating a Markdown file:

markdown
本次范围:<commit1>..<commit2>(含两端),共 <n> 个提交。

结论:未发现值得面向 DBA 或应用开发者单独成文解读的提交。

原因:
- 已剔除 range 内 revert 的提交:<ids or 无>
- 其余提交主要属于:<测试/文档/拼写/构建/内部重构/无用户可见行为变化等>
- 未发现明确的性能、可靠性、可观测性、SQL 行为、复制恢复、运维接口、应用兼容性或迁移风险变化。

可保留记录:
| commit | 作者 | 简短描述 | 判断 |
|---|---|---|---|
| abc1234 | ... | ... | 不成文:... |

未输出文章文件。

Do not create markdown/postgres-commit-history-*.md in this case. It is acceptable to keep the collector JSON only if it was already generated as working data.

Required Article Structure

Use a consistent structure for every selected item or group:

markdown
## N. 标题(commit: abc1234, def5678)

一句话简介:...

出现背景:...

解决什么痛点:...

用的什么方法:...

效果对比:
- 补丁前:...
- 补丁后:...

使用场景:...

最佳实践:...

使用示例:
```sql
...
```

If a SQL example is not appropriate, use a shell, config, monitoring query, operational checklist, or "无需用户侧改动,但建议验证..." example.

Every usage example must be backed by one of: a PostgreSQL SQL regression/isolation/TAP test, SGML documentation, or relevant source context. Prefer citing the path briefly after the example, for example: 示例依据:src/test/regress/sql/xxx.sql, doc/src/sgml/yyy.sgml.

Article Outline

Recommended outline:

markdown
# PostgreSQL 提交解读:从 <commit1> 到 <commit2>,哪些变化最值得 DBA 和开发者关注?

> 范围:<commit1>..<commit2>(含两端),共 <n> 个提交;剔除 range 内 revert 后重点解读 <m> 组。

## 先给结论

## 这批提交的主线

```mermaid
flowchart LR
  A["可靠性"] --> B["运维成本下降"]
  C["性能/优化器"] --> D["查询体验改善"]
  E["开发者接口"] --> F["应用改造更少"]
```

## 值得关注的改进

... repeat the required per-group structure ...

## DBA 落地清单

## 应用开发者落地清单

## 版本升级与验证建议

## 附:commit 分组表

Add Mermaid diagrams where they clarify relationships, such as:

  • commit groups by value chain: feature -> mechanism -> impact
  • before/after behavior flow
  • DBA rollout checklist

Use inline SVG only if Mermaid cannot express the concept clearly. Keep diagrams readable in WeChat Markdown.

Quality Rules

  • Do not invent behavior not supported by commit messages. If inferring from PostgreSQL architecture, mark it as inference.
  • Keep commit short ids attached to every claim-heavy group.
  • Distinguish DBA value from application-developer value.
  • Mention breaking/behavioral changes and migration risks explicitly.
  • Avoid dumping all commits. The article should curate the most valuable groups, then include a compact appendix table for the rest.
  • Do not force an article when all commits are low-value for DBAs and application developers. Return the no-article analysis instead.
  • Do not write SQL or command examples from memory alone. Verify them against PostgreSQL tests, docs, or source context first.
  • Do not include full commit descriptions verbatim. Summarize them.
  • Do not include code diffs.

Useful Commands

bash
# Confirm both endpoints exist
git rev-parse --verify <commitid1>^{commit}
git rev-parse --verify <commitid2>^{commit}

# Show only subjects for the inclusive range
git log --reverse --format='%h%x09%an%x09%ad%x09%s' --date=short <older>^..<newer>

# Show full message for selected commits, no diff
git show -s --format=fuller <commit>

© digoal, GPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in skills/postgres-commit-history-article of digoal/blog.

  • SKILL.md
  • agents/openai.yaml
  • scripts/collect_pg_commits.py

Open the folder on GitHubat commit 69fb793

Compare with similar skills

Postgres Commit History Article next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Postgres Commit History Article compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Postgres Commit History Article this skilldigoal/blog8.6k—~2.3kAutomated safety check: PassGPL-2.0
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Chdb SQLvemetric/vemetric3941 repos~1.2kAutomated safety check: PassApache-2.0
Schema Explorationtimescale/pg-aiguide1.9k—~1.1kAutomated safety check: PassApache-2.0
Mz BenchmarkMaterializeInc/materialize6.4k—~2.8kAutomated safety check: PassCustom licence
Dingtalk AitableDingTalk-Real-AI/dingtalk-workspace-cli3.2k—~5.4kAutomated safety check: PassApache-2.0

Similar skills

  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Chdb SQL

    vemetric/vemetric

    A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

    394 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed
  • Schema Exploration

    timescale/pg-aiguide

    Explore an existing PostgreSQL database before answering questions about its data or writing SQL.

    1.9k GitHub stars~1.1k tokensUpdated 5 days ago
    DatabasesAuto-check passed
  • Mz Benchmark

    MaterializeInc/materialize

    Add/modify/debug Materialize perf benchmark scenarios. An agent skill from MaterializeInc/materialize.

    6.4k GitHub stars~2.8k tokensUpdated today
    DatabasesAuto-check passed
  • Dingtalk Aitable

    DingTalk-Real-AI/dingtalk-workspace-cli

    钉钉 AI 表格(多维表)业务操作。Use when 用户需要操作 AI 表格/多维表/Base/Table、应用模式/App 页面/Widget、建表、查写记录、字段、记录评论、评论回复、访问密钥(API Key)、SQL/PostgreSQL/SELECT/JOIN、筛选、排序、公式、模板、批量导入 CSV 或 JSON、导出、仪表盘、图表、上传附件、数据源配置与同步、按任务 ID…

    3.2k GitHub stars~5.4k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Sql2er

    ystemsrx/sql_to_ER

    A skill your agent uses when the user wants a Chen-model ER diagram from SQL CREATE TABLE statements or DBML, wants to rearrange or clean up an existing sql2er state, wants a skeleton-only overview…

    188 GitHub stars~1.1k tokensUpdated 6 days ago
    DatabasesAuto-check passed

More from digoal/blog

All 98 skills in this repo
  • 三层审查模型,逐段逐句验证文章真伪、证据链与逻辑结构。Use when the user asks to fact-check, verify, audit, or evaluate the credibility of an article, essay, report, opinion piece, social-media post, or any written claim —…

    8.6k GitHub stars~939 tokensUpdated 9 days ago
    Auto-check passed
  • Find latent bugs in a local PostgreSQL source tree (RELxxSTABLE branch or HEAD) the way a core hacker does: build a heavily-poisoned debug instance (cassert + cache-discard + -O0/-ggdb3 + core…

    8.6k GitHub stars~4k tokensUpdated 9 days ago
    Auto-check passed
  • Digoal

    digoal/blog

    Portable digital employee distilled from digoal's personal blog for PostgreSQL, PolarDB, DuckDB, AI+database, vector/RAG, database operations, source-code reading, technical content creation…

    8.6k GitHub stars~2.2k tokensUpdated 9 days ago
    Auto-check passed
  • 从论文 PDF 文件或论文 PDF URL 生成通俗易懂、图文并茂、带批判性评估的中文 Markdown 解读,并保存到当前项目的 markdown 目录。Use when the user asks to interpret,精读,解读,summarize,explain,analyze, or write an article from an academic paper PDF…

    8.6k GitHub stars~1.5k tokensUpdated 9 days ago
    Auto-check passed
  • Analyze a product from documentation, websites, PDFs, articles, release notes, pricing pages, app listings, reviews, filings, or related links; save separate intermediate analyses from seven roles…

    8.6k GitHub stars~1.8k tokensUpdated 9 days ago
    Auto-check passed
  • Turn a blog post, article, notes, or any source material into a set of vertical poster images — one cover plus several coherent content slides that explain the core points.

    8.6k GitHub stars~1.4k tokensUpdated 9 days ago
    Auto-check passed

Categories

Questions about Postgres Commit History Article

What does Postgres Commit History Article do?

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…. Postgres Commit History Article is an agent skill from digoal/blog. 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.

When should I use Postgres Commit History Article?

Postgres Commit History Article fits situations like: 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.

How do I install Postgres Commit History Article in Claude Code?

Run `npx skills add digoal/blog --skill postgres-commit-history-article -a claude-code`. Or copy the skill folder (skills/postgres-commit-history-article in digoal/blog) into .claude/skills/postgres-commit-history-article in your project. Claude Code loads it when a task matches its description.

How do I install Postgres Commit History Article in Codex?

Run `npx skills add digoal/blog --skill postgres-commit-history-article -a codex`. Or copy the skill folder (skills/postgres-commit-history-article in digoal/blog) into .agents/skills/postgres-commit-history-article in your project. Codex loads it when a task matches its description.

Can I use Postgres Commit History Article in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add digoal/blog --skill postgres-commit-history-article -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/postgres-commit-history-article, .gemini/skills/postgres-commit-history-article, .github/skills/postgres-commit-history-article and .opencode/skills/postgres-commit-history-article in your project.

What does Postgres Commit History Article need to run?

Going by SKILL.md and its folder, Postgres Commit History Article needs Python for the scripts in its folder and the command-line tools its instructions call (git and python3). Our summary lists: Python 3.

Does Postgres Commit History Article access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Postgres Commit History Article safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Postgres Commit History Article use?

Postgres Commit History Article is published under the GPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Postgres Commit History Article use?

About 2.3k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Postgres Commit History Article?

Skills that share tags, products or a category with Postgres Commit History Article: SQL Database Support for pREST (prest/prest, 4.6k stars), Chdb SQL (vemetric/vemetric, 394 stars), Schema Exploration (timescale/pg-aiguide, 1.9k stars) and Mz Benchmark (MaterializeInc/materialize, 6.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Postgres Commit History Article?

digoal (a GitHub user) maintains it in digoal/blog, which has 8,587 GitHub stars. The repository holds 98 skills in this directory. The repository was last updated on September 28, 2026.

Source: digoal/blog on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.