Verify Persistence Configuration

VerifiedSafe

Checks that persistence.xml uses environment variables for JNDI datasources and DDL generation paths before a git push. Prevents QA deployment failures by detecting hardcoded values.

Sby Skills Guide Bot
DevOpsBeginner
3/8/2026
Claude Code
#jpa#persistence-xml#pre-push#deployment-config#environment-variables

Recommended for

Automated summary

Checks persistence.xml before a git push to confirm that JNDI datasources and DDL generation paths rely on environment variables instead of hardcoded values.

Strengths

  • Focused, fast check of a single file (src/main/resources/META-INF/persistence.xml)
  • Clear correct-vs-wrong table covering the main and audit datasources
  • Also flags hardcoded DDL locations such as c:/tmp/ or /home/*/tmp/
  • Offers a fix but requires user confirmation before changing anything

Limitations

  • Scoped to JPA/EclipseLink and to the specific variable names and paths of this project
  • Does not validate the rest of the deployment configuration nor whether the environment variables actually exist
  • Model invocation is disabled, so it must be triggered explicitly
When to use it

Run it right before a git push or QA deployment prep on a JPA project to avoid failures caused by hardcoded configuration.

When not to use it

Skip it if you are not touching persistence.xml, your project does not use JPA/EclipseLink, or environment variables are not your configuration mechanism.

Security analysis

Safe
Quality score78/100

The skill is a narrowly scoped, read-only configuration check against a single META-INF/persistence.xml file. It contains no destructive commands, no network calls, no credential access, and no obfuscation; edits are only offered after explicit user approval. Declaring Bash is broader than necessary but not exploited by any instruction, so overall risk is low.

Findings
  • •Declares Bash in allowed-tools although the steps only require Read/Grep; minor over-permissioning, but no bash commands are instructed.
  • •Includes an optional remediation step, but it is explicitly gated on user confirmation ('Do NOT auto-fix without user confirmation').
How this analysis is made

Examples

Pre-push check
Before I push this branch, verify that persistence.xml is deployment-ready.
Datasource audit
Check src/main/resources/META-INF/persistence.xml and tell me if the JNDI datasources still use hardcoded names instead of ${JDBC_DATASOURCE} and ${JDBC_AUDIT_DATASOURCE}.
DDL path check
Does persistence.xml contain any hardcoded DDL generation path like c:/tmp/ or /home/*/tmp/? Show me the issues and offer a fix.

name: verify-persistence description: > 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. disable-model-invocation: true allowed-tools: Read, Grep, Bash

Verify Persistence Configuration

Check src/main/resources/META-INF/persistence.xml for deployment readiness.

Steps

  1. Read persistence.xml at src/main/resources/META-INF/persistence.xml

  2. Check JNDI datasources - Must use environment variables:

    • ${JDBC_DATASOURCE} (not jdbc/coop, jdbc/rhDS, etc.)
    • ${JDBC_AUDIT_DATASOURCE} (not jdbc/ruhunuAudit, etc.)
  3. Check DDL generation paths - Must NOT contain hardcoded paths:

    • No eclipselink.application-location with c:/tmp/ or /home/*/tmp/
  4. 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.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/verify-persistence-configuration-mmh8qqwb/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/verify-persistence-configuration-mmh8qqwb' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/verify-persistence-configuration-mmh8qqwb/download' --output '.skill-downloads/verify-persistence-configuration-mmh8qqwb/SKILL.md.part' && mv '.skill-downloads/verify-persistence-configuration-mmh8qqwb/SKILL.md.part' '.skill-downloads/verify-persistence-configuration-mmh8qqwb/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Grep, Bash

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/verify-persistence-configuration-mmh8qqwb/SKILL.md' && test -s '.skill-downloads/verify-persistence-configuration-mmh8qqwb/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/verify-persistence' && cp -R '.skill-downloads/verify-persistence-configuration-mmh8qqwb' '.claude/skills/verify-persistence'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/verify-persistence-configuration-mmh8qqwb'

openskills read 'verify-persistence-configuration-mmh8qqwb'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/verify-persistence-configuration-mmh8qqwb/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills