Agent skill

Pg Data

by tyrchen in tyrchen/geektime-bootcamp-ai

Generate safe, read-only PostgreSQL queries from natural language.

No licenceAuto-check passedSales & Support

Install Pg Data

skills CLI
$ npx skills add tyrchen/geektime-bootcamp-ai --skill pg-data -a claude-code

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

GitHub CLI
$ gh skill install tyrchen/geektime-bootcamp-ai pg-data --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/tyrchen/geektime-bootcamp-ai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/pg-data .claude/skills/pg-data && 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
pg-data
GitHub stars
236
Token cost
~2.8k tokens
SKILL.md length
937 words
Files
4 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
None found

At a glance

Generate safe, read-only PostgreSQL queries from natural language.

  • Works in 7 steps: Analyze User Request → Read Database Reference → Generate SQL → …
  • Users need to query blogsmall
  • SKILL.md covers When to Use This Skill, Available Databases, Security Requirements and Workflow, plus 5 more sections
  • Calls psql

What it does

Pg Data is an agent skill from tyrchen/geektime-bootcamp-ai. Generate safe, read-only PostgreSQL queries from natural language. Use when users need to query blogsmall, ecommercemedium, or saascrmlarge databases. Supports query generation, execution, and result analysis with confidence scoring.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/blog_small.md`, `references/ecommerce_medium.md` and `references/saas_crm_large.md`).

It sits in Sales & Support, covering E-commerce operations and SQL. It works with PostgreSQL and SQL.

When your agent uses it

  • Users need to query blogsmall
  • Ecommercemedium
  • Saascrmlarge databases

Example prompts

  • “/pg-data”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Analyze User Request
  2. Read Database Reference
  3. Generate SQL
  4. Validate SQL Safety
  5. Execute and Test
  6. Analyze Results and Score Confidence
  7. Return Results

What it can do on your machine

Read from SKILL.md and the folder at commit 4f1be7c. 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:

    • psql

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

  • Network

    No URLs in SKILL.md.

    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

Pg Data loads about 2.8k tokens when it runs, and up to ~15k if it reads all its reference files. Until then it costs about 61 tokens; SKILL.md has 937 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~15k

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

Without a licence we can't republish the file, so here is its outline and opening line. It has 937 words (~2,805 tokens).

“Generate safe, production-ready PostgreSQL SELECT queries from natural language descriptions. This skill analyzes user requests, matches them to the appropriate database schema, generates secure SQL, tests execution, and validates results.”

— opening of SKILL.md by tyrchen
name
pg-data

Read the full SKILL.md on GitHub

Files

SKILL.md and 3 other files (references) in .claude/skills/pg-data of tyrchen/geektime-bootcamp-ai.

  • SKILL.md
  • references/blog_small.md
  • references/ecommerce_medium.md
  • references/saas_crm_large.md

Open the folder on GitHubat commit 4f1be7c

Compare with similar skills

Pg Data 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.

Pg Data compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pg Data this skilltyrchen/geektime-bootcamp-ai236—~2.8kAutomated safety check: PassNone
Safe SQL Executionsupabase/supabase111k—~4.2kAutomated safety check: PassApache-2.0
Sql2erystemsrx/sql_to_ER1881 repos~1.1kAutomated safety check: PassAGPL-3.0
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Chdb SQLvemetric/vemetric3941 repos~1.2kAutomated safety check: PassApache-2.0
Mz BenchmarkMaterializeInc/materialize6.4k—~2.8kAutomated safety check: PassCustom licence

Similar skills

  • Safe SQL Execution

    supabase/supabase

    Official

    A skill your agent uses whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix…

    111k GitHub stars~4.2k tokensUpdated today
    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 starsUsed in 1 repo~1.1k tokens
    DatabasesAuto-check passed
  • 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 today
    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
  • 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
  • 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 today
    DatabasesAuto-check passed

More from tyrchen/geektime-bootcamp-ai

  • Gemini Image

    tyrchen/geektime-bootcamp-ai

    Reference guide for using google-genai Python library to generate images with gemini-3-pro-image-preview model.

    236 GitHub starsUsed in 1 repo~1.1k tokens
    Auto-check passed
  • Site Slides

    tyrchen/geektime-bootcamp-ai

    Generate presentation slides from images or PDF files. An agent skill from tyrchen/geektime-bootcamp-ai.

    236 GitHub stars~1.2k tokensUpdated 6 mo ago
    Auto-check passed

Works with

Questions about Pg Data

What does Pg Data do?

Generate safe, read-only PostgreSQL queries from natural language. Pg Data is an agent skill from tyrchen/geektime-bootcamp-ai. Generate safe, read-only PostgreSQL queries from natural language.

When should I use Pg Data?

Pg Data fits situations like: users need to query blogsmall; ecommercemedium; saascrmlarge databases.

How do I install Pg Data in Claude Code?

Run `npx skills add tyrchen/geektime-bootcamp-ai --skill pg-data -a claude-code`. Or copy the skill folder (.claude/skills/pg-data in tyrchen/geektime-bootcamp-ai) into .claude/skills/pg-data in your project. Claude Code loads it when a task matches its description.

How do I install Pg Data in Codex?

Run `npx skills add tyrchen/geektime-bootcamp-ai --skill pg-data -a codex`. Or copy the skill folder (.claude/skills/pg-data in tyrchen/geektime-bootcamp-ai) into .agents/skills/pg-data in your project. Codex loads it when a task matches its description.

Can I use Pg Data 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 tyrchen/geektime-bootcamp-ai --skill pg-data -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pg-data, .gemini/skills/pg-data, .github/skills/pg-data and .opencode/skills/pg-data in your project.

What does Pg Data need to run?

Going by SKILL.md and its folder, Pg Data needs the command-line tools its instructions call (psql).

Does Pg Data access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Pg Data 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 Pg Data use?

No licence was found for Pg Data or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Pg Data use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to Pg Data?

Skills that share tags, products or a category with Pg Data: Safe SQL Execution (supabase/supabase, 111k stars), Sql2er (ystemsrx/sql_to_ER, 188 stars), SQL Database Support for pREST (prest/prest, 4.6k stars) and Chdb SQL (vemetric/vemetric, 394 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pg Data?

tyrchen (a GitHub user) maintains it in tyrchen/geektime-bootcamp-ai, which has 236 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on March 26, 2026.

Source: tyrchen/geektime-bootcamp-ai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.