用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aws-samples/sample-opencode-with-bedrock --skill verify-deployment命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | verify-deployment |
| description | Post-deployment health checks and endpoint validation for the OpenCode Stack |
You are performing post-deployment health checks on the OpenCode Stack. Run each check and report the results.
Read the environment name from cdk.context.json (default: dev). Use this for SSM parameter paths and stack names.
Fetch the API and web domain names:
aws ssm get-parameter --name "/opencode/<env>/api/dns-name" --query 'Parameter.Value' --output text
aws ssm get-parameter --name "/opencode/<env>/web/dns-name" --query 'Parameter.Value' --output text
Hit the API health endpoints and report status:
curl -sf https://<api-domain>/health
curl -sf https://<api-domain>/ready
Check the ECS service desired vs running task count:
aws ecs describe-services \
--cluster <cluster-name> \
--services <service-name> \
--query 'services[0].{desired:desiredCount,running:runningCount,pending:pendingCount}'
Get cluster and service names from SSM:
/opencode/<env>/ecs/cluster-name/opencode/<env>/ecs/router-service-nameCheck that ALB targets are healthy:
aws elbv2 describe-target-health --target-group-arn <tg-arn>
Get the target group ARN from the API stack CloudFormation outputs or SSM parameters.
Verify the web/distribution endpoint responds:
curl -sf -o /dev/null -w '%{http_code}' https://<web-domain>/
Confirm OIDC SSM parameters are populated:
/opencode/<env>/oidc/issuer/opencode/<env>/oidc/jwks-url/opencode/<env>/oidc/alb-client-id/opencode/<env>/oidc/cli-client-idVerify the JWKS endpoint is reachable:
curl -sf <jwks-url> | head -c 100
Only run these checks if the share feature is deployed. Detect by checking if the SSM parameter /opencode/<env>/share/websocket-url exists.
Check ShareStack status:
aws cloudformation describe-stacks --stack-name OpenCodeShare-<env> --query 'Stacks[0].StackStatus'
Verify share SSM parameters exist:
aws ssm get-parameters-by-path --path "/opencode/<env>/share/" --query 'Parameters[].Name'
Expected parameters:
/opencode/<env>/share/websocket-url/opencode/<env>/share/bucket-name/opencode/<env>/share/connections-table-nameTest WebSocket endpoint:
WS_URL=$(aws ssm get-parameter --name "/opencode/<env>/share/websocket-url" --query 'Parameter.Value' --output text)
# Verify the URL is well-formed (wss:// prefix)
Verify share ALB rules exist on the API ALB (priorities 7-8):
LISTENER_ARN=$(aws ssm get-parameter --name "/opencode/<env>/alb/jwt/listener-arn" --query 'Parameter.Value' --output text)
aws elbv2 describe-rules --listener-arn "$LISTENER_ARN" --query 'Rules[?Priority==`7` || Priority==`8`].[Priority,Actions[0].Type]' --output table
Print a summary:
Deployment Health Check
─────────────────────────────────
✓ API endpoint — https://oc.example.com (200 OK)
✓ Health check — healthy
✓ ECS service — 2/2 tasks running
✓ ALB targets — 2 healthy
✓ Distribution — https://downloads.oc.example.com (200 OK)
✓ OIDC config — all SSM params present, JWKS reachable
✓ Share feature — WebSocket wss://xxx.execute-api.us-east-1.amazonaws.com/prod, 3 SSM params, ALB rules present
─────────────────────────────────
Status: ALL HEALTHY
Use ✓ for healthy, ✗ for unhealthy, and ○ for unable to check. If the share feature is not deployed, show it as ○ Share feature — not deployed (optional). If anything is unhealthy, suggest running /troubleshoot for diagnosis.