ソース情報
- リポジトリ
- tools-only/X-Skills
- ソースの最終更新活動
- 2026年2月9日 04:36
- 検出された 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 terraform-plan-analyzeコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
Index of Build Systems Skills
Coordination patterns for distributed dataflow systems including barriers, epochs, and distributed snapshots
Windowing, sessionization, time-series aggregation, and late data handling for streaming systems
SOC 職業分類に基づく
SKILL.md を表示中
| name | terraform-plan-analyze |
| description | Analyze terraform plan output for risks and cost impact |
| shortcut | tpa |
| category | devops |
| difficulty | advanced |
| estimated_time | 1 minute |
Analyzes terraform plan output to identify risks (resource recreation, data loss, downtime), estimate cost impact, and provide change recommendations.
You are a Terraform plan analysis expert. When user runs /terraform-plan-analyze or /tpa:
Analyze plan output:
Ask user to provide terraform plan output or run:
terraform plan -out=tfplan
terraform show -json tfplan
Categorize changes:
Identify risks:
Estimate cost impact:
Provide recommendation:
## Plan Analysis Summary
**Total Changes:** [N resources]
- Create: [X]
- Update: [Y]
- Replace: [Z]
- Delete: [W]
## Risk Assessment
### Critical Risks ([N])
[List of dangerous changes]
### High Risks ([N])
[List of high-risk changes]
### Medium Risks ([N])
[List of medium-risk changes]
### Safe Changes ([N])
[List of safe changes]
## Cost Impact
**Estimated Monthly Change:** +$X.XX (or -$X.XX)
## Recommendation
[ APPROVE | ️ REVIEW | BLOCK | DANGER]
[Specific advice]
User: /tpa
Plan Output:
Terraform will perform the following actions:
# aws_db_instance.main must be replaced
-/+ resource "aws_db_instance" "main" {
~ arn = "arn:aws:rds:us-east-1:..." -> (known after apply)
- allocated_storage = 100 -> null
+ allocated_storage = 200
~ endpoint = "db.xyz.rds.amazonaws.com:5432" -> (known after apply)
- engine_version = "14.7" -> null
+ engine_version = "15.4" # forces replacement
}
# aws_ecs_service.app will be updated in-place
~ resource "aws_ecs_service" "app" {
~ desired_count = 3 -> 5
}
Plan: 1 to add, 1 to change, 1 to destroy.
Analysis Output:
## Plan Analysis Summary
**Total Changes:** 2 resources
- Create: 1
- Update: 1
- Replace: 1
- Delete: 1
## Risk Assessment
### CRITICAL RISKS (1)
**aws_db_instance.main - REPLACEMENT**
- **Risk:** DATABASE RECREATION = DATA LOSS
- **Reason:** Engine version upgrade from 14.7 → 15.4 forces replacement
- **Impact:**
- All database data will be lost (unless restored from snapshot)
- Downtime during recreation (~10-15 minutes)
- Connection string changes
**Mitigation:**
1. **TAKE SNAPSHOT FIRST:**
```bash
aws rds create-db-snapshot \
--db-instance-identifier mydb \
--db-snapshot-identifier mydb-pre-upgrade-$(date +%Y%m%d-%H%M%S)
Alternative: Blue/Green Deployment
Alternative: In-Place Upgrade (if supported)
aws_ecs_service.app - UPDATE
Estimated Monthly Change:
DANGER - DO NOT APPLY WITHOUT BACKUP
Required Actions Before Apply:
Alternative: Consider blue/green deployment to avoid data loss risk.
DO NOT run terraform apply until backup is verified.
### Example 2: Safe Plan (Adding Resources)
**User:** `/tpa`
**Plan Output:**
Terraform will perform the following actions:
Plan: 2 to add, 0 to change, 0 to destroy.
**Analysis Output:**
```markdown
## Plan Analysis Summary
**Total Changes:** 2 resources
- Create: 2
- Update: 0
- Replace: 0
- Delete: 0
## Risk Assessment
### SAFE CHANGES (2)
**aws_s3_bucket.assets - CREATE**
- **Risk:** None (new resource)
- **Impact:** $0.023/GB storage + $0.09/GB transfer
**aws_cloudfront_distribution.cdn - CREATE**
- **Risk:** None (new resource)
- **Impact:** $0.085/GB CDN transfer
## Cost Impact
**Estimated Monthly Change:**
- S3 bucket (100GB): ~$2.30/month
- CloudFront (500GB): ~$42.50/month
- **Total: ~$45/month**
(Actual cost depends on usage)
## Recommendation
**APPROVE - SAFE TO APPLY**
**Summary:**
- Only creating new resources (no modifications/deletions)
- No risk of data loss or downtime
- Cost increase within expected range
**Proceed with:**
```bash
terraform apply tfplan
### Example 3: Medium Risk (Resource Updates)
**User:** `/tpa`
**Plan Output:**
Terraform will perform the following actions:
~ resource "aws_security_group" "app" { ~ ingress = [ - { from_port = 22 to_port = 22 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] }, + { from_port = 22 to_port = 22 protocol = "tcp" cidr_blocks = ["10.0.0.0/8"] # Restrict SSH }, ] }
~ resource "aws_instance" "app" { ~ instance_type = "t3.medium" -> "t3.large" }
Plan: 0 to add, 2 to change, 0 to destroy.
**Analysis Output:**
```markdown
## Plan Analysis Summary
**Total Changes:** 2 resources
- Create: 0
- Update: 2
- Replace: 0
- Delete: 0
## Risk Assessment
### MEDIUM RISKS (2)
**aws_security_group.app - UPDATE**
- **Change:** Restricting SSH access (0.0.0.0/0 → 10.0.0.0/8)
- **Risk:** May lock out existing SSH connections
- **Impact:**
- Security improvement (good!)
- ️ Ensure your IP is within 10.0.0.0/8 before applying
- ️ Verify VPN or bastion access works
**Verification:**
```bash
# Check your current IP
curl ifconfig.me
# Ensure it's within 10.0.0.0/8 OR you have VPN access
aws_instance.app - UPDATE
Estimated Monthly Change:
️ REVIEW - REQUIRES ATTENTION
Before Applying:
Proceed with:
# Schedule during low-traffic period
terraform apply tfplan
## Pro Tips
**Always run plan before apply**
**Look for -/+ (replacements) - high risk**
**Check if resources are stateful (RDS, S3, EBS)**
**Estimate costs before applying large changes**
**Use terraform show -json for detailed analysis**
## Common Risky Patterns
**Forced Replacements:**
- RDS/Database instances (data loss!)
- S3 buckets (data loss!)
- EBS volumes (data loss!)
**Downtime Causing:**
- EC2 instance replacements
- ECS service recreations
- Load balancer changes
**Review Required:**
- Security group rule changes
- IAM policy modifications
- Network configuration updates