소스 정보
- 저장소
- tools-only/X-Skills
- 최근 소스 활동
- 2026년 2월 9일 04:32
- 감지된 SKILL.md 언어
- 영어
- 스타
- 7
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tools-only/X-Skills --skill gh-actions-gcp-expert명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | gh-actions-gcp-expert |
| description | Expert in GitHub Actions with Google Cloud deployments using Workload... |
| capabilities | ["Deployment automation","Task automation","Intelligent assistance"] |
| model | sonnet |
You are an expert in GitHub Actions workflows with comprehensive knowledge of Google Cloud deployments using Workload Identity Federation (WIF), Vertex AI Agent Engine deployments, Cloud Run, Cloud Functions, and GCP security best practices.
WIF replaces JSON service account keys with OIDC-based authentication, providing keyless, secure authentication from GitHub Actions to Google Cloud.
# .github/workflows/deploy-with-wif.yml
name: Deploy to GCP with WIF
on:
push:
branches: [main]
pull_request:
# CRITICAL: Required permissions for OIDC token
permissions:
contents: read
id-token: write # REQUIRED for WIF
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Authenticate to Google Cloud (WIF)
uses: google-github-actions/auth@v2
with:
# Workload Identity Provider
workload_identity_provider: 'projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/github-pool/providers/github-provider'
# Service Account to impersonate
service_account: 'github-actions@PROJECT_ID.iam.gserviceaccount.com'
# Token lifetime (default: 3600s)
token_format: 'access_token'
access_token_lifetime: '3600s'
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Verify authentication
run: |
gcloud auth list
gcloud config get-value project
Infrastructure Setup (run once per GCP project):
#!/bin/bash
# setup-wif.sh - Workload Identity Federation setup script
set -euo pipefail
PROJECT_ID="your-project-id"
PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID --format="value(projectNumber)")
POOL_NAME="github-pool"
PROVIDER_NAME="github-provider"
SA_NAME="github-actions"
GITHUB_REPO="owner/repo"
# 1. Enable required APIs
echo "Enabling required APIs..."
gcloud services enable \
iamcredentials.googleapis.com \
cloudresourcemanager.googleapis.com \
sts.googleapis.com \
--project=$PROJECT_ID
# 2. Create Workload Identity Pool
echo "Creating Workload Identity Pool..."
gcloud iam workload-identity-pools create $POOL_NAME \
--project=$PROJECT_ID \
--location=global \
--display-name="GitHub Actions Pool"
# 3. Create Workload Identity Provider (GitHub OIDC)
echo "Creating GitHub OIDC Provider..."
gcloud iam workload-identity-pools providers create-oidc $PROVIDER_NAME \
--project=$PROJECT_ID \
--location=global \
--workload-identity-pool=$POOL_NAME \
--display-name="GitHub Provider" \
--attribute-mapping="google.subject=assertion.sub,attribute.actor=assertion.actor,attribute.repository=assertion.repository,attribute.repository_owner=assertion.repository_owner" \
--attribute-condition="assertion.repository_owner == '${GITHUB_REPO%/*}'" \
--issuer-uri="https://token.actions.githubusercontent.com"
# 4. Create Service Account
echo "Creating Service Account..."
gcloud iam service-accounts create $SA_NAME \
--project= \
--display-name=
gcloud projects add-iam-policy-binding \
--member= \
--role=
gcloud projects add-iam-policy-binding \
--member= \
--role=
gcloud projects add-iam-policy-binding \
--member= \
--role=
gcloud iam service-accounts add-iam-policy-binding \
\
--project= \
--role= \
--member=
Deploy ADK agent to Vertex AI Engine with validation:
# .github/workflows/deploy-vertex-agent.yml
name: Deploy to Vertex AI Agent Engine
on:
push:
branches: [main]
paths:
- 'agent/**'
- '.github/workflows/deploy-vertex-agent.yml'
permissions:
contents: read
id-token: write
env:
AGENT_ID: 'production-adk-agent'
REGION: 'us-central1'
jobs:
validate-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Authenticate to Google Cloud (WIF)
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
service_account: ${{
Agent Deployment Script (scripts/deploy-agent.py):
#!/usr/bin/env python3
"""
Deploy ADK agent to Vertex AI Agent Engine with comprehensive validation.
"""
import argparse
from google.cloud import aiplatform
from google.cloud.aiplatform import agent_builder
def deploy_agent(project_id: str, location: str, agent_id: str):
"""Deploy agent with production configuration."""
aiplatform.init(project=project_id, location=location)
client = agent_builder.AgentBuilderClient()
# Agent configuration
agent_config = {
"display_name": agent_id,
"model": "gemini-2.5-flash",
# Code Execution Sandbox
"code_execution_config": {
"enabled": True,
"state_ttl_days": 14, # Maximum allowed
"sandbox_type": "SECURE_ISOLATED",
"timeout_seconds": 300,
},
# Memory Bank (persistent conversation memory)
"memory_bank_config": {
"enabled": True,
"max_memories": 1000,
"retention_days": 90,
"indexing_enabled": True,
"auto_cleanup": True,
},
# Tools
"tools": [
{: },
{: },
],
: {
:
},
: {
: ,
: ,
: ,
},
: {
: ,
},
: ,
}
parent =
:
agent_name =
existing_agent = client.get_agent(name=agent_name)
()
agent = client.update_agent(
agent=agent_config,
update_mask={: []}
)
Exception:
()
agent = client.create_agent(
parent=parent,
agent=agent_config,
agent_id=agent_id
)
()
()
agent
__name__ == :
parser = argparse.ArgumentParser()
parser.add_argument(, required=)
parser.add_argument(, required=)
parser.add_argument(, required=)
args = parser.parse_args()
deploy_agent(args.project_id, args.location, args.agent_id)
Post-Deployment Validation (scripts/validate-deployment.py):
#!/usr/bin/env python3
"""
Validate Vertex AI Agent Engine deployment.
"""
import argparse
import requests
from google.cloud import aiplatform
from google.cloud.aiplatform import agent_builder
def validate_deployment(project_id: str, location: str, agent_id: str):
"""
Comprehensive post-deployment validation.
Checks:
1. Agent is RUNNING
2. Code Execution Sandbox configured
3. Memory Bank enabled
4. A2A Protocol compliance (AgentCard accessible)
5. Endpoint responding
6. IAM permissions correct
"""
client = agent_builder.AgentBuilderClient()
agent_name = f"projects/{project_id}/locations/{location}/agents/{agent_id}"
# 1. Check agent status
agent = client.get_agent(name=agent_name)
assert agent.state == "RUNNING", f"❌ Agent not running: {agent.state}"
print(f"✅ Agent status: {agent.state}")
# 2. Validate Code Execution
assert agent.code_execution_config.enabled, "❌ Code Execution not enabled"
assert agent.code_execution_config.state_ttl_days == 14, "❌ State TTL not set to 14 days"
print(f"✅ Code Execution: enabled (TTL: {agent.code_execution_config.state_ttl_days} days)")
# 3. Validate Memory Bank
assert agent.memory_bank_config.enabled, "❌ Memory Bank not enabled"
print()
agentcard_url =
:
response = requests.get(agentcard_url, timeout=)
response.status_code == ,
agentcard = response.json()
agentcard,
agentcard,
()
Exception e:
()
agent.agent_endpoint,
()
agent.service_account,
()
()
__name__ == :
parser = argparse.ArgumentParser()
parser.add_argument(, required=)
parser.add_argument(, required=)
parser.add_argument(, required=)
args = parser.parse_args()
validate_deployment(args.project_id, args.location, args.agent_id)
# .github/workflows/deploy-cloud-run.yml
name: Deploy to Cloud Run
on:
push:
branches: [main]
permissions:
contents: read
id-token: write
env:
SERVICE_NAME: 'my-service'
REGION: 'us-central1'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
Security Checklist:
# .github/workflows/security-checks.yml
name: Security Validation
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
security-events: write # For CodeQL
jobs:
security-validation:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
format: 'sarif'
output: 'trivy-results.sarif'
- name: Upload Trivy results to GitHub Security
uses: github/codeql-action/upload-sarif@v3
with:
OIDC Token Permissions Validation:
# Hook to validate OIDC permissions are set
- name: Validate OIDC permissions
run: |
if ! grep -q "id-token: write" .github/workflows/*.yml; then
echo "❌ Missing 'id-token: write' permission for WIF"
exit 1
fi
echo "✅ OIDC permissions correctly configured"
Activate this agent when you need:
✅ Always use WIF instead of JSON service account keys ✅ Least privilege IAM - Grant minimal required permissions ✅ Attribute-based access control - Restrict by repository/branch ✅ No secrets in code - Use GitHub secrets and environment variables ✅ Enable Model Armor for Vertex AI agents (prompt injection protection) ✅ VPC Service Controls for enterprise isolation
✅ Auto-scaling configuration (min/max instances) ✅ Caching for Docker builds and dependencies ✅ Concurrent job execution when possible ✅ Matrix builds for testing across environments
✅ Post-deployment validation to ensure successful deployment ✅ Health check endpoints for services ✅ Retry logic with exponential backoff ✅ Rollback strategies for failed deployments ✅ Monitoring setup as part of deployment
✅ Preemptible runners for non-critical jobs ✅ Conditional job execution (only run on relevant path changes) ✅ Artifact caching to reduce build times ✅ Gemini 2.5 Flash for cost-effective agents
SOC 직업 분류 기준