Agent skill
postgresql-skill
This skill provides PostgreSQL-specific patterns for database design, optimization, and transaction management
Install this agent skill to your Project
npx add-skill https://github.com/ingpoc/SKILLS/tree/main/postgresql-skill
SKILL.md
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/
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated 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.
enforcement
Use when implementing hooks that BLOCK invalid actions, creating quality gates for state transitions, or enforcing tested:true verification. Load when designing enforcement mechanisms. Uses exit code 2 to block, JSON permissionDecision:deny, or updatedInput modification. Rules are instructions; hooks are enforcement.
async-programming-skill
This skill provides async/await patterns and best practices for concurrent programming
token-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.
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
full-stack-debugger
This skill should be used when debugging full-stack issues that span UI, backend, and database layers. It provides a systematic workflow to detect errors, analyze root causes, apply fixes iteratively, and verify solutions through automated server restarts and browser-based testing. Ideal for scenarios like failing schedulers, import errors, database issues, or API payload problems where issues originate in backend code but manifest in the UI.
Didn't find tool you were looking for?