home / skills / williamzujkowski / standards / sql
This skill helps you apply SQL best practices and secure, maintainable patterns for database projects with clear guidance and testable code.
npx playbooks add skill williamzujkowski/standards --skill sqlReview the files below or copy the command above to add this skill to your agents.
---
name: sql
description: Sql standards for sql in Database environments. Covers best practices,
---
# Sql
> **Quick Navigation:**
> Level 1: [Quick Start](#level-1-quick-start) (5 min) → Level 2: [Implementation](#level-2-implementation) (30 min) → Level 3: [Mastery](#level-3-mastery-resources) (Extended)
---
## Level 1: Quick Start
### Core Principles
1. **Best Practices**: Follow industry-standard patterns for database
2. **Security First**: Implement secure defaults and validate all inputs
3. **Maintainability**: Write clean, documented, testable code
4. **Performance**: Optimize for common use cases
### Essential Checklist
- [ ] Follow established patterns for database
- [ ] Implement proper error handling
- [ ] Add comprehensive logging
- [ ] Write unit and integration tests
- [ ] Document public interfaces
### Quick Links to Level 2
- [Core Concepts](#core-concepts)
- [Implementation Patterns](#implementation-patterns)
- [Common Pitfalls](#common-pitfalls)
---
## Level 2: Implementation
### Core Concepts
This skill covers essential practices for database.
**Key areas include:**
- Architecture patterns
- Implementation best practices
- Testing strategies
- Performance optimization
### Implementation Patterns
Apply these patterns when working with database:
1. **Pattern Selection**: Choose appropriate patterns for your use case
2. **Error Handling**: Implement comprehensive error recovery
3. **Monitoring**: Add observability hooks for production
### Common Pitfalls
Avoid these common mistakes:
- Skipping validation of inputs
- Ignoring edge cases
- Missing test coverage
- Poor documentation
---
## Level 3: Mastery Resources
### Reference Materials
- [Related Standards](../../docs/standards/)
- [Best Practices Guide](../../docs/guides/)
### Templates
See the `templates/` directory for starter configurations.
### External Resources
Consult official documentation and community best practices for database.
This skill defines SQL standards and practical patterns for database development in production environments. It focuses on security, maintainability, and performance to help teams start projects quickly and enforce consistent, battle-tested practices. The guidance spans quick-start checklists through implementation patterns and mastery resources.
The skill inspects database-related practices and templates, providing actionable implementation patterns, testing strategies, and performance tuning guidance. It highlights common pitfalls, error-handling approaches, and observability hooks to make database code resilient and operable in production. Use the patterns to evaluate and improve schema design, queries, and operational safeguards.
Does this skill cover specific SQL dialects?
The guidance is dialect-agnostic and focuses on universal patterns; adapt examples to your specific database (Postgres, MySQL, SQL Server) as needed.
How do I start applying these standards to an existing project?
Run a focused audit: validate inputs, add tests for critical queries, introduce migrations, and incrementally add logging and monitoring for high-risk areas.