SQL Optimization Patterns
ynulihao/AgentSkillOS
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
Generate a full-schema DDL script (CREATE TABLE + ALTER TABLE ADD COLUMN) into the project's tmp/ folder by temporarily enabling EclipseLink DDL generation, rebuilding, and redeploying the local app.
$ npx skills add hmislk/hmis --skill generate-ddl -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install hmislk/hmis generate-ddl --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/hmislk/hmis.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/generate-ddl .claude/skills/generate-ddl && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "generate-ddl" agent skill from https://github.com/hmislk/hmis/tree/development/.claude/skills/generate-ddl into .claude/skills/generate-ddl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generate-ddl", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/hmislk/hmis/tree/development/.claude/skills/generate-ddlType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add hmislk/hmis --skill generate-ddl -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install hmislk/hmis generate-ddl --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hmislk/hmis.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/generate-ddl .agents/skills/generate-ddl && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "generate-ddl" agent skill from https://github.com/hmislk/hmis/tree/development/.claude/skills/generate-ddl into .agents/skills/generate-ddl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generate-ddl", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add hmislk/hmis --skill generate-ddl -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install hmislk/hmis generate-ddl --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hmislk/hmis.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/generate-ddl .cursor/skills/generate-ddl && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "generate-ddl" agent skill from https://github.com/hmislk/hmis/tree/development/.claude/skills/generate-ddl into .cursor/skills/generate-ddl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generate-ddl", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/hmislk/hmis.git --path .claude/skills/generate-ddl--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add hmislk/hmis --skill generate-ddl -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install hmislk/hmis generate-ddl --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hmislk/hmis.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/generate-ddl .gemini/skills/generate-ddl && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "generate-ddl" agent skill from https://github.com/hmislk/hmis/tree/development/.claude/skills/generate-ddl into .gemini/skills/generate-ddl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generate-ddl", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install hmislk/hmis generate-ddlInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add hmislk/hmis --skill generate-ddl -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/hmislk/hmis.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/generate-ddl .github/skills/generate-ddl && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "generate-ddl" agent skill from https://github.com/hmislk/hmis/tree/development/.claude/skills/generate-ddl into .github/skills/generate-ddl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generate-ddl", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add hmislk/hmis --skill generate-ddl -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install hmislk/hmis generate-ddl --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/hmislk/hmis.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/generate-ddl .opencode/skills/generate-ddl && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "generate-ddl" agent skill from https://github.com/hmislk/hmis/tree/development/.claude/skills/generate-ddl into .opencode/skills/generate-ddl/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "generate-ddl", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
generate-ddlGenerate a full-schema DDL script (CREATE TABLE + ALTER TABLE ADD COLUMN) into the project's tmp/ folder by temporarily enabling EclipseLink DDL generation, rebuilding, and redeploying the local app.
Generate Ddl is an agent skill from hmislk/hmis. Generate a full-schema DDL script (CREATE TABLE + ALTER TABLE ADD COLUMN) into the project's tmp/ folder by temporarily enabling EclipseLink DDL generation, rebuilding, and redeploying the local app. Reverts all source changes and restores the original deployment afterward. Use when asked to generate/regenerate the DDL for the Database-Schema-DDL-Generation-Guide wiki page, or to produce a schema-sync script for a fresh/behind database.
Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Databases, covering Database schema design. It works with Java. The repository describes itself as: This is an Open Source Java EE based Hospital Information Management System. The licence is GPL-3.0.
9 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 19f723d. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
BashReadEditFrom allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitmvnFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
raw.githubusercontent.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Generate Ddl loads about 3.5k tokens when it runs. Until then it costs about 113 tokens; SKILL.md has 1,029 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Bash, Read, EditAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from hmislk/hmis at commit 19f723d, republished under its GPL-3.0 licence (© hmislk). 1,029 words, ~3,543 tokens.
.claude/skills/generate-ddl/SKILL.md (or your agent's skills folder).Produces a self-contained SQL script (new tables + missing columns on
existing tables) at <project-root>/tmp/createDDL.jdbc, then leaves the
working tree and the deployed app exactly as they were before this skill ran.
This is a temporary, local-only procedure — none of the intermediate edits are ever committed.
Two files need a temporary edit, and both must point at the same absolute path, computed fresh every run (it differs per developer machine):
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
DDL_DIR="$PROJECT_ROOT/tmp"src/main/resources/META-INF/persistence.xml — EclipseLink only
emits CREATE TABLE + FK ALTER TABLE ADD CONSTRAINT statements in
sql-script mode; it does not diff against a live DB.src/main/java/com/divudi/service/DdlFileEnhancerService.java — a
@Startup @Singleton EJB that runs once at app start, reads the
generated createDDL.jdbc, and appends an ALTER TABLE ... ADD COLUMN ... for every column of every CREATE TABLE it finds (closing the gap
above). Its output directory is a hardcoded compile-time constant
(APPLICATION_LOCATION), so it must be edited and rebuilt — there is no
runtime config for it today.Use a project tmp subfolder for backups (never the system /tmp):
mkdir -p "$DDL_DIR/.generate-ddl-backup"
cp src/main/resources/META-INF/persistence.xml "$DDL_DIR/.generate-ddl-backup/persistence.xml.bak"
cp src/main/java/com/divudi/service/DdlFileEnhancerService.java "$DDL_DIR/.generate-ddl-backup/DdlFileEnhancerService.java.bak"This captures whatever local state was already there (e.g. a local JNDI
swap in persistence.xml for local testing) so it can be restored
byte-for-byte, not just reset to git HEAD.
Inside the <properties> block of both hmisPU and hmisAuditPU, add:
<property name="eclipselink.ddl-generation" value="create-or-extend-tables"/>
<property name="eclipselink.ddl-generation.output-mode" value="sql-script"/>
<property name="eclipselink.application-location" value="$DDL_DIR"/>(Substitute the actual computed $DDL_DIR value — XML doesn't expand shell
variables.) Use the Edit tool with the existing closing
</properties>/last <property> line as anchor, same as the existing
eclipselink.jdbc.result-set-access-optimization property block.
Edit the constant:
private static final String APPLICATION_LOCATION = "$DDL_DIR";(Again, substitute the real computed path — this is a Java string literal, not a shell expansion.)
mvn -q package -DskipTestsFind the built WAR and force-deploy it (this also triggers the singleton's
@PostConstruct, which is what runs the column-enhancement step). First
look up the actual currently-deployed app name — do not assume rh; on
some machines the app is deployed as rh-3.0.0 (derived from the WAR
filename) instead. list-applications lists every deployed app (not just
this one), so don't just grab the first line — filter for the rh/rh-<version>
naming convention and require exactly one unambiguous match, failing loudly
rather than silently defaulting to rh if that's not the case:
WAR=$(ls target/*.war | head -1)
MATCHES=$(/home/buddhika/payara/bin/asadmin list-applications | awk '{print $1}' | grep -E '^rh(-[0-9][0-9.]*)?$' || true)
MATCH_COUNT=$(printf '%s\n' "$MATCHES" | grep -c . || true)
if [ "$MATCH_COUNT" -ne 1 ]; then
echo "ERROR: expected exactly one deployed app matching rh/rh-<version>, found $MATCH_COUNT: $MATCHES" >&2
exit 1
fi
DEPLOYED_NAME="$MATCHES"
/home/buddhika/payara/bin/asadmin redeploy --name "$DEPLOYED_NAME" "$WAR"Always pass the looked-up --name, matching whatever app name this
particular machine actually has deployed — dev-issue and playwright-e2e
default to rh, but that's only a convention, not a guarantee. Omitting
--name lets asadmin derive the app name from the WAR filename instead of
redeploying the existing app, which can leave two separate apps competing
for the same hardcoded /rh context root (glassfish-web.xml). If the
error above fires (zero or multiple matches), stop and ask the user rather
than guessing which app to redeploy.
If deploy fails with a JNDI lookup error for a datasource (e.g.
jdbc/ruhunuAudit not found): this is a pre-existing local-environment
mismatch unrelated to DDL generation — do NOT silently "fix" it as part of
this skill. Run /home/buddhika/payara/bin/asadmin list-jdbc-resources to
see what's actually registered, report the mismatch to the user, and ask
before changing <jta-data-source> (that line may already be a deliberate
uncommitted local override).
If the redeploy command itself fails (for the JNDI reason above or any
other), re-run list-applications before retrying anything — a failed
redeploy can leave the app fully undeployed rather than rolled back to the
previous working version:
/home/buddhika/payara/bin/asadmin list-applicationsIf $DEPLOYED_NAME is no longer listed, do not retry redeploy (it will
fail again with "Application ... is not deployed"). Fall back to a plain
deploy instead, setting --contextroot explicitly since a fresh deploy
doesn't infer it the way redeploy does:
/home/buddhika/payara/bin/asadmin deploy --name "$DEPLOYED_NAME" --contextroot rh "$WAR"test -f "$DDL_DIR/createDDL.jdbc" && echo FOUND
grep -c "^CREATE TABLE" "$DDL_DIR/createDDL.jdbc"
grep -c "ADD COLUMN" "$DDL_DIR/createDDL.jdbc"Both counts should be in the hundreds/thousands, not zero. If ADD COLUMN
count is 0, the enhancer didn't run — check the deployed app actually
restarted (a --force=true redeploy always re-triggers @PostConstruct;
if it didn't, the JNDI/deploy step above likely failed).
cp "$DDL_DIR/.generate-ddl-backup/persistence.xml.bak" src/main/resources/META-INF/persistence.xml
cp "$DDL_DIR/.generate-ddl-backup/DdlFileEnhancerService.java.bak" src/main/java/com/divudi/service/DdlFileEnhancerService.java
rm -rf "$DDL_DIR/.generate-ddl-backup"Confirm with git diff that the only remaining diff (if any) is whatever
pre-existing local-only change was already there before step 1 — never more.
Re-check the deployed app name rather than assuming it's still the same —
use the same $DEPLOYED_NAME lookup as step 4:
mvn -q package -DskipTests
WAR=$(ls target/*.war | head -1)
MATCHES=$(/home/buddhika/payara/bin/asadmin list-applications | awk '{print $1}' | grep -E '^rh(-[0-9][0-9.]*)?$' || true)
MATCH_COUNT=$(printf '%s\n' "$MATCHES" | grep -c . || true)
if [ "$MATCH_COUNT" -ne 1 ]; then
echo "ERROR: expected exactly one deployed app matching rh/rh-<version>, found $MATCH_COUNT: $MATCHES" >&2
exit 1
fi
DEPLOYED_NAME="$MATCHES"
/home/buddhika/payara/bin/asadmin redeploy --name "$DEPLOYED_NAME" "$WAR"If this redeploy fails for the same pre-existing JNDI reason noted in step 4, say so explicitly — don't leave the user thinking the app is back to a known-good state when it isn't. The previous (DDL-generation-enabled) deployment will keep running in that case until the underlying datasource issue is fixed.
If the failed redeploy left the app undeployed (check with
asadmin list-applications — $DEPLOYED_NAME will be absent), fall back to:
/home/buddhika/payara/bin/asadmin deploy --name "$DEPLOYED_NAME" --contextroot rh "$WAR"Report this fallback explicitly too — the app is restored, but via deploy
rather than redeploy, which is worth flagging since it means the earlier
redeploy genuinely failed rather than just being slow.
Write the updated wiki page. The wiki lives in the sibling ../hmis.wiki
repo. If that directory does not exist, print a warning and skip steps 8–9
(the DDL file is still useful locally).
The SQL must NOT be inlined into the wiki page. The script is ~650 KB,
which exceeds GitHub's page-rendering limit (~512 KiB) — GitHub silently
truncates the rendered page mid-statement, so anyone copying the SQL from
the page would apply an incomplete script. Instead, commit the DDL as a
plain file (files/createDDL.sql) in the wiki repo and have the page link
to its raw URL, which always serves the complete file.
WIKI_DIR="$(git rev-parse --show-toplevel)/../hmis.wiki"
WIKI_FILE="$WIKI_DIR/Database-Schema-DDL-Generation-Guide.md"
UPDATE_TS="$(date '+%Y.%m.%d %H.%M')"
AUTHOR="$(git config user.name | awk '{print $NF}')" # last name only
if [ ! -d "$WIKI_DIR" ]; then
echo "WARNING: wiki repo not found at $WIKI_DIR — skipping wiki publish"
else
mkdir -p "$WIKI_DIR/files"
cp "$DDL_DIR/createDDL.jdbc" "$WIKI_DIR/files/createDDL.sql"
cat > "$WIKI_FILE" << WIKI_HEADER
This page explains how to generate and apply the full database schema for the
application, including all missing tables and fields. This is especially
useful when setting up a fresh instance of the application or restoring a
database structure.
## Steps to Generate the DDL File
1. Locate the \`persistence.xml\` file in your project you use for development.
2. Replace its contents with the configuration from \`persistence_for_database_generation_script.xml\`.
3. Adjust the values in that file, especially the location where the DDL file should be generated on your computer.
4. Run the application once. This will generate the full database schema as a DDL script in the specified file location.
5. Open the generated DDL file and copy its contents.
6. In the application where you want to update the database, go to **Menu > Administration > Manage Metadata > Add Missing Fields**, paste the copied DDL content into the provided text area, and click the **Update Database** button.
7. The latest version of the DDL file is available for download below so that you need not generate it yourself.
## Last Update - $UPDATE_TS - ($AUTHOR)
## Download the Full DDL File
**[Download createDDL.sql](https://raw.githubusercontent.com/wiki/hmislk/hmis/files/createDDL.sql)**
> **Why a download link instead of inline SQL?** The full script is ~650 KB —
> larger than GitHub's page-rendering limit — so when it was pasted into this
> page, GitHub silently truncated the displayed SQL mid-statement. Anyone
> copying from the rendered page would have applied an incomplete script.
> Always use the raw file linked above; never copy the SQL from a rendered
> wiki page.
To apply it, go to **Menu > Administration > Manage Metadata > Add Missing
Fields** and click **Load Latest DDL from Wiki** — the server downloads the
file above directly, then click **Update Database**. This is the recommended
path: pasting the full ~650 KB script into the text area can exceed the
server's maximum POST size and fail with a "Post too large" error.
On older application versions that do not have the **Load Latest DDL from
Wiki** button, download the file and paste its contents into the text area
as described in step 6 above — and if you get a "Post too large" error,
upgrade the application or apply the script in smaller parts.
WIKI_HEADER
echo "Wiki page written: $WIKI_FILE"
echo "DDL file written: $WIKI_DIR/files/createDDL.sql"
fiif [ -d "$WIKI_DIR" ]; then
cd "$WIKI_DIR"
# Pull in any concurrent wiki edits; if this file conflicts, keep ours
git stash --include-untracked
git pull --rebase origin master || true
git stash pop || true
# Only touch --theirs if the pop actually left an unmerged (conflicted)
# entry for this file. Outside a real conflict `git checkout --theirs`
# on a fully-merged path checks it out from HEAD/index, silently
# discarding the working-tree content stash pop just restored — which
# then makes the "diff --cached --quiet" check below wrongly conclude
# there's nothing to commit.
if git ls-files -u -- Database-Schema-DDL-Generation-Guide.md files/createDDL.sql | grep -q .; then
git checkout --theirs Database-Schema-DDL-Generation-Guide.md files/createDDL.sql 2>/dev/null || true
fi
git add Database-Schema-DDL-Generation-Guide.md files/createDDL.sql
git rebase --continue 2>/dev/null || true
# Commit (skip if nothing staged, e.g. rebase already applied it)
git diff --cached --quiet || git commit -m "docs(wiki): update DDL generation guide with $(date '+%Y-%m-%d') schema"
git push origin master
cd -
fiIf the push is rejected again (another concurrent push), re-run the
pull --rebase + push cycle once more by hand — two concurrent DDL
regenerations are rare enough that a single retry is sufficient.
persistence.xml or DdlFileEnhancerService.java with the
DDL-generation edits in place — they are local-machine-specific
(hardcoded absolute paths) and would break CI/CD and other developers'
checkouts. Double-check git diff on both files before every commit
during this workflow; commit-code also flags a staged persistence.xml
for review.AUDITEVENT).© hmislk, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/generate-ddl of hmislk/hmis.
Open the folder on GitHubat commit 19f723d
Generate Ddl next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Generate Ddl this skillhmislk/hmis | 236 | — | ~3.5k | Automated safety check: Notes | GPL-3.0 | |
| SQL Optimization Patternsynulihao/AgentSkillOS | 618 | 11 repos | ~3.3k | Automated safety check: Pass | None | |
| Datamodellmnimbalyst/nimbalyst | 1.9k | — | ~713 | Automated safety check: Pass | MIT | |
| Add Mpk Taskmirage-project/mirage | 2.5k | — | ~4.5k | Automated safety check: Pass | Apache-2.0 | |
| Sqlite Schema Designfastrepl/anarlog | 9.5k | — | ~1.9k | Automated safety check: Pass | MIT | |
| DB Migrationskurealnum/dotfiles | 290 | — | ~820 | Automated safety check: Pass | None |
ynulihao/AgentSkillOS
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries.
nimbalyst/nimbalyst
Create visual data models for database schemas using Nimbalyst's DataModelLM editor.
mirage-project/mirage
Step-by-step guide for adding a new task implementation to Mirage Persistent Kernel (MPK).
fastrepl/anarlog
Design or review schemas for crates/cloudsync using SQLite Sync constraints, not generic SQLite advice.
kurealnum/dotfiles
A skill your agent uses when generating or regenerating Drizzle migration files, changing database schema tables or columns, resolving migration sequence conflicts after rebase, reviewing migration…
jolars/panache
Grow Panache's CommonMark spec conformance under Flavor::CommonMark by running every spec.txt example through the shared parser, comparing rendered HTML against the spec's expected HTML…
hmislk/hmis
Reference for calling existing HMIS REST APIs. An agent skill from hmislk/hmis.
hmislk/hmis
Application configuration options reference for the HMIS project.
hmislk/hmis
Ultra-compressed communication mode. An agent skill from hmislk/hmis.
hmislk/hmis
MySQL database development guide for the HMIS project. An agent skill from hmislk/hmis.
hmislk/hmis
A skill your agent uses when asked to make a demo, training, how-to or tutorial video with sound or voice-over showing an HMIS function or configuration (e.g.
hmislk/hmis
Sync development into QA/testing environment branches (QA1-QA4, local RH staging) via PR + merge on GitHub.
Works with
Categories
Generate a full-schema DDL script (CREATE TABLE + ALTER TABLE ADD COLUMN) into the project's tmp/ folder by temporarily enabling EclipseLink DDL generation, rebuilding, and redeploying the local app. Generate Ddl is an agent skill from hmislk/hmis. Generate a full-schema DDL script (CREATE TABLE + ALTER TABLE ADD COLUMN) into the project's tmp/ folder by temporarily enabling EclipseLink DDL generation, rebuilding, and redeploying the local app.
Generate Ddl fits situations like: asked to generate/regenerate the DDL for the Database-Schema-DDL-Generation-Guide wiki page; produce a schema-sync script for a fresh/behind database.
Run `npx skills add hmislk/hmis --skill generate-ddl -a claude-code`. Or copy the skill folder (.claude/skills/generate-ddl in hmislk/hmis) into .claude/skills/generate-ddl in your project. Claude Code loads it when a task matches its description.
Run `npx skills add hmislk/hmis --skill generate-ddl -a codex`. Or copy the skill folder (.claude/skills/generate-ddl in hmislk/hmis) into .agents/skills/generate-ddl in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hmislk/hmis --skill generate-ddl -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generate-ddl, .gemini/skills/generate-ddl, .github/skills/generate-ddl and .opencode/skills/generate-ddl in your project.
Going by SKILL.md and its folder, Generate Ddl needs the command-line tools its instructions call (git and mvn). Its frontmatter pre-approves these tools: Bash, Read, Edit.
SKILL.md names 1 domain. In commands or code: raw.githubusercontent.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Generate Ddl is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Generate Ddl: SQL Optimization Patterns (ynulihao/AgentSkillOS, 618 stars), Datamodellm (nimbalyst/nimbalyst, 1.9k stars), Add Mpk Task (mirage-project/mirage, 2.5k stars) and Sqlite Schema Design (fastrepl/anarlog, 9.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
hmislk (a GitHub organization) maintains it in hmislk/hmis, which has 236 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on October 10, 2026.
Source: hmislk/hmis on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.