← スキル一覧に戻る

deploy-guardrail
by AMASPC-Org
⭐ 0🍴 0📅 2026年1月25日
SKILL.md
name: deploy-guardrail description: Enforces a pre-flight check to prevent configuration drift between local defaults and Cloud Run environments.
Deploy Guardrail Skill
Use this skill BEFORE any deployment to a Cloud Run environment (Dev or Prod). It ensures that all secrets required by the codebase are actually present in the target environment's configuration.
Workflow
1. Identify Required Secrets
Scan the codebase for ConfigSchema, process.env, or firebase functions definitions to list required environment variables.
- Source Truths:
server/src/appConfig/schema.ts(Zod schema)functions/src/config/schema.tsfirebase.json(secret versions)
2. Fetch Live Configuration
Execute the following command to get the current environment variables from Cloud Run:
gcloud run services describe [SERVICE_NAME] --region us-west1 --format="json(spec.template.spec.containers[0].env)"
3. Compare & Assert
- Compare: potential
process.envusages vs. the JSON output fromgcloud. - Critical Assertion: If a variable is marked as 'Required' in schema but missing in Cloud Run, STOP THE DEPLOYMENT.
4. Remediation (If Failed)
If drift is detected:
- Do NOT assume a default value.
- Check Secret Manager for the missing key.
- If Missing: Ask the user to generate/provide a secure value (do not generate one silently).
- Update: Use
gcloud run services updateto inject the missing variable.
Example Command Chain
# 1. Get Config
gcloud run services describe olybars-backend --region us-west1 --format="json" > current_config.json
# 2. Analyze (Manual or via grep)
Get-Content current_config.json | Select-String "INTERNAL_HEALTH_TOKEN"
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です