用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aws-samples/sample-opencode-with-bedrock --skill deploy-preflight命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | deploy-preflight |
| description | Validate all prerequisites before deploying the OpenCode Stack |
You are validating that all prerequisites are met before deploying the OpenCode Stack. Run each check below and report a clear pass/fail summary at the end.
Run aws sts get-caller-identity to verify the AWS CLI is installed and credentials are valid. Report the account ID and region.
Verify Node.js 18+ is installed by checking node -v.
Check if docker or finch is available. Report which one is found, or warn if neither exists (image builds will be skipped).
Check if cdk.context.json exists in the project root. If it doesn't, tell the user to run ./scripts/setup.sh or copy from cdk.context.json.example.
Check if node_modules/ exists. If missing, suggest running npm install.
Run npx cdk synth --quiet to validate the CDK app builds without errors. If it fails, show the error output.
Check if auth SSM parameters exist under /opencode/<environment>/oidc/. This is informational — missing params are expected before first deploy.
Check if opencode/<environment>/oidc-alb-client-secret exists in Secrets Manager. This is informational — the secret is auto-created during deploy.sh auth for Cognito mode.
Check if the user intends to deploy the share feature by looking for enableShareFeature in cdk.context.json or recent CDK context flags. Also check if share SSM parameters already exist under /opencode/<environment>/share/. This is informational — the share feature is optional and has no impact on the core deployment.
After all checks, print a summary table:
Preflight Summary
─────────────────────────────────
✓ AWS credentials — account 123456789012 (us-east-1)
✓ Node.js — v22.x
✓ Container builder — docker
✓ cdk.context.json — found
✓ npm dependencies — installed
✓ CDK synth — passed
○ SSM parameters — not found (expected before first deploy)
○ Secrets Manager — not found (auto-created during auth deploy)
○ Share feature — not configured (optional, deploy with: ./scripts/deploy.sh share)
─────────────────────────────────
Result: READY TO DEPLOY
Use ✓ for pass, ✗ for fail, and ○ for informational items. If any required check fails, the result should be NOT READY — fix issues above.