gcp-secret-manager
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "gcp-secret-manager" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-7be16ec6d04cf91e93d62a910e11880e6073c5c2f7bec236b1f26ae8e9d4b854. Verify the upstream source and version against https://github.com/Kilo-Org/kilo-marketplace before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Secure storage of secrets in Google Cloud Secret Manager: for configuring IAM policies, integrating with GKE, and managing secret versions. Suitable for scenarios managing secrets in GCP environments.
Introduction source: third_party · Kilo-Org · 1.0 Reference
SkillPi interpretation
- Tasks
- Secure secrets in Google Cloud Secret Manager. Configure IAM policies, integrate with GKE, and manage secret versions. Use when managing secrets in GCP environments.
- Software, accounts and paid services
- GCP project with billing enabled `gcloud` CLI installed and authenticated Secret Manager API enabled (`secretmanager.googleapis.com`) IAM permissions: `roles/secretmanager.admin` for management, `roles/secretmanager.secretAccessor` for reading For GKE: Workload Identity configured on the cluster
- Testing
- Not tested
Browse files
Frontmatter
name: gcp-secret-manager
description: Secure secrets in Google Cloud Secret Manager. Configure IAM policies, integrate with GKE, and manage secret versions. Use when managing secrets in GCP environments.
category: AI & Agents
source: antigravity
tags: [python, javascript, node, api, ai, agent, template, image, security, kubernetes]
url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/gcp-secret-managerGCP Secret Manager
Store and manage secrets securely in Google Cloud Platform.
Prerequisites
- GCP project with billing enabled
gcloudCLI installed and authenticated- Secret Manager API enabled (
secretmanager.googleapis.com) - IAM permissions:
roles/secretmanager.adminfor management,roles/secretmanager.secretAccessorfor reading - For GKE: Workload Identity configured on the cluster
Enable the API
# Enable Secret Manager API
gcloud services enable secretmanager.googleapis.com
# Verify it's enabled
gcloud services list --enabled --filter="name:secretmanager"
Secret Creation and Management
# Create a secret (creates the secret resource, not the value)
gcloud secrets create db-password \
--replication-policy="automatic" \
--labels="env=production,team=platform"
# Add the secret value (first version)
echo -n "S3cur3P@ssw0rd!" | gcloud secrets versions add db-password --data-file=-
# Create secret with value in one command
echo -n '{"username":"dbadmin","password":"S3cur3P@ss!","host":"10.0.1.5","port":5432}' | \
gcloud secrets create db-credentials --data-file=- \
--replication-policy="automatic" \
--labels="env=production,team=platform"
# Create with specific region replication
gcloud secrets create regional-secret \
--replication-policy="user-managed" \
--locations="us-central1,us-east1"
# Create with customer-managed encryption key (CMEK)
gcloud secrets create sensitive-secret \
--replication-policy="user-managed" \
--locations="us-central1" \
--kms-key-name="projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"
# Access the latest version
gcloud secrets versions access latest --secret=db-password
# Access a specific version
gcloud secrets versions access 3 --secret=db-password
# Add a new version (rotation)
echo -n "N3wS3cur3P@ss!" | gcloud secrets versions add db-password --data-file=-
# List all secrets
gcloud secrets list --format="table(name, createTime, labels)"
# List versions of a secret
gcloud secrets versions list db-password --format="table(name, state, createTime)"
# Disable a version (makes it inaccessible but recoverable)
gcloud secrets versions disable 1 --secret=db-password
# Enable a disabled version
gcloud secrets versions enable 1 --secret=db-password
# Destroy a version (permanent)
gcloud secrets versions destroy 1 --secret=db-password
# Delete the entire secret
gcloud secrets delete db-password
# Set expiration on a secret
gcloud secrets update db-password \
--expire-time="2026-06-01T00:00:00Z"
# Set TTL-based expiration
gcloud secrets update temp-token \
--ttl="2592000s" # 30 days
# Update labels
gcloud secrets update db-password \
--update-labels="rotation=enabled,last-rotated=2025-01-15"
# Add version aliases
gcloud secrets versions update 5 --secret=db-password --set-aliases="production"
IAM Bindings
# Grant secret accessor role to a service account
gcloud secrets add-iam-policy-binding db-password \
--member="serviceAccount:myapp-sa@my-project.iam.gserviceaccount.com" \
--role="roles/secretmanager.secretAccessor"
# Grant access to a specific secret version
gcloud secrets add-iam-policy-binding db-password \
--member="serviceAccount:myapp-sa@my-project.iam.gserviceaccount.com" \
--role="roles/secretmanager.secretVersionAccessor" \
--condition='expression=resource.name.endsWith("versions/latest"),title=latest-only'
# Grant admin to security team
gcloud secrets add-iam-policy-binding db-password \
--member="group:security-team@example.com" \
--role="roles/secretmanager.admin"
# View IAM policy for a secret
gcloud secrets get-iam-policy db-password
# Remove access
gcloud secrets remove-iam-policy-binding db-password \
--member="serviceAccount:old-sa@my-project.iam.gserviceaccount.com" \
--role="roles/secretmanager.secretAccessor"
# Project-level IAM for all secrets
gcloud projects add-iam-policy-binding my-project \
--member="serviceAccount:myapp-sa@my-project.iam.gserviceaccount.com" \
--role="roles/secretmanager.secretAccessor" \
--condition='expression=resource.name.startsWith("projects/my-project/secrets/myapp-"),title=myapp-secrets-only'
Workload Identity for GKE
# Enable Workload Identity on cluster (if not already)
gcloud container clusters update my-cluster \
--zone us-central1-a \
--workload-pool=my-project.svc.id.goog
# Create GCP service account for the workload
gcloud iam service-accounts create myapp-gke-sa \
--display-name="MyApp GKE Service Account"
# Grant secret accessor role
gcloud secrets add-iam-policy-binding db-password \
--member="serviceAccount:myapp-gke-sa@my-project.iam.gserviceaccount.com" \
--role="roles/secretmanager.secretAccessor"
# Bind Kubernetes SA to GCP SA
gcloud iam service-accounts add-iam-policy-binding \
myapp-gke-sa@my-project.iam.gserviceaccount.com \
--role="roles/iam.workloadIdentityUser" \
--member="serviceAccount:my-project.svc.id.goog[produVersion history
-
skills-20261103210927-6c1b454
GitHub ↗
Original release notes
Automated skills release from commit 6c1b4543cac1d45a80bf5904e4b69ac315117323
-
skills-20260928190452-ff51758
GitHub ↗
Original release notes
Automated skills release from commit ff51758b06b8249007116184096765d47bdb7505
-
skills-20260924105536-d31110d
GitHub ↗
Original release notes
Automated skills release from commit d31110d62dc0bd00c22f1d6f6a630d1e702a0049
-
skills-20260923085113-cea285e
GitHub ↗
Original release notes
Automated skills release from commit cea285ef0e4d6ec47cd2fd9fdbca03813a3363c7
-
skills-20260922193956-97d7333
GitHub ↗
Original release notes
Automated skills release from commit 97d7333d8200e5ac556c659c8669f3a83ba10866
Only the five most recent versions are shown. View full version history at the source ↗
Current listing version
1.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 GCP Secret Manager 的完整操作指南,涵盖创建、版本管理、IAM 策略配置、GKE 集成等高频刚需场景
- 直接解决云环境中机密管理的核心痛点,具备高实用价值
Highlights
- description 明确指出适用场景为'在 GCP 环境中管理机密信息',触发词精准覆盖目标用户群体
- frontmatter 中 description 完整且位置正确
Areas to improve
-
文档内容截断 Reported severity: Minor
IAM Bindings 部分末尾存在截断('produ' 不完整),影响文档完整性
Recommendation: 请补全文档末尾被截断的内容,确保所有命令和说明完整
Highlights
- 文档结构清晰,分 Prerequisites、Enable the API、Secret Creation and Management、IAM Bindings、Workload Identity for GKE 等 Phase
- 每个部分有具体命令示例,frontmatter 完整
Areas to improve
-
文档截断影响执行 Reported severity: Minor
文档末尾截断可能导致用户执行不完整命令
Recommendation: 请补全文档末尾被截断的内容,确保所有命令完整可执行
Highlights
- 所有命令均为标准 gcloud CLI 语法,参数正确
- 覆盖了主要操作场景,包括创建、版本管理、IAM 配置、GKE 集成等
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 46 -
Cloud changes and possible charges
Preview changes and verify account, region, permissions and costs. Confirm creation, deployment or deletion separately.
Mentioned in main document · lines 37, 46, 51, 56, 86
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
GCP project with billing enabled `gcloud` CLI installed and authenticated Secret Manager API enabled (`secretmanager.googleapis.com`) IAM permissions: `roles/secretmanager.admin` for management, `roles/secretmanager.secretAccessor` for reading For GKE: Workload Identity configured on the cluster
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.