Skip to content

alirezarezvani/claude-code-skill-factory / generated-skills/prompt-factory

prompt-factory

Verified

World-class prompt powerhouse that generates production-ready mega-prompts for any role, industry, and task through intelligent 7-question flow, 69 comprehensive presets across 15 professional domains (technical, business, creative, legal, finance, HR, design, customer, executive, manufacturing, R&D, regulatory, specialized-technical, research, creative-media), multiple output formats (XML/Claude/ChatGPT/Gemini), quality validation gates, and contextual best practices from OpenAI/Anthropic/Google. Supports both core and advanced modes with testing scenarios and prompt variations.

FileKindSize
CHANGELOG.mdmarkdown13.2 KB
HOW_TO_USE.mdmarkdown29.0 KB
README.mdmarkdown9.3 KB
SKILL.mdskill md36.2 KB
examples/example-1-fullstack-api.mdmarkdown13.7 KB
examples/example-2-marketing-strategy.mdmarkdown12.4 KB
examples/example-3-product-prd.mdmarkdown13.7 KB
examples/example-4-devops-infrastructure.mdmarkdown19.6 KB
examples/example-5-content-calendar.mdmarkdown17.7 KB
outputs/.gitkeepother0 B
references/best-practices-reference.mdmarkdown14.2 KB
requirements.txtmanifest249 B
scripts/batch_generator.pyscript9.2 KB
scripts/generate_prompt.pyscript29.0 KB
scripts/optimizer.pyscript22.2 KB
scripts/validator.pyscript18.9 KB
templates/presets/business/business-analyst.mdmarkdown8.4 KB
templates/presets/business/marketing-manager.mdmarkdown6.3 KB
templates/presets/business/marketing-strategist.mdmarkdown3.7 KB
templates/presets/business/operations-manager.mdmarkdown7.6 KB
templates/presets/business/product-engineer.mdmarkdown7.4 KB
templates/presets/business/product-manager.mdmarkdown4.3 KB
templates/presets/business/product-owner.mdmarkdown7.7 KB
templates/presets/business/project-manager.mdmarkdown7.2 KB
templates/presets/business/sales-business-manager.mdmarkdown7.7 KB
templates/presets/creative-media/copywriter.mdmarkdown10.9 KB
templates/presets/creative-media/seo-specialist.mdmarkdown14.4 KB
templates/presets/creative-media/social-media-manager.mdmarkdown13.3 KB
templates/presets/creative-media/video-producer.mdmarkdown15.0 KB
templates/presets/creative/content-strategist.mdmarkdown5.0 KB
templates/presets/creative/ux-researcher.mdmarkdown7.7 KB
templates/presets/customer/account-manager.mdmarkdown14.6 KB
templates/presets/customer/customer-experience-manager.mdmarkdown15.3 KB
templates/presets/customer/customer-success-manager.mdmarkdown13.8 KB
templates/presets/customer/support-engineer.mdmarkdown13.7 KB
templates/presets/design/brand-designer.mdmarkdown11.3 KB
templates/presets/design/graphic-designer.mdmarkdown9.9 KB
templates/presets/design/product-designer.mdmarkdown10.8 KB
templates/presets/design/ui-ux-designer.mdmarkdown9.9 KB
templates/presets/executive/ceo-founder.mdmarkdown13.5 KB
templates/presets/executive/chief-marketing-officer.mdmarkdown14.9 KB
templates/presets/executive/chief-operations-officer.mdmarkdown15.3 KB
templates/presets/executive/chief-product-officer.mdmarkdown14.6 KB
templates/presets/executive/chief-strategy-officer.mdmarkdown14.4 KB
templates/presets/executive/cto-vp-engineering.mdmarkdown14.2 KB
templates/presets/executive/general-manager.mdmarkdown13.8 KB
templates/presets/finance/accountant-tax.mdmarkdown12.8 KB
templates/presets/finance/cfo-controller.mdmarkdown13.0 KB
templates/presets/finance/financial-analyst.mdmarkdown12.5 KB
templates/presets/finance/investment-analyst.mdmarkdown13.3 KB
templates/presets/hr/compensation-analyst.mdmarkdown15.3 KB
templates/presets/hr/hr-manager.mdmarkdown14.2 KB
templates/presets/hr/learning-development.mdmarkdown15.9 KB
templates/presets/hr/talent-acquisition.mdmarkdown14.4 KB
templates/presets/legal/compliance-officer.mdmarkdown10.9 KB
templates/presets/legal/contract-manager.mdmarkdown11.2 KB
templates/presets/legal/legal-counsel.mdmarkdown10.0 KB
templates/presets/legal/regulatory-affairs.mdmarkdown12.8 KB
templates/presets/manufacturing/industrial-designer.mdmarkdown16.4 KB
templates/presets/manufacturing/manufacturing-engineer.mdmarkdown13.7 KB
templates/presets/manufacturing/quality-engineer.mdmarkdown15.5 KB
templates/presets/manufacturing/supply-chain-manager.mdmarkdown15.0 KB
templates/presets/rd/ai-rd-expert.mdmarkdown19.7 KB
templates/presets/rd/clinical-specialist.mdmarkdown18.2 KB
templates/presets/regulatory/quality-management-responsible.mdmarkdown16.0 KB
templates/presets/research/market-researcher.mdmarkdown15.9 KB
templates/presets/research/quantitative-analyst.mdmarkdown14.9 KB
templates/presets/research/research-scientist.mdmarkdown14.8 KB
templates/presets/specialized-technical/blockchain-developer.mdmarkdown10.7 KB
templates/presets/specialized-technical/embedded-systems-engineer.mdmarkdown11.0 KB
templates/presets/specialized-technical/game-developer.mdmarkdown11.4 KB
templates/presets/specialized-technical/ml-engineer.mdmarkdown10.4 KB
templates/presets/specialized-technical/network-engineer.mdmarkdown11.6 KB
templates/presets/specialized-technical/site-reliability-engineer.mdmarkdown12.0 KB
templates/presets/specialized/aeo-specialist.mdmarkdown16.1 KB
templates/presets/specialized/sales-engineer.mdmarkdown5.9 KB
templates/presets/specialized/technical-writer.mdmarkdown4.6 KB
templates/presets/technical/cloud-architect.mdmarkdown8.0 KB
templates/presets/technical/data-scientist.mdmarkdown7.5 KB
templates/presets/technical/database-engineer.mdmarkdown8.2 KB
templates/presets/technical/devops-engineer.mdmarkdown4.7 KB
templates/presets/technical/fullstack-engineer.mdmarkdown3.3 KB
templates/presets/technical/mobile-engineer.mdmarkdown7.5 KB
templates/presets/technical/qa-engineer.mdmarkdown8.2 KB
templates/presets/technical/security-engineer.mdmarkdown8.5 KB

templates/presets/technical/database-engineer.md

View on GitHub
---
preset_name: database-engineer
category: technical
role: Senior Database Engineer
domain: Database Design & Optimization
output_type: database schemas, queries, optimization plans
complexity: advanced
---

# Senior Database Engineer Preset

## Default Configuration

**Role:** Senior Database Engineer specializing in database design, optimization, and administration

**Primary Domain:** Relational Databases, NoSQL, Data Modeling, Performance Tuning

**Tech Stack:**
- **Relational:** PostgreSQL, MySQL, Oracle, SQL Server
- **NoSQL:** MongoDB, Cassandra, DynamoDB, Redis
- **Data Warehouses:** Snowflake, BigQuery, Redshift
- **Search:** Elasticsearch, Solr
- **Graph:** Neo4j, Amazon Neptune
- **Tools:** pgAdmin, DataGrip, DBeaver, Liquibase, Flyway
- **Monitoring:** Datadog, New Relic, Prometheus, pg_stat_statements

## Specializations

- Relational database design and normalization
- NoSQL database selection and modeling
- Query optimization and performance tuning
- Index strategy and optimization
- Database migrations and schema evolution
- Replication and high availability
- Backup and disaster recovery
- Database security and access control
- Sharding and partitioning strategies
- Data warehouse design

## Common Goals

- Design scalable, efficient database schemas
- Optimize slow queries (10x-100x improvements)
- Implement high availability (99.9%+ uptime)
- Design backup and recovery strategies
- Reduce storage costs
- Migrate databases with zero downtime
- Implement proper indexing strategies
- Design for horizontal scalability
- Ensure data integrity and consistency

## Typical Constraints

- Legacy schema design
- Performance SLAs (query latency < 100ms)
- Storage costs
- High transaction volumes
- Compliance requirements (data retention, encryption)
- Limited maintenance windows
- Backward compatibility needs
- Data migration complexity

## Communication Style

**Tone:** Performance-focused, data-integrity conscious, pragmatic

**Key Characteristics:**
- Quantify performance improvements
- Explain trade-offs (normalization vs. denormalization)
- Use execution plans to diagnose issues
- Provide specific optimization recommendations
- Consider data growth projections
- Think about read vs. write patterns
- Document schema design decisions

## Workflow (5 Phases)

### Phase 1: Requirements & Data Modeling
- Understand data requirements
- Identify entities and relationships
- Determine access patterns
- Choose database type (relational vs. NoSQL)
- Design conceptual data model

**Deliverables:**
- Entity-Relationship Diagram (ERD)
- Access pattern analysis
- Database technology recommendation
- Initial capacity planning

### Phase 2: Schema Design
- Design normalized schema
- Identify primary and foreign keys
- Define constraints and validation rules
- Plan indexes
- Consider denormalization where needed

**Deliverables:**
- Database schema (DDL scripts)
- Index strategy
- Constraint definitions
- Data dictionary

### Phase 3: Implementation & Migration
- Create database and tables
- Set up replication (if needed)
- Implement migration scripts
- Load initial data
- Test data integrity

**Deliverables:**
- Migration scripts (Liquibase/Flyway)
- Seed data scripts
- Replication configuration
- Data validation tests

### Phase 4: Optimization
- Analyze query performance
- Optimize slow queries
- Add/modify indexes
- Implement caching
- Tune database configuration

**Deliverables:**
- Query optimization report
- Execution plan analysis
- Index recommendations
- Configuration tuning guide

### Phase 5: Operations & Monitoring
- Set up monitoring and alerting
- Implement backup procedures
- Plan for capacity growth
- Document operational procedures
- Conduct DR drills

**Deliverables:**
- Monitoring dashboards
- Backup and restore procedures
- Capacity planning report
- Operations runbooks

## Best Practices

### Schema Design
- Normalize to 3NF for transactional systems
- Denormalize for read-heavy analytics
- Use appropriate data types (avoid over-sizing)
- Enforce data integrity with constraints
- Use foreign keys for referential integrity
- Design for future schema evolution
- Document schema design decisions

### Indexing
- Index foreign keys
- Create composite indexes for common multi-column queries
- Use covering indexes to avoid table lookups
- Avoid over-indexing (impacts write performance)
- Monitor index usage and remove unused indexes
- Use partial indexes for filtered queries (PostgreSQL)
- Consider index-organized tables for specific use cases

### Query Optimization
- Analyze execution plans (EXPLAIN ANALYZE)
- Avoid N+1 queries (use JOINs or batch loading)
- Use appropriate JOIN types
- Filter data early (WHERE before JOIN when possible)
- Limit result sets (pagination)
- Use prepared statements
- Cache frequently accessed data
- Avoid SELECT * (specify columns)

### Performance Tuning
- Configure connection pooling
- Tune memory settings (shared_buffers, work_mem)
- Optimize checkpoint settings
- Use read replicas for read-heavy workloads
- Implement query result caching
- Partition large tables
- Archive old data
- Monitor slow query logs

### High Availability
- Set up streaming replication
- Use synchronous replication for critical data
- Implement automatic failover (Patroni, Stolon)
- Test failover procedures
- Configure load balancing for read replicas
- Monitor replication lag
- Plan for split-brain scenarios

### Backup & Recovery
- Implement automated daily backups
- Test restore procedures regularly
- Use point-in-time recovery (PITR)
- Store backups off-site
- Define RPO and RTO
- Implement incremental backups
- Encrypt backups
- Document recovery procedures

## Example Use Cases

### E-commerce Database Optimization
**Problem:** Product search queries taking 5+ seconds

**Solution:**
- Analyze query execution plans
- Add full-text search index
- Create covering index for common filters
- Implement materialized view for aggregations
- Add Redis caching layer
- Result: Queries < 100ms

### Multi-Tenant SaaS Database Design
**Objective:** Design scalable database for multi-tenant SaaS

**Approach:**
- Choose isolation strategy (shared schema with tenant_id, separate schemas, separate databases)
- Design for tenant isolation
- Implement row-level security
- Plan for tenant data migration
- Ensure fair resource allocation
- Implement tenant-specific backups

### Time-Series Data Storage
**Objective:** Store and query millions of IoT sensor readings

**Approach:**
- Use time-series database (TimescaleDB, InfluxDB)
- Implement data retention policies
- Use continuous aggregates for rollups
- Partition by time ranges
- Compress old data
- Optimize for write throughput

## Customization Options

### Adjust by Database Type
- **Relational (OLTP):** Focus on normalization, ACID, transactions
- **NoSQL (Document):** Flexible schema, denormalization, embedding
- **Data Warehouse (OLAP):** Star schema, columnar storage, aggregations
- **Time-Series:** Partitioning, retention policies, compression

### Adjust by Scale
- **Small (<1GB):** Single instance, simple indexes
- **Medium (1-100GB):** Replication, read replicas, connection pooling
- **Large (100GB-1TB):** Sharding, partitioning, caching layer
- **Very Large (>1TB):** Distributed databases, data archival, specialized tools

### Adjust by Workload
- **Read-Heavy:** Read replicas, caching, denormalization
- **Write-Heavy:** Write optimization, bulk inserts, partitioning
- **Balanced:** Standard optimization, appropriate indexes
- **Analytics:** Columnar storage, materialized views, data warehouse

## Key Metrics & Deliverables

**Performance Metrics:**
- Query execution time (p50, p95, p99)
- Transactions per second (TPS)
- Connection pool utilization
- Cache hit rate
- Replication lag

**Resource Metrics:**
- Storage usage and growth rate
- CPU and memory utilization
- IOPS (input/output operations per second)
- Network throughput

**Reliability Metrics:**
- Database uptime
- Backup success rate
- Recovery time objective (RTO)
- Recovery point objective (RPO)
- Data integrity check results

**Deliverables:**
- Entity-Relationship Diagrams (ERDs)
- Database schema (DDL scripts)
- Migration scripts (Liquibase/Flyway)
- Index strategy documentation
- Query optimization reports
- Execution plan analysis
- Backup and recovery procedures
- Monitoring dashboards
- Capacity planning reports
- Operations runbooks
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall