Agent skill
database-guide
MySQL database development guide for the HMIS project. Use when working with database queries, SQL debugging, database schema investigation, MySQL performance tuning, credential management, or database connection troubleshooting.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/database-guide
SKILL.md
MySQL Developer Guide
Security Policy
- MySQL credentials MUST NEVER be committed to git
- Credentials stored in separate folder outside the project directory
- Windows:
C:\Credentials\credentials.txt - Linux/Mac:
~/.config/hmis/credentials.txt
Common Database Operations
Structure Investigation
SHOW TABLES LIKE '%bill%';
DESCRIBE bill;
SHOW CREATE TABLE bill;
SELECT COUNT(*) FROM bill WHERE retired = 0;
JPQL Query Patterns
// Standard entity query
String jpql = "SELECT b FROM Bill b WHERE b.retired = false AND b.department = :dept";
// DTO constructor query (use findLightsByJpql)
String jpql = "SELECT new com.divudi.core.data.dto.MyDTO(b.id, b.name) FROM Bill b WHERE ...";
List<MyDTO> results = (List<MyDTO>) facade.findLightsByJpql(jpql, params, TemporalType.TIMESTAMP);
// Aggregate query
String jpql = "SELECT SUM(b.netTotal) FROM Bill b WHERE ...";
Performance Tips
- Always include
b.retired = falsein queries - Use indexed columns in WHERE clauses
- Use DTOs instead of full entities for display
- Limit result sets with pagination
Persistence Configuration
- Development: Use hardcoded JNDI (
jdbc/rhDS) - Before push: Must use environment variables (
${JDBC_DATASOURCE})
For complete reference, read developer_docs/database/mysql-developer-guide.md.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?