Agent skill

Pgfaq

by digoal in digoal/blog

Answer PostgreSQL core database questions by researching the local postgres source tree, PostgreSQL documentation under doc/src/sgml, relevant source code, and DeepWiki repository knowledge for…

GPL-2.0Auto-check passedDatabases

Install Pgfaq

skills CLI
$ npx skills add digoal/blog --skill pgfaq -a claude-code

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

GitHub CLI
$ gh skill install digoal/blog pgfaq --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/pgfaq .claude/skills/pgfaq && 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
pgfaq
GitHub stars
8.6k
Token cost
~1.2k tokens
SKILL.md length
490 words
Files
2
Skills in repo
98
Repo updated
First seen
Licence
GPL-2.0

At a glance

Answer PostgreSQL core database questions by researching the local postgres source tree, PostgreSQL documentation under doc/src/sgml, relevant source code, and DeepWiki repository knowledge for…

  • Works in 7 steps: Confirm the current working directory is… → Classify the question before researching. → Search local documentation and code first. → …
  • The user asks any PostgreSQL database behavior
  • SKILL.md covers Scope, Required Workflow, Answer Format and Research Discipline
  • Calls git

What it does

Pgfaq is an agent skill from digoal/blog. Answer PostgreSQL core database questions by researching the local postgres source tree, PostgreSQL documentation under doc/src/sgml, relevant source code, and DeepWiki repository knowledge for postgres/postgres; use when the user asks any PostgreSQL database behavior, internals, SQL, configuration, administration, performance, storage, planner, executor, replication, or documentation question and wants a sourced Markdown answer saved to the current project's markdown directory. Refuse questions about…

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Databases, covering SQL. It works with PostgreSQL and SQL. 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 asks any PostgreSQL database behavior
  • Documentation question and wants a sourced Markdown answer saved to the current projects markdown directory

Example prompts

  • “/pgfaq”

Workflow steps

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

  1. Confirm the current working directory is a PostgreSQL source checkout.
  2. Classify the question before researching.
  3. Search local documentation and code first.
  4. Ask DeepWiki MCP for repository-grounded context.
  5. Synthesize the answer.
  6. Validate and revise before saving.
  7. Save the final answer as Markdown.

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

    Shell commands in SKILL.md call:

    • git

    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

Pgfaq loads about 1.2k tokens when it runs. Until then it costs about 176 tokens; SKILL.md has 490 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

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

Download SKILL.mdSave it as .claude/skills/pgfaq/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
pgfaq
description
Answer PostgreSQL core database questions by researching the local postgres source tree, PostgreSQL documentation under doc/src/sgml, relevant source code, and DeepWiki repository knowledge for postgres/postgres; use when the user asks any PostgreSQL database behavior, internals, SQL, configuration, administration, performance, storage, planner, executor, replication, or documentation question and wants a sourced Markdown answer saved to the current project's markdown directory. Refuse questions about non-PostgreSQL-core projects, including PostgreSQL ecosystem plugins, extensions maintained outside postgres/postgres, external tools, drivers, cloud services, forks, or third-party products.

pgfaq

Scope

Use this skill only for questions about the PostgreSQL core open-source project in postgres/postgres.

Refuse the request if it is about a project outside PostgreSQL core, including third-party extensions, plugins, tools, drivers, cloud products, forks, wrappers, or ecosystem projects. State briefly that pgfaq only answers PostgreSQL core questions.

Required Workflow

  1. Confirm the current working directory is a PostgreSQL source checkout.

    • Verify expected paths exist, especially doc/src/sgml.
    • Prefer git remote -v, git rev-parse --show-toplevel, and directory checks when needed.
    • If the current directory is not a PostgreSQL source tree, stop and ask the user to run from a postgres source checkout or provide the correct path.
  2. Classify the question before researching.

    • Confirm it is within PostgreSQL core scope.
    • Identify likely documentation areas under doc/src/sgml.
    • Identify likely source areas, such as src/backend, src/include, src/bin, src/test, or contrib only when the topic is a PostgreSQL core/contrib module shipped in the postgres repository.
  3. Search local documentation and code first.

    • Use rg for targeted searches in doc/src/sgml and relevant source directories.
    • Read the smallest necessary source and documentation excerpts.
    • Prefer primary PostgreSQL docs and code over memory.
    • Capture exact file paths and line numbers for claims that matter.
  4. Ask DeepWiki MCP for repository-grounded context.

    • Use mcp__deepwiki__ask_question with repoName: "postgres/postgres".
    • Ask focused questions tied to the user's topic, not broad general prompts.
    • Treat DeepWiki as guidance to cross-check against local code and docs, not as the sole source.
  5. Synthesize the answer.

    • Write in Chinese unless the user asks for another language.
    • Make the answer practical and source-backed.
    • Include code/doc references as local paths with line numbers when available.
    • Distinguish confirmed facts from inference.
    • Avoid unsupported advice, folklore, and version claims not backed by the checked source tree or docs.
  6. Validate and revise before saving.

    • Send the draft substance to DeepWiki MCP and ask it to check correctness against postgres/postgres.
    • Re-check any DeepWiki correction against local docs or source code.
    • Revise the answer when a correction is substantiated.
    • Repeat the DeepWiki validation and local verification loop until no material correctness issues remain or remaining uncertainty is explicitly documented.
  7. Save the final answer as Markdown.

    • Ensure the current project has a markdown directory; create it if missing.
    • Save the final answer under markdown/ with a concise, filesystem-safe filename derived from the question.
    • Include a short source section listing the key local docs/code files and DeepWiki checks used.
    • Tell the user the saved file path.
Show full SKILL.md (85 more words)Show less

Answer Format

Use this structure unless the user's requested format clearly conflicts:

markdown
# <question-title>

## 结论

<direct answer>

## 原理与证据

<explanation grounded in PostgreSQL docs/code>

## 实践建议

<commands, SQL examples, configuration notes, or diagnostic steps when relevant>

## 边界与版本说明

<scope, caveats, source-tree/version limitations, uncertainties>

## 参考来源

- `doc/src/sgml/...`
- `src/...`
- DeepWiki MCP: `postgres/postgres` correctness check

Research Discipline

  • Use local PostgreSQL docs and source as the authority.
  • Do not answer from memory when code or docs can be checked.
  • Do not browse the web unless the user explicitly asks and the answer still stays within PostgreSQL core scope.
  • Do not cite DeepWiki as a replacement for local evidence.
  • Do not modify PostgreSQL source files while answering.
  • Keep changes limited to the generated Markdown file and creating markdown/ if needed.

© 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 1 other file in skills/pgfaq of digoal/blog.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 69fb793

Compare with similar skills

Pgfaq 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.

Pgfaq compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pgfaq this skilldigoal/blog8.6k—~1.2kAutomated 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 2 days ago
    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 6 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 7 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 10 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 10 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 10 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 10 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 10 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 10 days ago
    Auto-check passed

Works with

Categories

Questions about Pgfaq

What does Pgfaq do?

Answer PostgreSQL core database questions by researching the local postgres source tree, PostgreSQL documentation under doc/src/sgml, relevant source code, and DeepWiki repository knowledge for…. Pgfaq is an agent skill from digoal/blog. Answer PostgreSQL core database questions by researching the local postgres source tree, PostgreSQL documentation under doc/src/sgml, relevant source code, and DeepWiki repository knowledge for postgres/postgres; use when the user asks any PostgreSQL database behavior, internals, SQL, configuration, administration, performance, storage, planner, executor, replication, or documentation question and wants a sourced Markdown answer saved to the current project's markdown directory.

When should I use Pgfaq?

Pgfaq fits situations like: the user asks any PostgreSQL database behavior; documentation question and wants a sourced Markdown answer saved to the current projects markdown directory.

How do I install Pgfaq in Claude Code?

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

How do I install Pgfaq in Codex?

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

Can I use Pgfaq 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 pgfaq -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pgfaq, .gemini/skills/pgfaq, .github/skills/pgfaq and .opencode/skills/pgfaq in your project.

What does Pgfaq need to run?

Going by SKILL.md and its folder, Pgfaq needs the command-line tools its instructions call (git).

Does Pgfaq 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 Pgfaq 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. Review the folder before installing.

What licence does Pgfaq use?

Pgfaq 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 Pgfaq use?

About 1.2k tokens (SKILL.md is roughly 4.6k 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 Pgfaq?

Skills that share tags, products or a category with Pgfaq: 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 Pgfaq?

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.