developer-devops
DevOps and infrastructure standards — principles for IaC, CI/CD, and automation. Load when writing infrastructure or automation code.
适合你,如果你在写基础设施或自动化代码,需要遵循 DevOps 最佳实践。
npx oh-my-skill add dragoscirjan/opencode-config/developer-devopscurl -fsSL https://oh-my-skill.com/install.sh | bash -s -- dragoscirjan/opencode-config/developer-devopsnpx oh-my-skill verify dragoscirjan/opencode-config/developer-devops怎么用
商店整理自技能原文 · 版本 f561928 · 表述以原文为准Claude 会遵循 DevOps 最佳实践编写基础设施和自动化代码,确保操作可重复、不可变基础设施、最小权限、秘密不提交到版本控制、状态远程锁定、CI/CD 流水线含审批门、监控和文档随代码生成。
当用户编写基础设施代码(如 Terraform、Ansible)或自动化脚本(如 Shell、YAML)时触发。
技能原文 SKILL.md
DevOps & Infrastructure Standards
Always load clean-code alongside this skill. Use the detect-language tool to dynamically load the language-specific skill (e.g. lang-tf, lang-sh, lang-yaml) for the automation code you are writing. Run the env-get tool for the DEVELOPER_SKILLS variable. If it returns a comma-separated list of skill names, load each of them.
Cross-Cutting Rules
- Idempotency: Every operation safe to run multiple times with the same result. Test by running twice.
- Immutable infra: Replace over mutate. Build images (Docker, AMI) rather than patch in place.
- Secrets: Never in VCS. Vault solutions (HashiCorp Vault, AWS SM, SOPS). Inject at runtime via env or mounted secrets.
- Least privilege: Minimal IAM/RBAC. Separate service accounts per workload. No wildcard permissions in production.
- Drift detection:
planin CI on schedule. Alert on unexpected changes. - State: Remote with locking (S3+DynamoDB, GCS, Azure Blob). Never commit state files. Workspaces or directories per environment.
- CI/CD pipeline: Lint → format check → plan → approval gate → apply. Never auto-apply to production. Pin tool versions.
- Monitoring: Define alerts alongside resources as code. Structured logging for automation.
- Docs: Every module/role gets a README (inputs, outputs, usage).
terraform-docsin CI. - Automation: Use
run-quality-checksto run validations, formatters, and tests before finalizing.
Ansible Rules
Ansible — Roles for reusable units. ansible-vault for secrets. Fully qualified collection names (ansible.builtin.copy). block/rescue/always for error handling. Tags for selective runs. Per-environment inventory. --check before apply.