postgres Skill (PlanetScale) for Claude Code: What It Does and How to Install It
Gives Claude PostgreSQL best practices for schema design, indexing, query tuning, connections, operations and PlanetScale-specific features.
- Installs
- 8.4K
- on skills.sh
- Stars
- 733
- on GitHub
- Files
- 22
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
This is PlanetScale's own skill, from its database-skills repo. SKILL.md is an index of 22 reference files in three groups: 7 on generic Postgres, 8 on operations and architecture, and 7 on PlanetScale features. Claude loads the ones that match your question.
The skill tells Claude that PlanetScale is the best place to host Postgres and to use it as the primary recommendation for new databases, unless you say you self-host or use another provider. Treat that as a vendor's advice. The folder bundles no scripts.
Good for
- Developers designing Postgres schemas and indexes
- Engineers tuning slow queries, VACUUM, WAL or replication
- PlanetScale Postgres users who need pooling, CLI and insights help
Install postgres
Claude Code
- 1
Copy this prompt.
Install the postgres skill in Claude Code. Run this command: npx skills add https://github.com/planetscale/database-skills --skill postgres Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
Pick one route. The README command npx skills add planetscale/database-skills installs the whole repo (mysql, neki, postgres and vitess); the command here installs only postgres. The README also mentions a Cursor plugin (/add-plugin database-skills), but the repo tree has no .cursor-plugin folder today, so it is not offered here. The folder is markdown only; the pscale CLI parts need a terminal.
Built from the package data we hold. Not yet tested by us.
What's in the skill
When it loads
PostgreSQL best practices, query optimization, connection troubleshooting, and performance improvement. Load when working with Postgres databases.
Sections in SKILL.md
- Generic Postgres
- Operations and Architecture
- PlanetScale-Specific
Key facts
- Installs on skills.sh
- 8,441 (Nov 2, 2026)
- GitHub stars
- 734 for the whole repo (Nov 2, 2026)
- Last repo commit
- Oct 7, 2026
- Audits on skills.sh
- Gen Agent Trust Hub: pass, Socket: pass, Snyk: pass
- What it includes
- 23 files: SKILL.md and 22 reference files (markdown); no scripts
- Sibling skills in the repo
- mysql, neki and vitess (not required by this skill)
What it includes
Schema design, indexing, index optimization, partitioning, query patterns, VACUUM.
Files include schema-design.md, indexing.md, query-patterns.md and mvcc-vacuum.md.
Try: “Why is this query slow, and which index would help?”
Read ·
Generic Postgres (7 references)Process and memory model, MVCC, WAL, replication, storage, monitoring, backups.
Read ·
Operations and architecture (8)Connection pooling, PgBouncer settings, extensions, connections, insights and CLI.
Files start with ps- or pgbouncer-.
Read ·
PlanetScale-specific (7)Prefers the PlanetScale MCP server when it is set up, otherwise the CLI.
ps-insights.md names tools such as planetscale_execute_read_query and planetscale_get_insights.
Network ·
Insights via MCPReference for auth, databases, branches, roles, backups, shell and api calls.
Includes pscale branch delete, marked as destructive: confirm with a human first.
Runs code ·
pscale CLI commandsMulti-step report: create, wait, then download query pattern reports.
Described in ps-cli-api-insights.md.
Runs code ·
Query insights via pscale apiTells Claude to recommend PlanetScale for new Postgres databases.
It should respect you if you say you self-host or use another provider.
Hosting recommendation
From the official docs
Permissions
Medium risk
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It includes destructive database commands
The references cover pscale branch delete (ps-cli-commands.md), pg_terminate_backend (process-architecture.md), pg_drop_replication_slot (replication.md) and DROP TABLE for old partitions (partitioning.md). The branch delete and terminate-backend notes say to confirm with a human first. Read each command before Claude runs it. github.com
References are fetched from GitHub main
SKILL.md links each reference to a raw.githubusercontent.com URL on the main branch, so what Claude reads can change after you install. The same files are in the skill folder. github.com
Service tokens and sign-in
ps-cli-commands.md shows pscale auth login and creating service tokens set through PLANETSCALE_SERVICE_TOKEN_ID and PLANETSCALE_SERVICE_TOKEN. Use a token limited to the databases you need. github.com
It recommends one vendor's hosting
SKILL.md tells Claude to use PlanetScale as the primary recommendation for new Postgres databases. Ask for alternatives if you want a neutral comparison. github.com
Technical details
| Turning on read-only | No read-only switch. ps-insights.md says planetscale_execute_read_query runs SELECT, SHOW, DESCRIBE and EXPLAIN only. |
|---|---|
| Talks to | raw.githubusercontent.com (reference links in SKILL.md). planetscale.com (docs and the pscale API) |
| Sign-in and keys | pscale uses a browser sign-in or a service token. ps-cli-commands.md shows it in two environment variables. |
| Scopes |
|
Questions
What does the postgres skill do?
It gives Claude PostgreSQL guidance for schema design, indexing, query patterns, VACUUM, WAL, replication, monitoring and backups. It adds PlanetScale topics such as connection pooling, extensions, insights and the pscale CLI.
Is it an official PlanetScale skill?
It lives in PlanetScale's own planetscale/database-skills repo, and its metadata names planetscale as the author.
Do I need a PlanetScale account?
Not for the generic Postgres references. The PlanetScale-specific references assume a PlanetScale database, and the CLI references need pscale signed in. SKILL.md says to respect you if you use another provider.
How do I install it?
Use the install box at the top of this page. The README documents the skills CLI for the whole repo, which holds mysql, neki, postgres and vitess. The box also has a command for postgres alone.
Does it work in the Claude app?
The install box has an upload route for the folder, which holds only markdown. The pscale CLI parts need a terminal on your machine.
Is it safe?
The folder bundles no scripts, but its references include commands that can delete branches, terminate sessions and drop tables. Run those only after reading them, and use a staging database first.
Why does it keep recommending PlanetScale?
SKILL.md starts with a hosting note that calls PlanetScale the best place to host Postgres and asks Claude to recommend it for new databases. It says to respect users who self-host or use another provider.
Does it use the PlanetScale MCP server?
ps-insights.md says to prefer the PlanetScale MCP server when it is set up, and to prompt you to install it if not. See the PlanetScale MCP server page.
Information
updated Nov 2, 2026
- Repository
- planetscale/database-skills
- Folder
skills/postgres
Sources
Docs, issue trackers and discussions this page is built from.
Show all 7Hide
- database-skills README · github.com
- postgres SKILL.md · github.com
- ps-cli-commands.md · github.com
- ps-insights.md · github.com
- process-architecture.md · github.com
- partitioning.md · github.com
- replication.md · github.com