ワンクリックで
add-command
Add a new CLI command to the hfs tool. Use when adding user-facing commands, subcommands, or flags to the CLI.
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.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create a new D1 database migration for the secret-vault. Use when adding tables, columns, or indexes to the vault's schema.
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.
| name | add-command |
| description | Add a new CLI command to the hfs tool. Use when adding user-facing commands, subcommands, or flags to the CLI. |
hfs/src/commands/ - Command modules (admin-ops.ts, audit.ts, auth.ts, completion.ts, config.ts, deploy.ts, expiring.ts, flags.ts, keygen.ts, profiles.ts, roles.ts, scan.ts, secrets-bulk.ts, secrets-ops.ts, secrets.ts, template.ts, tokens.ts, users.ts)hfs/src/deploy/ - Deploy phases (state.ts, phases.ts, access.ts, assets.ts, worker.ts, cf-api.ts)hfs/src/client.ts - VaultClient HTTP methods against the vault APIhfs/src/config.ts - Auth resolution, JWT storage, config managementclient() helper for authenticated VaultClient instancesdie(msg) for fatal errorsconfirm() helper before destructive actions, with -f/--force bypassexecSync with string interpolation - use execFileSync with args arraychalk.green("✓") + " message"die(msg) → chalk.red("error: ...") + exit 1chalk.dim("label: ") + chalk.bold(value)chalk.dim("No items.")-q/--quiet for pipe-friendly output, -j/--json for structured outputhfs/src/client.tsasync myAction(param: string): Promise<MyResponse> {
return this.request<MyResponse>("GET", `/my-endpoint/${encodeURIComponent(param)}`);
}
hfs/src/commands/*.ts moduleprogram
.command("my-command <arg>")
.description("Short description")
.action(async (arg: string) => {
try {
const result = await client().myAction(arg);
console.log(`${chalk.green("✓")} Done`);
} catch (e) {
die(errorMessage(e));
}
});
hfs/package.json at runtime. Source of truth: root VERSION file.npm run sync-version after changing VERSION.VaultClient.health() exists but has no CLI command - add one if neededconst sub = program.command("parent"); sub.command("child")config (set, show, clear), token (register, revoke, ls), user (ls, add, rm, disable, enable, role), role (ls, set, rm), flag (ls, get, set, rm)hfs/src/client.ts with proper typeshfs/src/commands/*.ts moduleadd-endpoint skill)hfs/README.md command tablecd hfs && npm run build && node dist/cli.js <command>