GCP Auth
Apps & Automationgcp-authGCP Auth is an Agent Skill for apps & automation published in the minicoohei/ai-agent-camp repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Google Cloud Platform (GCP) の Application Default Credentials 認証を実行するスキル。 「GCP認証して」「Google Cloud認証」「gcloud login」等のリクエストで発動。 BigQuery や Cloud Storage 等の GCP サービス利用前の認証手順をガイド。
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/minicoohei/ai-agent-camp/blob/HEAD/.claude/skills/gcp-auth/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/gcp-auth, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
トリガーワード
「GCP認証」「Google Cloud認証」「gcloud login」「サービスアカウント」
GCP Authentication
Google Cloud の Application Default Credentials (ADC) 認証を実行するスキルです。
Workflow
- ユーザーが「GCP認証して」「BigQuery使いたい」等と言う
- 認証コマンドをターミナルで実行するよう案内
- ブラウザでGoogleアカウント認証
- 認証完了を確認
Usage
認証コマンド(ターミナルで直接実行)
gcloud auth application-default login
注意: このコマンドはブラウザでの認証が必要なため、ターミナルで直接実行してください。
認証フロー
- コマンド実行 → ブラウザが自動的に開く
- Googleアカウント選択 → 使用するアカウントを選択
- 権限許可 → 「Google Auth Library にアクセスを許可」で「許可」をクリック
- 完了確認 → ターミナルに「Credentials saved to file」と表示
トラブルシューティング
| エラー | 対処法 |
|---|---|
| Reauthentication is needed | 認証期限切れ。再度 gcloud auth application-default login を実行 |
| GOOGLE_APPLICATION_CREDENTIALS 警告 | .env から該当行を削除するか、ADC を使用 |
| Project not set | gcloud config set project PROJECT_ID でプロジェクト設定 |
認証状態の確認
# トークンが表示されれば認証済み
gcloud auth application-default print-access-token
# 現在のプロジェクト確認
gcloud config get-value project
Requirements
- Google Cloud SDK (
gcloud) がインストール済み - ブラウザでGoogleアカウントにログイン可能