vault
Use when the user asks to store database credentials in HashiCorp Vault, dynamic secrets, KV v2, Transit encryption, the PKI engine, Vault policies, auth…
от j4flmao★ 47 звёзд на GitHub
Установить vault в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Vault
Purpose
Manage secrets, encryption, and access control using HashiCorp Vault.
Agent Protocol
Trigger
Exact user phrases: "Vault", "HashiCorp Vault", "secrets management", "dynamic secrets", "transit engine", "Vault policy", "Vault auth method", "Vault agent", "Vault injector", "secret engine", "kv-v2", "Vault role", "Vault token".
Input Context
Before activating, verify:
- Vault deployment mode (dev, HA, integrated storage, external backend).
- Auth method to use (token, Kubernetes, OIDC, AppRole, AWS IAM).
- Secrets engine needed (KV, database, PKI, Transit, AWS).
- Dynamic vs static secret requirements.
Output Artifact
Writes to Vault CLI commands, Terraform HCL for Vault, Vault policy HCL, and/or Kubernetes injector annotations.
Response Format
Vault CLI commands, policy HCL, or Terraform configuration with no extraneous explanation.
No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.
Completion Criteria
This skill is complete when:
- Secrets engine(s) are enabled and configured.
- Policies are defined and associated with auth methods/roles.
- Auth method is configured (Kubernetes, AppRole, OIDC, or token).
- Dynamic secrets path is validated (read + renew + revoke).
- Encryption (transit engine) or PKI is configured if needed.
Max Response Length
Direct file write. No response text.
Quick Start
Enable kv-v2 at secret/, write a policy granting read access, create a token, and test: vault secrets enable -path=secret kv-v2 → vault policy write → vault token create -policy=my-policy.
Decision Tree: Secrets Engine Selection
| Need | Engine | Example |
|---|---|---|
| Static secrets (API keys, passwords) | KV v2 | secret/myapp/config |
| Dynamic database credentials | Database | Short-lived DB users |
| TLS certificates | PKI | Internal mTLS, cert rotation |
| Encryption as a service | Transit | Encrypt/decrypt data at rest |
| Cloud credentials (AWS/Azure/GCP) | AWS/Azure/GCP | IAM role assumption |
| SSH access | SSH | Signed SSH certificates |
Core Workflow
Step 1: Vault Setup and Unseal
# Dev server (DO NOT USE in production)
vault server -dev
# Production with Integrated Storage
vault server -config=config.hcl
# config.hcl
storage "raft" {
path = "./vault/data"
node_id = "node1"
retry_join {
leader_api_addr = "https://vault-2.example.com:8200"
}
}
listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = false
tls_cert_file = "/path/to/cert.pem"
tls_key_file = "/path/to/key.pem"
}
api_addr = "https://vault.example.com:8200"
cluster_addr = "https://vault.example.com:8201"
ui = true
log_level = "info"
seal "awskms" {
region = "us-east-1"
kms_key_id = "arn:aws:kms:us-east-1:123456789012:key/abc123"
}
# Initialize
vault operator init -key-shares=5 -key-threshold=3
# Print unseal keys and root token — store securely
vault operator unseal # Repeat with 3 of 5 keys
Step 2: Enable and Configure KV v2
# Enable KV v2
vault secrets enable -path=secret kv-v2
# Write secrets
vault kv put secret/myapp/config \
db_url="postgres://user:pass@db:5432/app" \
api_key="abc123"
# Read secrets
vault kv get secret/myapp/config
vault kv get -version=2 secret/myapp/config
# List versions
vault kv list secret/myapp/
vault kv metadata get secret/myapp/config
# Soft delete
vault kv delete secret/myapp/config
# Permanent destroy
vault kv destroy secret/myapp/config
# Undelete
vault kv undelete -versions=1 secret/myapp/config
Step 3: Dynamic Database Secrets — PostgreSQL
vault secrets enable database
vault write database/config/postgres-prod \
plugin_name=postgresql-database-plugin \
allowed_roles="app-role,readonly-role" \
connection_url="postgresql://{{username}}:{{password}}@postgres:5432/app" \
username="vault_admin" \
password="vault_pass"
vault write database/roles/app-role \
db_name=postgres-prod \
creation_statements="CREATE USER \"{{name}}\" WITH PASSWORD '{{password}}' VALID UNTIL '{{expiration}}'; GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO \"{{name}}\";" \
default_ttl="1h" \
max_ttl="24h"
# Get dynamic credentials
vault read database/creds/app-role
# Output:
# Key Value
# lease_id database/creds/app-role/abc123
# lease_duration 1h
# password a9b8c7d6e5f4
# username v-token-app-role-x9y8z7
# Renew lease
vault lease renew database/creds/app-role/abc123
# Revoke lease
vault lease revoke database/creds/app-role/abc123
Step 4: Dynamic Database Secrets — AWS RDS
vault write database/config/mysql-prod \
plugin_name=mysql-database-plugin \
allowed_roles="app-mysql" \
connection_url="{{username}}:{{password}}@tcp(mysql.example.com:3306)/" \
username="vault_admin" \
password="vault_pass"
vault write database/roles/app-mysql \
db_name=m
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/secrets-engines.md
- references/vault-advanced.md
- references/vault-basics.md
- references/vault-clustering.md
- references/vault-fundamentals.md
- references/vault-integration.md
- references/vault-policies.md
FAQ
Что делает скилл vault?
Use when the user asks to store database credentials in HashiCorp Vault, dynamic secrets, KV v2, Transit encryption, the PKI engine, Vault policies, auth methods (Kubernetes, OIDC, AppRole), Vault Agent or the injector. Produces Vault configs and policies. Not for cloud secret stores or overall secrets strategy (use security-secrets-management).
Как установить скилл vault?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vault запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…