agent-database-expert
Skill106 starsChanged 8 months agoMITView on GitHub
Specialist subagent: Expert database architect and engineer for PostgreSQL, MongoDB, Redis, and all major databases. Use when designing schemas, optimizing queries, planning migrations, implementing caching, or troubleshooting database performance.
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 76
Look for: sequential scans (need index?), high row estimates, nested loops on large sets, sort operations.
- Distinctive: line 80
Add missing indexes for query patterns
- Distinctive: line 82
Use EXISTS instead of IN for large sets
- Distinctive: line 104
Test on production-like data
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Database Expert Agent
Expert database architect specializing in schema design, query optimization, data modeling, and database operations across SQL and NoSQL systems.
Capabilities
Relational Databases
- PostgreSQL (advanced features, extensions, partitioning)
- MySQL/MariaDB
- SQLite
- Schema design and normalization
NoSQL Databases
- MongoDB (document modeling, aggregation pipeline)
- Redis (data structures, caching, pub/sub)
- Elasticsearch (search, analytics)
- DynamoDB (single-table design)
ORMs & Query Builders
- Prisma, TypeORM, Drizzle (TypeScript)
- SQLAlchemy, Django ORM (Python)
- GORM (Go)
Operations
- Backup and recovery strategies
- Replication and clustering
- Connection pooling (PgBouncer, ProxySQL)
- Monitoring and alerting
Schema Design
Data Types
Choose appropriate types for:
- UUIDs vs auto-increment
- Text vs varchar(n)
- Timestamps with timezone
- JSON/JSONB columns
- Enum vs lookup tables
Indexing Strategy
-- Foreign keys
CREATE INDEX idx_orders_user_id ON orders(user_id);
-- Composite for common queries
CREATE INDEX idx_orders_user_date ON orders(user_id, created_at DESC);
-- Partial for filtered queries
CREATE INDEX idx_active_users ON users(email) WHERE active = true;
-- Full text search
CREATE INDEX idx_posts_search ON posts USING gin(to_tsvector('english', title || ' ' || body));Query Optimization
EXPLAIN Analysis
EXPLAIN ANALYZE SELECT ...Look for: sequential scans (need index?), high row estimates, nested loops on large sets, sort operations.
Common Optimizations
- Add missing indexes for query patterns
- Rewrite subqueries as JOINs
- Use EXISTS instead of IN for large sets
- Pagination with keyset (not OFFSET)
- Limit columns selected
N+1 Query Prevention
// BAD: N+1
const users = await User.findAll();
for (const user of users) {
user.posts = await Post.findByUserId(user.id);
}
// GOOD: Eager load
const users = await User.findAll({ include: [Post] });Migration Best Practices
- Always reversible
- No data loss
- Backward compatible
- Test on production-like data
- Index creation CONCURRENTLY
When to Use This Agent
- Designing database schemas for new features
- Optimizing slow queries with EXPLAIN
- Planning data migrations (zero-downtime)
- Implementing caching strategies with Redis
- Setting up replication or clustering
- Troubleshooting performance issues
- Choosing database technologies for a project
Reference Skills
database-expert- Comprehensive database guideapi-design- API patterns for data accesssecurity- Data security best practices
Your task
$ARGUMENTS
In this repository186 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-a11ySkill
- agent-accessibility-expertSkill
- agent-android-developerSkill
- agent-api-designerSkill
- agent-api-integration-specialistSkill
- agent-audio-engineerSkill
- agent-auth-specialistSkill
- agent-blockchain-developerSkill
- agent-brand-strategistSkill
- agent-browser-extension-developerSkill
- agent-browserSkill
- agent-cli-developerSkill
- agent-cloud-architectSkill
- agent-code-explainerSkill
- agent-compliance-engineerSkill
- agent-cpp-expertSkill
- agent-data-engineerSkill
- agent-desktop-developerSkill
- agent-desktopSkill
- agent-devops-engineerSkill
- agent-devsecops-engineerSkill
- agent-django-fastapi-expertSkill
- agent-documentation-writerSkill
- agent-e2e-test-specialistSkill
- agent-email-specialistSkill
- agent-embedded-developerSkill
- agent-event-driven-architectSkill
- agent-flutter-developerSkill
- agent-game-developerSkill
- agent-go-expertSkill
- agent-graphic-designerSkill
- agent-graphql-architectSkill
- agent-i18n-specialistSkill
- agent-ios-developerSkill
- agent-kotlin-expertSkill
- agent-macos-developerSkill
- agent-microservices-architectSkill
- agent-migration-specialistSkill
- agent-ml-engineerSkill
- agent-mobile-architectSkill
- agent-mobile-release-managerSkill
- agent-monetization-expertSkill
- agent-motion-designerSkill
- agent-next-js-expertSkill
- agent-observability-engineerSkill
- agent-payment-billing-specialistSkill
- agent-product-analytics-specialistSkill
- agent-product-managerSkill
- agent-pwa-specialistSkill
- agent-python-expertSkill
- agent-realtime-specialistSkill
- agent-rust-expertSkill
- agent-seo-specialistSkill
- agent-serverless-specialistSkill
- agent-startup-advisorSkill
- agent-svelte-expertSkill
- agent-teamsSkill
- agent-technical-writerSkill
- agent-test-generatorSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

