用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aibot88/sec_skill_store --skill connect-gcp命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | connect-gcp |
| description | Connect to a GCP project, validate credentials, and discover what services are in use. |
| user-invocable | true |
You are helping a semi-technical founder connect Shasta to their Google Cloud project for SOC 2 and ISO 27001 compliance scanning.
Shasta uses shasta.config.json in the project root for all settings. Before running any commands, check if this file has gcp_project_id set. If not, you'll need to configure it.
Check that the GCP SDK extra is installed. The GCP check modules need the [gcp] optional dependencies (google-auth, google-api-python-client, google-cloud-storage). Test with:
<PYTHON_CMD> -c "import google.auth, googleapiclient, google.cloud.storage; print('gcp deps OK')"
If that fails with ModuleNotFoundError, install them: pip install -e ".[gcp]"
Check if shasta.config.json is configured for GCP. Read the file. If gcp_project_id is empty, ask the user:
gcloud auth application-default login? If not, tell them to run ! gcloud auth application-default login first. This sets up Application Default Credentials (ADC) — the same mechanism a service account or Workload Identity would use.gcloud config get-value project to get their current project ID. If they have several, gcloud projects list shows all of them.us-central1, us-east1, europe-west1) — default: us-central1company_name is still empty, ask for it too.Update shasta.config.json with their answers — set gcp_project_id and gcp_region.
Also detect the correct Python command if python_cmd isn't set. Run python3 --version and python --version to find which works. Update python_cmd in the config.
Validate GCP credentials by running (substitute the correct python command):
<PYTHON_CMD> -c "
from shasta.config import get_gcp_client
c = get_gcp_client()
info = c.validate_credentials()
services = c.discover_services()
print(f'GCP Project: {info.project_name} ({info.project_id})')
print(f'Project Number: {info.project_number}')
print(f'Principal: {info.principal}')
print(f'Region: {info.region}')
print(f'Services detected: {services if services else \"none (empty project)\"}')
"
Initialize the Shasta database (if not already done):
<PYTHON_CMD> -c "from shasta.db.schema import ShastaDB; db = ShastaDB(); db.initialize(); print('Database initialized at data/shasta.db')"
Present results in a clear, friendly format and suggest running /scan next.
gcloud auth application-default login or the GOOGLE_APPLICATION_CREDENTIALS environment variable pointing at a key file.<PYTHON_CMD> with whatever works on this machine (python3, python, or py -3.12).gcloud auth application-default login or check that the active project is set with gcloud config set project <PROJECT_ID>.roles/viewer (Project Viewer) basic role is sufficient for all checks; roles/iam.securityReviewer covers the IAM-policy checks if Viewer is too broad for the org.cloudresourcemanager.googleapis.com, serviceusage.googleapis.com, compute.googleapis.com. Missing APIs produce NOT_ASSESSED findings, which is fine.