원클릭으로
add-migration
Create a new D1 database migration for the secret-vault. Use when adding tables, columns, or indexes to the vault's schema.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Create a new D1 database migration for the secret-vault. Use when adding tables, columns, or indexes to the vault's schema.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Add a new CLI command to the hfs tool. Use when adding user-facing commands, subcommands, or flags to the CLI.
Review code changes for security issues specific to this encrypted secret vault. Use when modifying auth, encryption, scope enforcement, or any data-access paths.
Diagnose and fix issues with the secret-vault Worker, hfs CLI, D1 database, Cloudflare Access auth, and encryption. Use when something is broken, returning errors, or behaving unexpectedly.
Add a new API endpoint to the secret-vault Cloudflare Worker. Use when creating new routes, resources, or API functionality in the vault.
Write tests for the secret-vault Worker and hfs CLI. Use when adding test coverage, fixing bugs with regression tests, or validating behavior.
Define API endpoints with Zod schemas and auto-generated OpenAPI specs using @hono/zod-openapi. Use when adding, modifying, or documenting API routes.
SOC 직업 분류 기준
| name | add-migration |
| description | Create a new D1 database migration for the secret-vault. Use when adding tables, columns, or indexes to the vault's schema. |
Migrations live in secret-vault/migrations/. Applied with Wrangler.
NNNN_description.sql (next: 0014_*.sql)CREATE TABLE IF NOT EXISTS or ALTER TABLEnpm run db:migrate:local.bind() in Worker code for new columnsdatetime('now') (UTC text). No native DATE type.ON CONFLICT ... DO UPDATE0001_init.sql - Consolidated: secrets (HMAC, tags, envelope encryption, expiry), secret_versions, roles (seeded, allowed_tags), users (RBAC, age_public_key), service_tokens (role FK), audit_log (request_id, prev_hash, warp_connected)0002_rbac.sql - Incremental: roles + users tables (for upgrades from v0.7.x/v0.8.x)0003_production_hardening.sql - Incremental: role FK, tags, request_id columns (for upgrades)0004_secret_expiry.sql - Incremental: expires_at column on secrets0005_audit_hash_chain.sql - Incremental: prev_hash column on audit_log0006_envelope_encryption.sql - Incremental: encrypted_dek, dek_iv on secrets and secret_versions0007_role_tags.sql - Incremental: allowed_tags column on roles0008_user_pubkey.sql - Incremental: age_public_key column on users0009_role_policies.sql - New table: role_policies (policy-based RBAC with per-scope tag restrictions)0010_audit_warp.sql - Incremental: warp_connected column on audit_log0011_zt_device_binding.sql - Incremental: zt_fingerprint column on users0012_service_token_secret.sql - Incremental: client_secret_hash column on service_tokens for direct auth0013_service_token_age_key.sql - Incremental: age_public_key column on service_tokens for E2E encryptionSee current schema for full DDL.
npm run db:migrate:local # Test locally
npm run db:migrate # Apply to production
secret-vault/migrations/NNNN_description.sqlIF NOT EXISTS / ALTER TABLEnpm run db:migrate:local