Agent skill
verify-persistence
Verify persistence.xml configuration before git push. Use before pushing code to ensure persistence.xml uses environment variables instead of hardcoded JNDI names. Prevents QA deployment failures.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/verify-persistence
SKILL.md
Verify Persistence Configuration
Check src/main/resources/META-INF/persistence.xml for deployment readiness.
Steps
-
Read persistence.xml at
src/main/resources/META-INF/persistence.xml -
Check JNDI datasources - Must use environment variables:
${JDBC_DATASOURCE}(notjdbc/coop,jdbc/rhDS, etc.)${JDBC_AUDIT_DATASOURCE}(notjdbc/ruhunuAudit, etc.)
-
Check DDL generation paths - Must NOT contain hardcoded paths:
- No
eclipselink.application-locationwithc:/tmp/or/home/*/tmp/
- No
-
Report findings clearly:
- If all correct: "Persistence.xml is deployment-ready"
- If issues found: List each issue with the current value and what it should be
What's Correct vs Wrong
| Setting | Correct | Wrong |
|---|---|---|
| Main datasource | ${JDBC_DATASOURCE} |
jdbc/coop, jdbc/rhDS |
| Audit datasource | ${JDBC_AUDIT_DATASOURCE} |
jdbc/ruhunuAudit |
| DDL location | Not present or env var | c:/tmp/, /home/buddhika/tmp/ |
If Issues Found
Offer to fix by replacing hardcoded values with environment variables. Do NOT auto-fix without user confirmation.
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?