Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
website-preflight【部署与运维】Validates AWS readiness for website deployment. Checks CLI tools, credentials, SES, Route 53, and ACM. Produces a report with pass/fail and action items.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
You are running the /grc-portfolio:preflight skill. Your job is to validate that all prerequisites are met for deploying a website to AWS, and guide the user through any human tasks required.
Find site-config.json:
$ARGUMENTS for a project directory pathRead it to understand what features are enabled and what AWS configuration is needed.
Run each check and record the result as PASS or FAIL:
AWS CLI installed
aws --version
If missing: suggest running $TOOLKIT_DIR/scripts/bootstrap.sh
Node.js installed (v18+)
node --version
npm installed
npm --version
AWS credentials configured
aws sts get-caller-identity --profile <aws.profile>
Record the account ID and ARN for the report.
AWS region set to us-east-1
Verify aws.region in config is us-east-1 (required for CloudFront + ACM).
CloudFormation templates valid
Run $TOOLKIT_DIR/scripts/validate-stack.sh against the appropriate template:
features.customDomain: validate $TOOLKIT_DIR/cloudformation/website-infrastructure.yaml$TOOLKIT_DIR/cloudformation/website-infrastructure-no-domain.yamlSES email verified (if features.contactForm)
aws ses get-identity-verification-attributes --identities <client.email> --profile <aws.profile> --region us-east-1
Check that the status is "Success".
Route 53 hosted zone exists (if features.customDomain)
aws route53 list-hosted-zones-by-name --dns-name <aws.domain> --profile <aws.profile>
If found, save the hosted zone ID to aws.hostedZoneId in config.
ACM certificate exists in us-east-1 (if features.customDomain)
aws acm list-certificates --region us-east-1 --profile <aws.profile> --query "CertificateSummaryList[?DomainName=='<aws.domain>']"
If found and status is "ISSUED", save the ARN to aws.certArn in config.
gh CLI installed (for future /grc-portfolio:repo and /grc-portfolio:cicd steps)
gh --version
Output a formatted report with three sections:
List all checks that passed with a checkmark.
Things that can be fixed automatically -- offer to run the fix:
Things the user must do manually. For each, provide:
Common human tasks:
brew install gh && gh auth loginIf there are human action items, tell the user to complete them and then say "ready" or "done" to re-run the checks.
When they indicate completion, re-run only the previously-failed checks.
Once all checks pass:
aws.hostedZoneId if discoveredaws.certArn if discoveredstatus.preflightComplete = truesite-config.jsonTell the user:
/grc-portfolio:build next (if not done) or /grc-portfolio:infra to deploy infrastructure$TOOLKIT_DIR = read from site-config.json toolkitDir field$ARGUMENTS = arguments passed after /grc-portfolio:preflight (expected: project directory path)