moai-lang-sql

Enforce SQL best-practice compliance across PostgreSQL and MySQL codebases.

1|Updated Jul 28, 2025
One-click install
npx skills add https://github.com/kivo360/quickhooks --skill moai-lang-sql-kivo360
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-lang-sql
Source: https://github.com/kivo360/quickhooks/tree/main/.claude/skills/moai-lang-sql
Command: npx skills add https://github.com/kivo360/quickhooks --skill moai-lang-sql-kivo360

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes SQL development with pgTAP, sqlfluff, and migration management for robust databases.

Core Features & Use Cases

  • Quality & Testing: pgTAP-based tests and sqlfluff linting.
  • Migrations: Structured migration patterns and versioning.
  • Performance: Query optimization guidance.

Quick Start

Add pgTAP tests to validate a new SQL function and run sqlfluff for linting.

Frequently Asked Questions about moai-lang-sql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce SQL best practices across PostgreSQL codebases?

SQL best practices enforcement uses pgTAP for testing and sqlfluff for linting to validate PostgreSQL code quality. Applied during code reviews and TDD workflows, it ensures minimum 85% test coverage and compliance with up-to-date tool versions integrated into quality gates.

What's the best way to structure database migrations with version control?

Structured migration patterns with versioning standardize how changes roll out across PostgreSQL and MySQL databases. Migration management integrates with quality governance to guide design, testing, and rollout decisions safely.

Can I use pgTAP and sqlfluff together for SQL validation?

pgTAP and sqlfluff work together in the same workflow: pgTAP validates SQL functions and logic with unit tests, while sqlfluff lints code for style and best-practice compliance. Both run during code reviews and quality gates.

How do I test SQL functions to meet quality coverage requirements?

pgTAP-based tests validate SQL functions and stored procedures with unit test coverage. The workflow enforces a minimum 85% test coverage threshold as part of quality gate requirements before code rollout.

Does SQL best-practice compliance work with MySQL databases?

SQL best practices and migration management apply to both PostgreSQL and MySQL codebases. Compliance enforcement, testing patterns, and quality gates adapt to each database platform's requirements.

What role do quality gates play in SQL code review workflows?

Quality gates integrate language detection and SQL governance to block code until best-practice compliance, test coverage, and migration validation pass. They guide design and testing decisions during TRUST 5 review stages.