postgres
Use when querying, managing, or debugging PostgreSQL databases — schema design, query optimization, migrations, indexing, and connection pooling.
Skill by fworks-tech
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/fworks-tech-postgres
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/postgres
What's inside
- Skill name
postgres- Description
- Use when querying, managing, or debugging PostgreSQL databases — schema design, query optimization, migrations, indexing, and connection pooling. Use ONLY when the task involves PostgreSQL specifically, not general SQL.
- License
- MIT
- Instructions
- 81 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Postgres ## Overview Postgres is the Society's database specialist. It handles schema design, query optimization, migration authoring, and connection management for PostgreSQL. Postgres follows the principle that the database enforces integrity, not the application. ## When to Use - When designing or modifying database schemas - When optimizing slow queries or adding indexes - When writing or reviewing migrations - When debugging connection pool issues - When implementing row-level security or access control - When using advanced Postgres features (CTEs, window functions, JSONB) ## Process ### Schema Design 1. Use meaningful table and column names (snake_case) 2. Always include `id` (uuid or serial), `created_at`, `updated_at` 3. Add foreign key constraints — never rely on application-level integrity 4. Use CHECK constraints for domain rules 5. Prefer TEXT over VARCHAR (Postgres optimizes equally) 6. Use ENUMs sparingly — prefer lookup tables for values that change ### Query Optimization 1. Run `EXPLAIN (ANALYZE, BUFFERS)` on the slow query 2. Look for sequential scans on large tables 3. Add indexes for WHERE, JOIN, and ORDER BY columns 4. Consider partial indexes for filtered queries 5. Use `pg_stat_user_tables` to find unused indexes 6. Avoid `SELECT *` — fetch only needed columns ### Migrations 1. Each migration is one logical change 2. Migrations must be reversible (up and down) 3. Test migrations on a copy of production data 4. Add data migrations separately from schema migrations 5. Never drop columns in a migration — mark as deprecated first 6. Use `NOT NULL` with `DEFAULT` for new required columns ### Connection Pooling 1. Use PgBouncer or built-in pooler for connection management 2. Set `max_connections` based on available memory (roughly 100MB per connection) 3. Monitor `pg_stat_activity` for idle connections 4. Use `statement_timeout` to prevent runaway queries 5. Set `idle_in_transaction_session_timeout` for abandoned transactions ## Red Flags - Missing foreign key constraints on relational data - Using `SELECT *` in production queries - Adding indexes without checking existing ones - Migrations that are not reversible - Hardcoded connection strings without pool configuration ## Rationalizations | What you think | What Postgres knows | |----------------|-------------------| | "Foreign keys slow down inserts" | The integrity guarantee is worth the minor overhead. Orphaned data is slower. | | "I'll add indexes later" | Later means after the production incident. Add them with the query. | | "TEXT is less efficient than VARCHAR(n)" | Postgres stores both identically. VARCHAR(n) just adds an arbitrary check. | | "My query is fast enough" | On 1000 rows. On 10M rows, it's a seq scan. Test with production-scale data. | ## Verification Before confirming the change is done: - [ ] `EXPLAIN ANALYZE` shows expected query plan (no seq scans on large tables) - [ ] Foreign keys exist on all relational columns - [ ] Migrations run cleanly up and down - [ ] No `SELECT *` in application queries - [ ] Connection pool settings are documented - [ ] Indexes exist for all WHERE/JOIN/ORDER BY columns used in hot queries
From fworks-tech/agenthood, MIT.
More from fworks-tech/agenthood
- 0.604score
docker
fworks-tech
Use when building, running, or debugging Docker containers — Dockerfile creation, compose configurations, image optimization, volume management, and container…
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
git
fworks-tech
Use when performing git operations — branching, rebasing, stashing, bisecting, resolving merge conflicts, or recovering lost commits.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
mcp-github
fworks-tech
Use when reviewing PRs, checking CI status, or interacting with GitHub via MCP.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
redis
fworks-tech
Use when interacting with Redis — caching strategies, pub/sub, rate limiting, session storage, queue management, and debugging key expiration.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
accessibility-auditor
fworks-tech
Audits web interfaces for WCAG compliance — semantic HTML, ARIA, keyboard navigation, color contrast, screen reader compatibility, and accessible forms.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
bug-fix-teammate
fworks-tech
Identifies critical bugs in a codebase and implements targeted fixes with working code — root cause, minimal change, regression tests.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
cleanup-specialist
fworks-tech
Removes dead code, eliminates duplication, refactors messy patterns, and applies consistent formatting across code and documentation — safely, with tests…
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
concept-explainer
fworks-tech
Breaks down complex technical concepts in beginner-friendly ways with analogies, practical examples, and understanding checks.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
context-economy
fworks-tech
Monitors context window capacity, routes tasks to minimal member set, and triggers session triage.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
cross-provider-translation
fworks-tech
Detects AI providers, translates skill files to provider-native formats, and validates conventions.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
debugging-tutor
fworks-tech
Teaches systematic debugging methodology — reproduction, isolation, hypothesis formation, and independent problem-solving — rather than handing out quick fixes.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
api
fworks-tech
Use when designing, building, or testing REST APIs — endpoint design, authentication, error handling, pagination, versioning, and OpenAPI documentation.
SkillAFreshness: A★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 0
- Open issues
- 95
- Last commit (this folder)
- Sep 5, 2026 (1 month ago)
- Last release
- Oct 8, 2026 (20 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/fworks-tech/agenthood
- Website
- agenthood.flabs.tech/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from fworks-tech
- 0.604score
git
fworks-tech
Use when performing git operations — branching, rebasing, stashing, bisecting, resolving merge conflicts, or recovering lost commits.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
mcp-github
fworks-tech
Use when reviewing PRs, checking CI status, or interacting with GitHub via MCP.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
redis
fworks-tech
Use when interacting with Redis — caching strategies, pub/sub, rate limiting, session storage, queue management, and debugging key expiration.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
accessibility-auditor
fworks-tech
Audits web interfaces for WCAG compliance — semantic HTML, ARIA, keyboard navigation, color contrast, screen reader compatibility, and accessible forms.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
bug-fix-teammate
fworks-tech
Identifies critical bugs in a codebase and implements targeted fixes with working code — root cause, minimal change, regression tests.
SkillAFreshness: A★ 3Claude Code +9 - 0.604score
docker
fworks-tech
Use when building, running, or debugging Docker containers — Dockerfile creation, compose configurations, image optimization, volume management, and container…
SkillAFreshness: A★ 3Claude Code +9
Cite this page
postgres skill. Agent Mart. https://agentmart.dev/skills/fworks-tech-postgres (last updated 2026-10-24)