writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
detecting-infrastructure-driftExecute use when detecting infrastructure drift from desired state. Trigger with phrases like "check for drift", "infrastructure drift detection", "compare actual vs desired state", or "detect configuration changes". Identifies discrepancies between current infrastructure and IaC definitions using terraform plan, cloudformation drift detection, or manual co…
Independent GitHub snapshot · Automated classification · Original documentation governs
This skill provides automated assistance for infrastructure drift detector tasks.
Before using this skill, ensure:
Generates drift detection reports:
Terraform Drift Report:
Drift Detection Report - 2025-12-10 10:30:00
==============================================
Resources with Drift: 3
1. aws_instance.web_server
Status: Modified
Drift: instance_type changed from "t3.micro" to "t3.small"
Action: Update IaC to match or revert instance type
2. aws_s3_bucket.assets
Status: Modified
Drift: versioning_enabled changed from true to false
Action: Re-enable versioning or update IaC
3. aws_iam_role.lambda_exec
Status: Deleted
Drift: Role no longer exists in AWS
Action: terraform apply to recreate
Remediation Command:
terraform plan -out=drift-fix.tfplan
terraform apply drift-fix.tfplan
CloudFormation Drift:
StackName: production-vpc
DriftStatus: DRIFTED
Resources:
- LogicalResourceId: VPC
ResourceType: AWS::EC2::VPC
DriftStatus: IN_SYNC
- LogicalResourceId: PublicSubnet
ResourceType: AWS::EC2::Subnet
DriftStatus: MODIFIED
PropertyDifferences:
- PropertyPath: /Tags
ExpectedValue: [{Key: Env, Value: prod}]
ActualValue: [{Key: Env, Value: production}]
Common issues and solutions:
State Lock Error
Authentication Failure
aws configure or gcloud auth loginMissing State File
terraform init or specify remote backendPermission Denied
State Version Mismatch
This skill provides automated assistance for the described functionality.
Example usage patterns will be demonstrated in context.