What problem does it solve?
This skill provides standardized MySQL database guidelines aligned with P3C, covering table creation rules, SQL statement standards, indexing strategies, and ORM mapping requirements to improve consistency and quality.
Core Features & Use Cases
- Enforces mandatory fields and conventions: id as primary key, business_id as unique foreign key, create_time, update_time, delete_state, delete_time; field naming uses lowercase with underscores; all fields include comments.
- Provides SQL and indexing rules: proper data types, using decimals for numbers, avoiding reserved words, and recommended index strategies for performance.
- Use Case: An enterprise Java service schema is refactored to align with P3C standards to ensure maintainability and easier code reviews.
Quick Start
Apply the p3c-mysql-database skill to audit a schema.sql or ORM mapping file against the P3C guidelines and generate a compliant schema template.