agentleFS
nobufumi-tegonobufumi-tego/gcp-agile-template/.claude/skills/deploy-gcp/SKILL.md

deploy-gcp

Skill0 starsChanged 7 months agoMITView on GitHub

GCPへのデプロイを安全に実行する。コスト確認・テスト通過・レビュー承認を確認してからデプロイする。

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. bkraad47/ramen★ 4same name
    2. impeto-ai/claude-skills-impeto★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository8 other files it gives its agents.

The file

Files
SKILL.md

GCPデプロイスキル

実行前チェック(すべて必須)

1. テスト確認

cd backend && uv run pytest --tb=short
# → 全件グリーンでなければ中止

2. コスト見積もり表示

# 現在の使用量確認
gcloud billing budgets list
gcloud run services describe $SERVICE_NAME \
  --region=asia-northeast1 \
  --format="value(status.observedGeneration)"
echo "---"
echo "デプロイ前にコスト影響を確認してください"
echo "Cloud Run 無料枠: 200万req/月・360,000vCPU秒/月"

3. レビュー確認

  • review-agent の承認コメントが docs/sprints/sprint-N/ にあること

バックエンドデプロイ(Cloud Run)

# イメージビルド
gcloud builds submit backend/ \
  --tag asia-northeast1-docker.pkg.dev/$PROJECT_ID/$APP_NAME/api:$(git rev-parse --short HEAD)

# Cloud Run デプロイ
gcloud run deploy $APP_NAME-api \
  --image asia-northeast1-docker.pkg.dev/$PROJECT_ID/$APP_NAME/api:$(git rev-parse --short HEAD) \
  --region asia-northeast1 \
  --min-instances 0 \
  --max-instances 10 \
  --memory 512Mi \
  --timeout 60

# デプロイ確認
gcloud run services describe $APP_NAME-api \
  --region asia-northeast1 \
  --format="value(status.url)"

フロントエンドデプロイ(Firebase Hosting)

cd frontend
npm run build
firebase deploy --only hosting
echo "デプロイ完了: https://$PROJECT_ID.web.app"

ロールバック手順

# 直前のリビジョンに戻す
gcloud run services update-traffic $APP_NAME-api \
  --to-revisions=PREV=100 \
  --region asia-northeast1

デプロイ後確認

# ヘルスチェック
curl https://$(gcloud run services describe $APP_NAME-api \
  --region asia-northeast1 \
  --format="value(status.url)")/health

# Cloud Logging でエラー確認(直近5分)
gcloud logging read \
  "resource.type=cloud_run_revision AND severity>=ERROR" \
  --limit=20 \
  --freshness=5m

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.