CC DevOps Skills
Use this skill when working on infrastructure, delivery pipelines, Kubernetes operations, observability, PromQL, incident response, Terraform, Docker, shell automation, and reliability engineering. It provides a unified SRE/DevOps operating model rather than a single vendor-specific command set.
The skill is inspired by the Apache-2.0 cc-devops-skills repository, but this version is self-contained for this curated skill catalog.
When to Use
- Designing, reviewing, or fixing CI/CD pipelines.
- Creating or validating Kubernetes manifests, Helm values, Kustomize overlays, or deployment workflows.
- Debugging pods, services, ingress, DNS, network policy, probes, autoscaling, or rollout issues.
- Writing PromQL queries, alert rules, recording rules, SLO dashboards, or runbooks.
- Building Dockerfiles, Compose stacks, image hardening, or multi-stage builds.
- Reviewing Terraform, Terragrunt, Ansible, or infrastructure-as-code changes.
- Handling incidents, postmortems, operational readiness, release safety, and rollback planning.
- Improving reliability, deployment frequency, recovery time, observability, and operational toil.
Skip When
- The task is pure application logic without deployment, runtime, reliability, or operational impact.
- The user asks for business strategy, product design, or frontend-only polish.
- A cloud-provider-specific skill already covers the whole task more precisely, such as a deep Azure Kubernetes operation.
Core Capabilities
- Translate product and engineering needs into reliable delivery systems.
- Build CI/CD workflows with clear stages, caching, artifact flow, gates, and rollback paths.
- Design Kubernetes resources with probes, requests, limits, disruption budgets, security context, and deployment strategy.
- Debug live clusters using repeatable evidence gathering.
- Write PromQL that respects labels, cardinality, windows, and alert semantics.
- Review infrastructure-as-code for drift, blast radius, secrets, and lifecycle risk.
- Harden containers and supply-chain paths.
- Produce incident runbooks and postmortem-ready timelines.
Operating Principles
- Automate the path, but make the failure mode visible.
- Prefer declarative infrastructure and reproducible builds.
- Treat secrets as toxic data: never print, commit, or echo them.
- Every alert needs an owner, severity, symptom, impact, and action.
- Every deployment needs a rollback or forward-fix decision point.
- Production changes should be observable before they are trusted.
- CI should fail early on cheap checks and reserve expensive checks for later gates.
- Kubernetes readiness is not the same as liveness; do not use one probe for both.
- PromQL queries must be tested against expected label sets and time windows.
CI/CD Workflow
Use this pipeline shape unless the repo already has a stronger local convention:
stages:
- lint
- unit-test
- build
- security-scan
- integration-test
- package
- deploy-staging
- smoke-test
- promote-production
For each stage, define:
- Inputs and outputs.
- Cache keys and invalidation rules.
- Required secrets and their scope.
- Failure ownership.
- Timeout.
- Retry policy.
- Artifact retention.
- Required status checks before merge.
CI/CD Review Checklist
- Build is deterministic and does not depend on local developer state.
- Lockfiles are respected.
- Tests run in the same major runtime version used in production.
- Secrets are read from the platform secret store, not committed files.
- Deployment jobs require protected environments or approvals when needed.
- The pipeline uploads test results, coverage, logs, and build artifacts.
- Rollbacks are documented and tested.
- Concurrency controls prevent two production deploys racing.
- Scheduled jobs and branch filters cannot deploy unreviewed code.
- Container images are pinned by digest for production where feasible.
Kubernetes Readiness Checklist
resources.requests and resources.limits are set with realistic values.
readinessProbe checks whether the pod can receive traffic.
livenessProbe checks whether the process should be restarted.
startupProbe protects slow boot paths.
PodDisruptionBudget exists for replicated workloads.
- Deployment strategy is compatible with state and traffic behavior.
securityContext drops unnecessary privileges.
- Service account permissions are least privilege.
- ConfigMaps and Secrets are mounted or injected intentionally.
- Ingress, service, and pod selectors match.
- HPA metrics are stable and not based on noisy low-volume signals.
- NetworkPolicy does not block required DNS, egress, or service traffic.
Kubernetes Debug Flow
Use a read-only evidence path first:
kubectl get deploy,rs,pod,svc,ingress -n <namespace> -o wide
kubectl describe pod <pod> -n <namespace>
kubectl logs <pod> -n <namespace> --previous
kubectl get events -n <namespace> --sort-by=.lastTimestamp
kubectl rollout status deploy/<name> -n <namespace>
Then isolate by layer:
- Scheduling: pending pods, taints, node pressure, quotas.
- Image: pull errors, registry auth, platform mismatch.
- Config: missing env vars, invalid secret keys, wrong mount paths.
- Runtime: crash loops, OOMKilled, failed probes, dependency timeouts.
- Network: service selector, endpoints, DNS, ingress, TLS, network policy.
- Capacity: CPU throttling, memory pressure, queue depth, saturation.
PromQL Patterns
Use rate windows that match scrape interval and user impact.
sum by (service) (
rate(http_requests_total{status=~"5.."}[5m])
)
/
sum by (service) (
rate(http_requests_total[5m])
)
For SLO burn alerts, prefer multi-window checks:
(
job:slo_errors_per_request:ratio_rate5m > 14.4 * 0.001
and
job:slo_errors_per_request:ratio_rate1h > 14.4 * 0.001
)
or
(
job:slo_errors_per_request:ratio_rate30m > 6 * 0.001
and
job:slo_errors_per_request:ratio_rate6h > 6 * 0.001
)
PromQL Review Checklist
- Query uses
rate() or increase() for counters.
- Aggregation keeps only labels needed for routing or diagnosis.
- Regex matchers do not explode cardinality.
- Alert window is long enough for the scrape interval.
- Alert has
for: where short spikes should not page.
- Dashboard query and alert query agree on units.
- Recording rules name the unit and aggregation.
- Missing metrics are handled when absence itself is meaningful.
Terraform and IaC Checks
- Pin provider versions.
- Keep state backend remote, locked, and encrypted.
- Review plan output for destructive actions before apply.
- Use modules for repeated infrastructure, not for single-use complexity.
- Keep secrets out of variables files and state where possible.
- Add lifecycle rules only with a clear reason.
- Detect drift before assuming code matches production.
- Prefer small, reviewable plans over giant mixed changes.
Incident Response Flow
1. Declare incident and assign roles.
2. Define user impact and start timeline.
3. Stabilize: rollback, disable feature, scale, or shed load.
4. Gather evidence without destroying state.
5. Communicate status on a fixed cadence.
6. Resolve or mitigate.
7. Capture follow-up actions with owners and dates.
Anti-Patterns
- Paging on symptoms nobody can act on.
- Using CPU percentage alone as a service health signal.
- Deploying without smoke tests or rollback instructions.
- Running production migrations as an unobserved CI side effect.
- Giving CI broad cloud credentials across all branches.
- Using
latest image tags in production.
- Adding Kubernetes liveness probes that restart slow but healthy apps.
- Writing PromQL with unbounded high-cardinality labels.
Output Format
For reviews:
## Findings
- Severity:
- Evidence:
- Impact:
- Fix:
## Validation
- Commands:
- Expected result:
For implementation:
## Plan
- Delivery path:
- Rollback:
- Observability:
- Security:
Boundaries
Do not run destructive cloud or cluster operations without explicit user approval. Prefer read-only inspection first. Never print or persist secrets.
1---2name: cc-devops-skills3description: SRE, DevOps, Kubernetes, CI/CD, PromQL, Terraform, Docker, and incident operations playbook for building reliable delivery and operations workflows.4license: Apache-2.05---6
7# CC DevOps Skills
8
9Use this skill when working on infrastructure, delivery pipelines, Kubernetes operations, observability, PromQL, incident response, Terraform, Docker, shell automation, and reliability engineering. It provides a unified SRE/DevOps operating model rather than a single vendor-specific command set.
10
11The skill is inspired by the Apache-2.0 `cc-devops-skills` repository, but this version is self-contained for this curated skill catalog.
12
13## When to Use
14
15- Designing, reviewing, or fixing CI/CD pipelines.
16- Creating or validating Kubernetes manifests, Helm values, Kustomize overlays, or deployment workflows.
17- Debugging pods, services, ingress, DNS, network policy, probes, autoscaling, or rollout issues.
18- Writing PromQL queries, alert rules, recording rules, SLO dashboards, or runbooks.
19- Building Dockerfiles, Compose stacks, image hardening, or multi-stage builds.
20- Reviewing Terraform, Terragrunt, Ansible, or infrastructure-as-code changes.
21- Handling incidents, postmortems, operational readiness, release safety, and rollback planning.
22- Improving reliability, deployment frequency, recovery time, observability, and operational toil.
23
24## Skip When
25
26- The task is pure application logic without deployment, runtime, reliability, or operational impact.
27- The user asks for business strategy, product design, or frontend-only polish.
28- A cloud-provider-specific skill already covers the whole task more precisely, such as a deep Azure Kubernetes operation.
29
30## Core Capabilities
31
321. Translate product and engineering needs into reliable delivery systems.
332. Build CI/CD workflows with clear stages, caching, artifact flow, gates, and rollback paths.
343. Design Kubernetes resources with probes, requests, limits, disruption budgets, security context, and deployment strategy.
354. Debug live clusters using repeatable evidence gathering.
365. Write PromQL that respects labels, cardinality, windows, and alert semantics.
376. Review infrastructure-as-code for drift, blast radius, secrets, and lifecycle risk.
387. Harden containers and supply-chain paths.
398. Produce incident runbooks and postmortem-ready timelines.
40
41## Operating Principles
42
43- Automate the path, but make the failure mode visible.
44- Prefer declarative infrastructure and reproducible builds.
45- Treat secrets as toxic data: never print, commit, or echo them.
46- Every alert needs an owner, severity, symptom, impact, and action.
47- Every deployment needs a rollback or forward-fix decision point.
48- Production changes should be observable before they are trusted.
49- CI should fail early on cheap checks and reserve expensive checks for later gates.
50- Kubernetes readiness is not the same as liveness; do not use one probe for both.
51- PromQL queries must be tested against expected label sets and time windows.
52
53## CI/CD Workflow
54
55Use this pipeline shape unless the repo already has a stronger local convention:
56
57```yaml
58stages:
59 - lint
60 - unit-test
61 - build
62 - security-scan
63 - integration-test
64 - package
65 - deploy-staging
66 - smoke-test
67 - promote-production
68```
69
70For each stage, define:
71
72- Inputs and outputs.
73- Cache keys and invalidation rules.
74- Required secrets and their scope.
75- Failure ownership.
76- Timeout.
77- Retry policy.
78- Artifact retention.
79- Required status checks before merge.
80
81## CI/CD Review Checklist
82
83- Build is deterministic and does not depend on local developer state.
84- Lockfiles are respected.
85- Tests run in the same major runtime version used in production.
86- Secrets are read from the platform secret store, not committed files.
87- Deployment jobs require protected environments or approvals when needed.
88- The pipeline uploads test results, coverage, logs, and build artifacts.
89- Rollbacks are documented and tested.
90- Concurrency controls prevent two production deploys racing.
91- Scheduled jobs and branch filters cannot deploy unreviewed code.
92- Container images are pinned by digest for production where feasible.
93
94## Kubernetes Readiness Checklist
95
96- `resources.requests` and `resources.limits` are set with realistic values.
97- `readinessProbe` checks whether the pod can receive traffic.
98- `livenessProbe` checks whether the process should be restarted.
99- `startupProbe` protects slow boot paths.
100- `PodDisruptionBudget` exists for replicated workloads.
101- Deployment strategy is compatible with state and traffic behavior.
102- `securityContext` drops unnecessary privileges.
103- Service account permissions are least privilege.
104- ConfigMaps and Secrets are mounted or injected intentionally.
105- Ingress, service, and pod selectors match.
106- HPA metrics are stable and not based on noisy low-volume signals.
107- NetworkPolicy does not block required DNS, egress, or service traffic.
108
109## Kubernetes Debug Flow
110
111Use a read-only evidence path first:
112
113```bash
114kubectl get deploy,rs,pod,svc,ingress -n <namespace> -o wide
115kubectl describe pod <pod> -n <namespace>
116kubectl logs <pod> -n <namespace> --previous
117kubectl get events -n <namespace> --sort-by=.lastTimestamp
118kubectl rollout status deploy/<name> -n <namespace>
119```
120
121Then isolate by layer:
122
123- Scheduling: pending pods, taints, node pressure, quotas.
124- Image: pull errors, registry auth, platform mismatch.
125- Config: missing env vars, invalid secret keys, wrong mount paths.
126- Runtime: crash loops, OOMKilled, failed probes, dependency timeouts.
127- Network: service selector, endpoints, DNS, ingress, TLS, network policy.
128- Capacity: CPU throttling, memory pressure, queue depth, saturation.
129
130## PromQL Patterns
131
132Use rate windows that match scrape interval and user impact.
133
134```promql
135sum by (service) (
136 rate(http_requests_total{status=~"5.."}[5m])
137)
138/
139sum by (service) (
140 rate(http_requests_total[5m])
141)
142```
143
144For SLO burn alerts, prefer multi-window checks:
145
146```promql
147(
148 job:slo_errors_per_request:ratio_rate5m > 14.4 * 0.001
149and
150 job:slo_errors_per_request:ratio_rate1h > 14.4 * 0.001
151)
152or
153(
154 job:slo_errors_per_request:ratio_rate30m > 6 * 0.001
155and
156 job:slo_errors_per_request:ratio_rate6h > 6 * 0.001
157)
158```
159
160## PromQL Review Checklist
161
162- Query uses `rate()` or `increase()` for counters.
163- Aggregation keeps only labels needed for routing or diagnosis.
164- Regex matchers do not explode cardinality.
165- Alert window is long enough for the scrape interval.
166- Alert has `for:` where short spikes should not page.
167- Dashboard query and alert query agree on units.
168- Recording rules name the unit and aggregation.
169- Missing metrics are handled when absence itself is meaningful.
170
171## Terraform and IaC Checks
172
173- Pin provider versions.
174- Keep state backend remote, locked, and encrypted.
175- Review plan output for destructive actions before apply.
176- Use modules for repeated infrastructure, not for single-use complexity.
177- Keep secrets out of variables files and state where possible.
178- Add lifecycle rules only with a clear reason.
179- Detect drift before assuming code matches production.
180- Prefer small, reviewable plans over giant mixed changes.
181
182## Incident Response Flow
183
184```text
1851. Declare incident and assign roles.
1862. Define user impact and start timeline.
1873. Stabilize: rollback, disable feature, scale, or shed load.
1884. Gather evidence without destroying state.
1895. Communicate status on a fixed cadence.
1906. Resolve or mitigate.
1917. Capture follow-up actions with owners and dates.
192```
193
194## Anti-Patterns
195
196- Paging on symptoms nobody can act on.
197- Using CPU percentage alone as a service health signal.
198- Deploying without smoke tests or rollback instructions.
199- Running production migrations as an unobserved CI side effect.
200- Giving CI broad cloud credentials across all branches.
201- Using `latest` image tags in production.
202- Adding Kubernetes liveness probes that restart slow but healthy apps.
203- Writing PromQL with unbounded high-cardinality labels.
204
205## Output Format
206
207For reviews:
208
209```markdown
210## Findings
211- Severity:
212- Evidence:
213- Impact:
214- Fix:
215
216## Validation
217- Commands:
218- Expected result:
219```
220
221For implementation:
222
223```markdown
224## Plan
225- Delivery path:
226- Rollback:
227- Observability:
228- Security:
229```
230
231## Boundaries
232
233Do not run destructive cloud or cluster operations without explicit user approval. Prefer read-only inspection first. Never print or persist secrets.