Agent skill

Restore Local DB

by hmislk in hmislk/hmis

Refresh a LOCAL MySQL database from a PRODUCTION dump, safely.

GPL-3.0Auto-check: warningsDatabases

Install Restore Local DB

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add hmislk/hmis --skill restore-local-db -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hmislk/hmis restore-local-db --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hmislk/hmis.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/restore-local-db .claude/skills/restore-local-db && rm -rf skills-src

Use ~/.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/

Facts

Skill name
restore-local-db
GitHub stars
236
Token cost
~4.1k tokens
SKILL.md length
1,711 words
Files
1
Skills in repo
33
Repo updated
First seen
Licence
GPL-3.0

At a glance

Refresh a LOCAL MySQL database from a PRODUCTION dump, safely.

  • Works in 4 steps: Safety preconditions (ABORT on any… → Sanity gate (per DB) → Restore (per DB, only if Phase 1 passed) → …
  • Asked to restore <db locally from prod
  • SKILL.md covers Inputs, Credentials file, Path selection and Keep the machine awake for the…, plus 6 more sections
  • Calls mysql, ssh and sh; needs DB_ADMIN_PASSWORD

What it does

Restore Local DB is an agent skill from hmislk/hmis. Refresh a LOCAL MySQL database from a PRODUCTION dump, safely. Use when asked to "restore <db locally from prod", "get a fresh copy of coop/ruhunu for testing", "load this dump into my local database", or "back up prod and restore it locally". Two entry points: (1) name one or more databases and the skill dumps them from the Azure VM, downloads, and restores; (2) point at an existing dump file and the skill only restores. Works for ANY database, not just coop/ruhunu. Hard guardrails prevent ever writing to the…

Its SKILL.md is about 4.1k 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. It works with Microsoft Azure, MySQL and SQL. The repository describes itself as: This is an Open Source Java EE based Hospital Information Management System. The licence is GPL-3.0.

When your agent uses it

  • Asked to restore <db locally from prod
  • Get a fresh copy of coop/ruhunu for testing
  • Load this dump into my local database
  • Back up prod and restore it locally

Example prompts

  • “restore <db locally from prod”
  • “get a fresh copy of coop/ruhunu for testing”
  • “load this dump into my local database”
  • “/restore-local-db”

Requirements

  • Pre-approved tools (allowed-tools): Bash

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Safety preconditions (ABORT on any failure)
  2. Sanity gate (per DB)
  3. Restore (per DB, only if Phase 1 passed)
  4. Report

What it can do on your machine

Read from SKILL.md and the folder at commit d5d2020. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • mysql
    • ssh
    • sh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use ssh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • DB_ADMIN_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Restore Local DB loads about 4.1k tokens when it runs. Until then it costs about 173 tokens; SKILL.md has 1,711 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~173
When it runs · the whole SKILL.md, loaded when a task matches
~4.1k

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.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:134
    /c/Windows/System32/OpenSSH/ssh.exe -F ~/.ssh/config -N -f <ssh-alias>
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:196
    DB / Payara-admin ports listening (the ~/.ssh/config
  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash

Automated 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.

SKILL.md

The full file from hmislk/hmis at commit d5d2020, republished under its GPL-3.0 licence (© hmislk). 1,711 words, ~4,084 tokens.

Download SKILL.mdSave it as .claude/skills/restore-local-db/SKILL.md (or your agent's skills folder).
name
restore-local-db
description
Refresh a LOCAL MySQL database from a PRODUCTION dump, safely. Use when asked to "restore <db> locally from prod", "get a fresh copy of coop/ruhunu for testing", "load this dump into my local database", or "back up prod and restore it locally". Two entry points: (1) name one or more databases and the skill dumps them from the Azure VM, downloads, and restores; (2) point at an existing dump file and the skill only restores. Works for ANY database, not just coop/ruhunu. Hard guardrails prevent ever writing to the Azure production databases: it refuses to run while any SSH tunnel is open and asserts the MySQL target is the local instance before every destructive step.
allowed-tools
Bash
user-invocable
true

Restore a Local Database from a Production Dump

Bring a local MySQL database up to date with a production copy, without any risk of touching the live Azure production databases.

The destructive step is DROP DATABASE. Every guardrail exists to guarantee that when it runs, it runs against local MySQL and nothing else.

Inputs

Parse the user's request into:

InputMeaningDefault
<db> (one or more)Database name(s) to restore locally, e.g. coop, ruhunu, mprequired
--dump <path>An already-downloaded dump file (.sql or .sql.gz). When given, skip acquisition — go straight to Phase 0. One --dump per <db>.none
--skip-pre-backupSkip the local rollback dump in Phase 2. Announce this loudly.off (backup is taken)
--bill-threshold NSanity-gate row limit100
--bill-days DSanity-gate look-back window in days5

If the user pastes a dump path in prose ("restore local coop from <BACKUP_DIR>\coop_x.sql.gz"), treat it as --dump.

Credentials file

All passwords are read at runtime from the machine's credentials file — never hardcode them in this skill. Location is platform-specific (per the database-guide skill):

  • Windows: C:\Credentials\Credentials.txt
  • Linux / macOS: ~/.config/hmis/credentials.txt

Resolve it once at the start: use the Windows path if it exists, else the $HOME/.config/hmis/credentials.txt path, else stop and ask the user where their credentials file is. Referenced below as <CREDS>.

Downloaded dumps and rollback backups go under a backup directory — C:\Backups on the Windows dev laptop (C:\Backups\pre-restore for rollback copies). Adjust for the platform if the skill ever runs elsewhere. Referenced below as <BACKUP_DIR>. Temp files (.err logs etc.) go in the session scratchpad directory, referenced as <SCRATCH>.

Section names and the exact set of DB servers in that file change over time — read the file and match on the section headings and the "Databases :" lines, don't assume a fixed layout.

Path selection

user named DB(s) only            -> Acquisition sub-procedure, then Phase 0..3 per DB
user gave --dump <path>          -> Phase 0..3 per DB (no acquisition)

Phase 0 runs in BOTH paths. A provided dump does not exempt the run from the no-SSH-tunnel assertion — the DROP DATABASE is just as destructive either way.

Keep the machine awake for the whole run

A large import takes many minutes and the machine going to sleep mid-import kills it, leaving the target DB half-populated. Before starting, disable sleep:

bash
powercfg //change standby-timeout-ac 0
powercfg //change standby-timeout-dc 0
powercfg //change hibernate-timeout-ac 0
powercfg //change hibernate-timeout-dc 0

If the laptop lid may be closed, also set the lid action to "do nothing" (powercfg //setacvalueindex SCHEME_CURRENT SUB_BUTTONS LIDACTION 0 + //setdcvalueindex ... 0 + //setactive SCHEME_CURRENT). Restore the previous power scheme (powercfg //setactive SCHEME_BALANCED, or re-apply the saved timeouts) in Phase 3 once every DB is done.

Run the import itself as a detached process (a hidden powershell.exe Start-Process, or nohup under a persistent shell) that survives the controlling session being interrupted, and have it write progress to a status file you poll.


Acquisition sub-procedure (only when no --dump given)

Runs before Phase 0. It opens an SSH tunnel to Azure, dumps on the VM, downloads the compressed file, then kills the tunnel. The restore never coexists with a tunnel.

A1 — Resolve each DB to its Azure DB server

Read <CREDS>. In the NEW - MySQL Flexible Servers section it lists, per server:

--- db3 --- 10.30.2.6 ---
Databases : coop, rhdrawer (+ audits)
Username  : hmis_admin
Password  : <complex>

and the SSH host aliases in the NEW - SSH access section (new-shared1..4, each forwarding local ports 4305=db1 4306=db2 4307=db3 4308=db4). Any new-shared* alias forwards all four DB ports, so you can tunnel through a single host for several DBs.

Build, for each <db>:

  • DB_PRIVATE_IP (e.g. 10.30.2.6)
  • DB_LOCAL_PORT (4305..4308 matching db1..db4)
  • DB_ADMIN_PASSWORD (the complex Azure password for that server)
  • an SSH host alias to tunnel through (any new-shared*; prefer the one whose "Clients" list names this DB)

If a DB is not listed in the credentials file, stop and ask the user for the DB server's private IP, the matching local port, and which SSH alias to use.

A2 — Open ONE tunnel
bash
/c/Windows/System32/OpenSSH/ssh.exe -F ~/.ssh/config -N -f <ssh-alias>

Verify the needed port(s) answer:

bash
mysql -h 127.0.0.1 -P <DB_LOCAL_PORT> -u hmis_admin -p'<DB_ADMIN_PASSWORD>' -e "SELECT 1;"

Only one new-shared* tunnel at a time — the 4305-4308 ports are identical across every alias.

A3 — Dump on the VM, gzip, download

Do the dump on the VM against the DB's private IP. Dumping through the tunnel from the laptop is far slower — an 8 GB DB did not finish in 2 minutes that way, versus ~90 seconds on the VM.

Write a --defaults-extra-file cnf locally, scp it to /var/tmp on the VM, chmod 600, then run mysqldump on the VM. Quote the password in the cnf (password="...") — the Azure admin passwords contain #, ?, =, +, and an unquoted value silently truncates at the first special char and fails with Access denied. Then:

bash
# on the VM, detached:
nohup sh -c 'nice -n 10 mysqldump --defaults-extra-file=/var/tmp/<db>.cnf \
  --single-transaction --quick --routines --triggers --events \
  --set-gtid-purged=OFF --no-tablespaces <db> 2>/var/tmp/<db>.err \
  | gzip > /var/tmp/<db>_prod_<ts>.sql.gz; echo $? > /var/tmp/<db>.done' >/dev/null 2>&1 &

Poll /var/tmp/<db>.done. When it reads 0 and <db>.err is empty: gzip -t the file on the VM, check its tail decompresses to -- Dump completed on ..., then scp it to <BACKUP_DIR>\<db>_prod_<ts>.sql.gz. Confirm the downloaded byte size matches the VM's exactly.

A4 — Tear the tunnel down
bash
taskkill //F //IM ssh.exe

Then clean up the VM: rm -f /var/tmp/<db>.cnf /var/tmp/<db>_prod_<ts>.sql.gz /var/tmp/<db>.err /var/tmp/<db>.done. Delete the local cnf too — it holds the Azure admin password.

The downloaded <BACKUP_DIR>\<db>_prod_<ts>.sql.gz is now the --dump for that DB.


Phase 0 — Safety preconditions (ABORT on any failure)

Run this immediately before touching local MySQL, in every path.

0.1 — No SSH tunnels
bash
taskkill //F //IM ssh.exe 2>&1 || true          # ssh-agent service is fine, leave it
# assert zero ssh.exe (excluding the ssh-agent Windows service):
tasklist | grep -i "ssh.exe" | grep -v "ssh-agent"          # must produce NOTHING
# assert no forwarded DB / Payara-admin ports listening (the ~/.ssh/config
# new-shared* hosts forward 4305-4308 for the four DBs plus a 3x848 admin port):
netstat -ano | grep LISTENING | grep -E ":(430[5-9]|3[0-9]848)\b"   # must produce NOTHING

If any ssh.exe remains or any forwarded port is listening -> ABORT, tell the user to close their tunnels first. (On the acquisition path this check runs after A4 has already killed the tunnel this skill opened; a surviving tunnel here means one the user opened separately.)

0.2 — MySQL target is the LOCAL instance

Get the local simple password from <CREDS> (LOCAL DEVELOPMENT - MySQL section). Then:

bash
mysql --host=127.0.0.1 --port=3306 --protocol=TCP -uroot -p<simple> -N \
  -e "SELECT CONCAT(@@hostname,'|',@@version,'|',@@port,'|',@@datadir);"

Assert ALL of:

  • @@version does NOT contain azure (Azure servers report 8.0.46-azure)
  • @@port = 3306
  • @@hostname is this machine (not a db*/Azure host)
  • @@datadir is a local Windows path

Any mismatch -> ABORT.

0.3 — Command self-scan

Before running any DROP / import / mysqldump command, grep the command string for forbidden tokens and abort on a match:

10.30.    20.24.    40.83.    57.158.    carecode.org

plus any Azure admin-password fragment you loaded in A1. Every restore command must use --host=127.0.0.1 --port=3306 --protocol=TCP with the simple local password only. A complex password anywhere in a restore command = wrong target.


Phase 1 — Sanity gate (per DB)

Confirm the local DB is stale test data, not something real:

bash
mysql --host=127.0.0.1 --port=3306 --protocol=TCP -uroot -p<simple> <db> -N \
  -e "SELECT COUNT(*) FROM bill WHERE createdAt >= NOW() - INTERVAL <D> DAY;"
  • result < <N> -> PASS, safe to drop & restore.
  • result >= <N> -> STOP this DB. Do not drop. Report the count and the latest MAX(createdAt) and ask the user to investigate.
  • no bill table -> fall back to COUNT(*) of the largest table and require explicit user confirmation before proceeding.

Also print, for the report: SELECT COUNT(*) FROM bill; and SELECT MAX(createdAt) FROM bill; (the "before" numbers).


Show full SKILL.md (663 more words)Show less

Phase 2 — Restore (per DB, only if Phase 1 passed)

2.1 — Validate the dump file
bash
gzip -t <dump>                                        # integrity (skip for plain .sql)
gzip -dc <dump> | head -40 | grep -E "^-- Host:|Database:"       # identity
gzip -dc <dump> | grep -c -E "^(CREATE DATABASE|USE )" || true   # MUST print 0
gzip -dc <dump> | grep -c "^CREATE TABLE "                       # expected table count
gzip -dc <dump> | tail -3                                        # MUST end "-- Dump completed on ..."
  • -- Host: / Database: should name the expected prod server and DB.
  • The CREATE DATABASE / USE count must be 0 — if not, ABORT: those statements override the target DB and defeat the mysql <db> argument safety.
  • Record the CREATE TABLE count — Phase 2.5 compares the restored DB's table count against it to detect a truncated import.
  • If the dump does not end with -- Dump completed on ..., it was itself truncated (interrupted mysqldump, sleep, disk full) — ABORT, re-acquire.
  • grep -c on a gzip -dc pipe may report a broken pipe / non-zero exit because head/-m closed the reader early; that is harmless, judge on the printed count.
2.2 — Pre-restore rollback backup (unless --skip-pre-backup)
bash
mkdir -p <BACKUP_DIR>/pre-restore
mysqldump --host=127.0.0.1 --port=3306 --protocol=TCP -uroot -p<simple> \
  --single-transaction --quick --routines --triggers --events --no-tablespaces \
  <db> 2><BACKUP_DIR>/pre-restore/<db>_local_before_<ts>.err \
  | gzip > <BACKUP_DIR>/pre-restore/<db>_local_before_<ts>.sql.gz
gzip -t <BACKUP_DIR>/pre-restore/<db>_local_before_<ts>.sql.gz    # verify

Large DBs take minutes — run it in the background and wait. Keep this file until the user confirms the restored DB works in the app.

If --skip-pre-backup: print a clear warning that there is no rollback copy and continue.

2.3 — Drop & recreate (LOCAL)

Re-run Phase 0.1 + 0.2 + 0.3 one more time, then:

bash
mysql --host=127.0.0.1 --port=3306 --protocol=TCP -uroot -p<simple> \
  -e "DROP DATABASE IF EXISTS <db>; CREATE DATABASE <db> CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;"

If CREATE DATABASE hangs on "Waiting for schema metadata lock", a stale local Payara connection pool is holding the old schema. Options:

  • easiest: stop local Payara before Phase 2.3 (asadmin stop-domain) so nothing holds the schema, restart it in Phase 3.
  • or wait — the lock clears on its own once the import starts inserting.

Do not issue a second CREATE DATABASE while the first is waiting — it queues behind the same metadata lock and looks stuck. Do not kill the import to "fix" a stalled CREATE.

2.4 — Import
bash
gzip -dc <dump> | mysql --host=127.0.0.1 --port=3306 --protocol=TCP \
  -uroot -p<simple> <db> 2><SCRATCH>/<db>_restore.err

Run this detached (see "Keep the machine awake") for anything over ~1 GB uncompressed — an interrupted import leaves the DB half-loaded. mysql reports only the first error; check the .err file (the "Using a password" line is a warning, not an error).

If the import is interrupted (sleep, killed shell, power loss): the target DB is now partial. Recovery is simply to redo Phase 2.3 + 2.4 — DROP the half-loaded DB and re-import from the same dump. The dump is a full snapshot, so replaying it from an empty DB is always correct; there is no "resume". The Phase 2.2 rollback copy and the prod dump are both untouched by a failed import.

2.5 — Verify
bash
mysql --host=127.0.0.1 --port=3306 --protocol=TCP -uroot -p<simple> <db> -e "
  SELECT COUNT(*) AS total_bills FROM bill;
  SELECT MAX(createdAt) AS latest_bill FROM bill;
  SELECT COUNT(*) AS table_count FROM information_schema.tables WHERE table_schema='<db>';"
  • table_count must equal the CREATE TABLE count recorded in Phase 2.1. If it is short, the import was truncated — redo Phase 2.3 + 2.4.
  • total_bills should be production-scale and latest_bill recent (close to when the dump was taken). A tiny count means the bill table did not finish.
  • The import .err file must contain nothing but the password warning.
2.6 — Table-name case
bash
mysql --host=127.0.0.1 --port=3306 --protocol=TCP -uroot -p<simple> \
  -e "SHOW VARIABLES LIKE 'lower_case_table_names';"
  • value 1 (typical on the Windows dev laptop) -> names are already case-folded, nothing to do.
  • value 0 and the dump's CREATE TABLE names are lowercase and the app expects uppercase -> generate and run the rename script:
sql
SELECT CONCAT('RENAME TABLE `', table_name, '` TO `tmp_', table_name, '`; ',
              'RENAME TABLE `tmp_', table_name, '` TO `', UPPER(table_name), '`;')
FROM information_schema.tables
WHERE table_schema='<db>' AND table_name <> UPPER(table_name);

Pipe its output back into mysql <db>.


Phase 3 — Report

One block per DB:

<db>
  restored from : <dump path>   (source: <-- Host line> / <Database line>)
  bills before  : <n>   (latest <date>)
  bills after   : <n>   (latest <date>)
  tables        : <n>
  rollback copy : <BACKUP_DIR>\pre-restore\<db>_local_before_<ts>.sql.gz   [or: SKIPPED]

Then:

  • Restore the previous power scheme / sleep timeouts disabled in "Keep the machine awake".
  • Restart local Payara (asadmin restart-domain) so its connection pool reconnects to the fresh schema.
  • Tell the user to confirm the app works against the restored DB before deleting the Phase 2.2 rollback copies.

Guardrail summary (why each exists)

GuardrailPrevents
Kill + assert no ssh.exe, no tunnel ports (Phase 0.1, every path)A restore command resolving through a live tunnel to an Azure DB
@@version not *-azure, @@port 3306, local @@datadir (0.2)Being connected to a production server at all
Command self-scan for Azure IPs / complex passwords (0.3)A copy-paste of a prod host/credential into a destructive command
Acquisition tunnel killed before Phase 0 (A4)The restore ever running while a tunnel is open
Sanity gate on recent local bill count (Phase 1)Dropping a local DB that actually holds real/unsaved work
Dump must have no CREATE DATABASE / USE (2.1)The dump redirecting the write to a different DB than the mysql <db> arg
Pre-restore rollback dump (2.2)An unrecoverable mistake

© 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

Files

Just SKILL.md in .codex/skills/restore-local-db of hmislk/hmis.

Open the folder on GitHubat commit d5d2020

Compare with similar skills

Restore Local DB 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.

Restore Local DB compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Restore Local DB this skillhmislk/hmis236—~4.1kAutomated safety check: WarnGPL-3.0
Database Observabilitygrafana/skills279—~1.1kAutomated safety check: PassApache-2.0
Database ObservabilityKilo-Org/kilo-marketplace190—~1.4kAutomated safety check: PassApache-2.0
Azure Storagemicrosoft/GitHub-Copilot-for-Azure2552 repos~1.3kAutomated safety check: PassMIT
GCP Cloud SQLsickn33/agentic-awesome-skills47k2 repos~2.4kAutomated safety check: PassMIT
Azure Resource Manager SQL Dotnetmicrosoft/skills3.1k6 repos~2.6kAutomated safety check: PassMIT

Similar skills

  • Official

    Set up Grafana Cloud Database Observability for MySQL and PostgreSQL — enables pgstatstatements / Performance Schema, creates a least-privilege monitoring user, configures the…

    279 GitHub stars~1.1k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Database Observability

    Kilo-Org/kilo-marketplace

    Grafana Cloud Database Observability — query-level performance insights for MySQL and PostgreSQL.

    190 GitHub stars~1.4k tokensUpdated 10 days ago
    DevOps & CloudAuto-check passed
  • Azure Storage

    microsoft/GitHub-Copilot-for-Azure

    Official

    Azure Storage Services including Blob Storage, File Shares, Queue Storage, Table Storage, and Data Lake.

    255 GitHub starsUsed in 2 repos~1.3k tokens
    DatabasesAuto-check passed
  • GCP Cloud SQL

    sickn33/agentic-awesome-skills

    Provision Cloud SQL and Spanner databases. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~2.4k tokens
    DatabasesAuto-check passed
  • Official

    Azure Resource Manager SDK for Azure SQL in .NET. An agent skill from microsoft/skills.

    3.1k GitHub starsUsed in 6 repos~2.6k tokens
    DevOps & CloudAuto-check passed
  • Official

    Azure MySQL Flexible Server SDK for .NET. An agent skill from microsoft/skills.

    3.1k GitHub starsUsed in 6 repos~3.5k tokens
    DevOps & CloudAuto-check passed

More from hmislk/hmis

All 33 skills in this repo
  • API Usage

    hmislk/hmis

    Reference for calling existing HMIS REST APIs. An agent skill from hmislk/hmis.

    236 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Application configuration options reference for the HMIS project.

    236 GitHub stars~474 tokensUpdated today
    Auto-check passed
  • Caveman

    hmislk/hmis

    Ultra-compressed communication mode. An agent skill from hmislk/hmis.

    236 GitHub starsUsed in 21 repos~946 tokens
    Auto-check passed
  • Database Guide

    hmislk/hmis

    MySQL database development guide for the HMIS project. An agent skill from hmislk/hmis.

    236 GitHub stars~664 tokensUpdated today
    Auto-check passed
  • Demo Video

    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.

    236 GitHub stars~3.9k tokensUpdated today
    Auto-check passed
  • Deploy QA

    hmislk/hmis

    Sync development into QA/testing environment branches (QA1-QA4, local RH staging) via PR + merge on GitHub.

    236 GitHub stars~2.1k tokensUpdated today
    Auto-check: notes

Questions about Restore Local DB

What does Restore Local DB do?

Refresh a LOCAL MySQL database from a PRODUCTION dump, safely. Restore Local DB is an agent skill from hmislk/hmis. Refresh a LOCAL MySQL database from a PRODUCTION dump, safely.

When should I use Restore Local DB?

Restore Local DB fits situations like: asked to restore <db locally from prod; get a fresh copy of coop/ruhunu for testing; load this dump into my local database; back up prod and restore it locally.

How do I install Restore Local DB in Claude Code?

Run `npx skills add hmislk/hmis --skill restore-local-db -a claude-code`. Or copy the skill folder (.codex/skills/restore-local-db in hmislk/hmis) into .claude/skills/restore-local-db in your project. Claude Code loads it when a task matches its description.

How do I install Restore Local DB in Codex?

Run `npx skills add hmislk/hmis --skill restore-local-db -a codex`. Or copy the skill folder (.codex/skills/restore-local-db in hmislk/hmis) into .agents/skills/restore-local-db in your project. Codex loads it when a task matches its description.

Can I use Restore Local DB in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hmislk/hmis --skill restore-local-db -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/restore-local-db, .gemini/skills/restore-local-db, .github/skills/restore-local-db and .opencode/skills/restore-local-db in your project.

What does Restore Local DB need to run?

Going by SKILL.md and its folder, Restore Local DB needs the command-line tools its instructions call (mysql, ssh and sh) and credentials named DB_ADMIN_PASSWORD. Its frontmatter pre-approves these tools: Bash.

Does Restore Local DB access the network?

SKILL.md contains no URLs. Its commands use ssh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Restore Local DB safe to install?

Our automated static check of SKILL.md flagged 2 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Restore Local DB use?

Restore Local DB 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.

How many tokens does Restore Local DB use?

About 4.1k tokens (SKILL.md is roughly 16k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Restore Local DB?

Skills that share tags, products or a category with Restore Local DB: Database Observability (grafana/skills, 279 stars), Database Observability (Kilo-Org/kilo-marketplace, 190 stars), Azure Storage (microsoft/GitHub-Copilot-for-Azure, 255 stars) and GCP Cloud SQL (sickn33/agentic-awesome-skills, 47k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Restore Local DB?

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 8, 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.