用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/wojons/skills --skill testing-chaos命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | testing-chaos |
| description | Run chaos engineering tests to build resilient systems |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"developers","category":"testing"} |
Run chaos engineering experiments to build resilient systems by intentionally injecting failures and observing system behavior.
Use this skill when:
Failure injection experiments:
Resilience validation:
Coordination with other testing:
Experiment design:
# Chaos engineering tools
npm run test:chaos:start # Start chaos experiments
npm run test:chaos:stop # Stop all chaos experiments
npm run test:chaos:status # Check experiment status
# Specific failure injections
npm run test:chaos:network # Network failure injection
npm run test:chaos:service # Service dependency failures
npm run test:chaos:resource # Resource exhaustion
npm run test:chaos:database # Database failures
# Integration with other tests
npm run test:performance -- --chaos # Performance under failure
npm run test:reliability -- --chaos # Reliability with faults
# Experiment scenarios
npm run test:chaos:scenario:api-outage # API dependency outage
npm run test:chaos:scenario:db-failover # Database failover
npm run test:chaos:scenario:latency-spike # Network latency spike
npm run test:chaos:scenario:memory-leak # Memory pressure
# Safety controls
npm run test:chaos:safety-check # Pre-experiment safety check
npm run test:chaos:rollback # Emergency rollback
Chaos Test Results:
──────────────────────────────
Experiment: Database Primary Node Failure
Hypothesis: System will failover to replica within 30 seconds
Blast Radius: Staging environment, canary deployment
Duration: 15 minutes
Experiment Execution:
1. Baseline metrics collected
2. Database primary node terminated (simulated)
3. System behavior observed for 10 minutes
4. Metrics compared to baseline
Results:
✅ Failover Time: 22 seconds (within 30s target)
✅ Data Consistency: No data loss detected
✅ User Impact: 15% error rate during failover (acceptable)
✅ Recovery: Automatic, no manual intervention required
✅ Monitoring: Alerts triggered within 45 seconds
System Behavior Under Failure:
- API response time increased from 150ms to 850ms during failover
- Error rate spiked to 15% for 45 seconds
- Read-only operations continued uninterrupted
- Write operations queued and retried successfully
Integration with Other Testing:
- Performance testing: Established baseline for comparison
- Reliability testing: Validated MTTR (Mean Time To Recovery)
- Monitoring testing: Alert effectiveness verified
- Disaster recovery: Automated failover confirmed
Safety Controls:
- Automatic rollback on critical failure thresholds
- Manual abort available throughout
- Canary deployment limited impact
- Post-experiment verification passed
Lessons Learned:
1. Need to improve connection pooling during failover
2. Alert thresholds should be adjusted for transient failures
3. User-facing error messages during failover need improvement
4. Database health checks could be more frequent
Recommendation:
- System demonstrates good resilience to database failures
- Implement suggested improvements from lessons learned
- Schedule regular chaos experiments (monthly)
- Expand blast radius gradually as confidence increases