hashimiche/hal/database

Claude Code and agent skill by hashimiche/hal

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Deploy, verify, and troubleshoot the Vault database secrets lab in hal. Use this skill when the user asks to enable the database secrets engine, generate dynamic DB credentials, debug database leases, rotate the root connection, run the KinD + VSO VaultDynamicSecret demo, or reset the local database demo. Triggers include "enable database", "dynamic db credentials", "Vault database engine", "rotate root", "database --k8s", "VaultDynamicSecret", and "hal vault database".

Install

npx vskill@latest install hashimiche/hal/database

SKILL.md

The same SKILL.md was published earlier as hashimiche/hal/database.

Hal Vault Database Configurator

This skill covers the local Vault database secrets engine lab implemented by hal vault database.

Lab Assumptions

  • Vault runs locally at http://vault.localhost:8200
  • Root token defaults to root
  • Backend defaults to MariaDB (--backend mariadb); Postgres is planned but not implemented yet.
  • Prefer hal for deployment and cleanup, then use vault read/write for day-2 operations

What The Command Actually Sets Up

  • Vault secrets engine: database/
  • Connection name: database/config/hal-vault-mariadb
  • Dynamic role: database/roles/dba-role
  • Root connection user initially created: vaultadmin
  • Vault rotates the vaultadmin password so it becomes Vault-owned
  • hal-vault-mariadb is shared (consumer vault-database; the Agentic IAM lab is another): enable reuses it when running, disable keeps it while another consumer remains, and only vault-database's own database/ mount and vaultadmin broker are removed
--k8s mode (adds KinD + VSO VaultDynamicSecret demo)
  • Shared KinD cluster on hal-net via ensureHALKindCluster() (port 30084 → host 8091)
  • Dedicated Vault Kubernetes auth mount: kubernetes-db/ (never kubernetes/)
  • Vault Secrets Operator + VaultDynamicSecret writing rotating DB creds into a Kubernetes Secret
  • Demo app at http://db.localhost:8091 (15s TTL, non-renewable leases so each cycle mints a new username/password)

Workflow

Step 1: Choose the lifecycle action

Use smart status mode if needed:

hal vault database

Then use the correct lifecycle command:

hal vault database enable --backend mariadb --vault-mariadb-tag 11.8 hal vault database enable --k8s hal vault database update hal vault database disable hal vault database disable --k8s

Step 2: Enrich with Vault MCP Context

Once the hal command completes successfully, verify the configuration using Vault MCP when available.

Inspect:

  1. database/config/hal-vault-mariadb
  2. database/roles/dba-role
  3. sys/mounts
Step 3: Present structured results

Tier 1 — Success Summary Provide a brief confirmation that the database is running and the engine is mounted.

Tier 2 — Configuration Details Table

ComponentValueDescription
DB Containerhal-vault-mariadbLocal Docker network hostname
Connection Namehal-vault-mariadbVault's internal reference to the selected DB
Vault Roledba-roleThe role used to generate dynamic creds
Mount Pathdatabase/The database secrets engine

Tier 3 — Actionable Testing Commands

export VAULT_ADDR='http://vault.localhost:8200' export VAULT_TOKEN='root'

vault read database/creds/dba-role vault read database/config/hal-vault-mariadb vault read database/roles/dba-role

Handling Edge Cases

  1. Vault is not running: Instruct the user to run hal vault create first.
  2. Port conflicts: If Docker fails to bind 3306 or 5432, advise the user to stop local DB services using those ports.
  3. Dangling leases prevent cleanup: Explain that the code force-revokes database/ leases during teardown.
  4. User wants to change SQL statements or TTLs after deployment: Provide exact vault write database/roles/dba-role ... commands rather than suggesting Go edits.
  5. VSO cannot reach Vault / KinD not on `hal-net`: Re-run hal vault database enable --k8s (or update --k8s) so ensureHALKindCluster() attaches kind-control-plane to hal-net. Do not tell the user to recreate the cluster unless the port map is stale.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hashimiche/hal/database/badge)](https://verified-skill.com/skills/hashimiche/hal/database)

Something wrong with this skill or its page? Tell us.