postgresql-skill
PostgreSQL Development
Purpose
PostgreSQL is a powerful relational database. This skill documents patterns for safe transactions, optimization, and concurrent access.
When to Use
Use this skill when:
- Designing database schema
- Creating migrations
- Implementing transactions
- Optimizing queries
- Managing connections
Key Patterns
1. Transaction Management
Wrap operations in transactions:
async def transfer_funds(self, from_account, to_account, amount):
async with self.db.transaction():
await self.db.execute(
"UPDATE accounts SET balance = balance - ? WHERE id = ?",
(amount, from_account)
)
await self.db.execute(
"UPDATE accounts SET balance = balance + ? WHERE id = ?",
(amount, to_account)
)
2. Connection Pooling
Use connection pools for efficiency:
pool = await asyncpg.create_pool(
'postgresql://user:password@localhost/db',
min_size=10,
max_size=20
)
3. Query Optimization
Use proper indexing:
CREATE INDEX idx_user_email ON users(email);
CREATE INDEX idx_transaction_date ON transactions(created_at);
See Also
- PostgreSQL Documentation: https://www.postgresql.org/docs/
More from ingpoc/skills
scroll-storyteller
Use when creating interactive scroll-based storytelling experiences with mouse-following spotlight effects, animated SVG art, and the Anthropic design language. Load for explainer pages, product showcases, visual narratives, or any content needing immersive scroll storytelling with organic shapes and smooth animations. Supports GSAP-powered or lightweight CSS-only animations.
124terminal-ui-design
Use when creating CLI tools, terminal user interfaces (TUI), or any command-line applications. Load for terminal UI design, ASCII art, color schemes, box drawing characters, and polished terminal output. Also use for refactoring boring CLIs into distinctive experiences.
34browser-testing
Use when testing web applications, debugging browser console errors, automating form interactions, or verifying UI implementations. Load for localhost testing, authenticated app testing (Gmail, Notion), or recording demo GIFs. Requires Chrome extension 1.0.36+, Claude Code 2.0.73+, paid plan.
21tufte-slide-design
This skill applies Edward Tufte's data visualization principles from "The Visual Display of Quantitative Information" to create high-impact slides. Use when designing presentations, creating charts/graphs, reviewing slides for clarity, or transforming data into visual displays. Triggers on phrases like "make a slide", "create presentation", "design chart", "visualize data", "review my slides", or "make this more impactful".
20token-efficient
Use when processing 50+ items, analyzing CSV/log files, executing code in sandbox, or searching for tools. Load for data processing tasks. Achieves 98%+ token savings via in-sandbox execution, progressive disclosure, and pagination. Supports heredocs for multi-line bash.
12claude-md-creator
Use when creating CLAUDE.md files, updating existing CLAUDE.md, validating CLAUDE.md structure, or auto-fixing CLAUDE.md issues. Load for setting up project instructions, global guidelines, local overrides, or modular rules. Handles global (~/.claude/CLAUDE.md), project (.claude/CLAUDE.md), local (CLAUDE.local.md), and rules (.claude/rules/*.md) with smart project detection and template generation.
10