From devops-coding-agent
Use at the start and end of every DevOps coding session — thin adapter invoking shared guardrails gates with DevOps-specific context. Adds Dockerfile security checks (root USER → P0, missing HEALTHCHECK → P1), hardcoded registry credentials → P0. Coverage skipped (null). Uses hadolint/actionlint/checkov for lint.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devops-coding-agent:devops-guardrailsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Prerequisite: `guardrails-coding-agent` must be installed.
Prerequisite: guardrails-coding-agent must be installed.
1. Detect operationType
.tf, .bicep, or CloudFormation YAML → operationType: infraoperationType: none2. Invoke input-validation with:
agentFamily: "devops-coding-agent"
allowedActions: ["infra", "pipeline", "dockerfile", "review"]
scopedPaths: [".github/", "pipelines/", "docker/", "infra/", "Dockerfile"]
blockedPaths: ["src/", "tests/"]
3. Invoke budget-monitor with:
agentFamily: "devops-coding-agent"
userStoryId: <from config or prompt>
accumulatedCost: <read from .guardrails-costs.jsonl rollup>
4. Invoke policy-enforcement with:
agentFamily: "devops-coding-agent"
resolvedLanguage: <from config-resolver>
resolvedFramework: <from config-resolver>
allowedAgents: <from policy.allowedAgents>
lspStatus: <from LSP startup result>
5. Invoke harm-prevention with:
agentFamily: "devops-coding-agent"
languagePatternSet:
- pattern for shell injection: "(?:bash|sh)\s+-c\s+.*\$\{.*\}" (shell expansion in pipeline commands)
- pattern for hardcoded registry credentials: "(?:docker login|registry_password|REGISTRY_TOKEN)\s*=\s*[\"'][^\"']{8,}[\"']"
patternOverrides: {}
Extra Dockerfile checks (run after agent writes):
Scan any modified Dockerfile* for:
USER directive or USER root → P0 BLOCK — "Dockerfile must not run as root. Add USER <nonroot> directive."HEALTHCHECK directive → P1 BLOCK — "Dockerfile is missing HEALTHCHECK. Add a health check for production readiness."ARG or ENV with registry credentials → P0 BLOCK — "Hardcoded registry credential in Dockerfile. Use build secrets or CI environment variables."6a. Collect Dockerfile check results. If any Dockerfile check above fired (P0 or P1), record those outcomes as additional gate results. They are included in gateResults passed to audit-trail and error-escalation in steps 10 and 11.
6. Detect lint tool by file type:
hadolint <dockerfile>.github/workflows/*.yml modified → actionlint.tf files modified → checkov -d . --framework terraform7. Invoke output-validation with:
agentFamily: "devops-coding-agent"
lintTool: <detected above>
coverageTool: null
coverageReportPath: null
8. If operationType is infra: invoke idempotency-guard with:
operationType: "infra"
phase: "post"
9. Invoke drift-detection with:
agentFamily: "devops-coding-agent"
pinnedVersions: <from drift.pinnedVersions>
driftBaselineRef: <from drift.driftBaselineRef, default: "main">
driftTrigger: "session-start"
10. Invoke cost-tracker with:
userStoryId: <from config or prompt>
sessionTokensUsed: <estimated from session context>
modelRateKey: "claude-sonnet-4-6"
11. Invoke audit-trail with:
gateResults: <all gate outcomes from steps 2-10>
agentFamily: "devops-coding-agent"
sessionId: <generate: "devops-coding-agent-<timestamp>">
userStoryId: <from config or prompt>
12. If any gate returned BLOCK or WARN: invoke error-escalation with:
gateResults: <all gate outcomes>
agentFamily: "devops-coding-agent"
sessionId: <from step 11>
13. Invoke memory-writer (final post-work step) with:
agentFamily: "devops-coding-agent"
sessionId: <from step 11>
userStoryId: <from config or prompt>
ticketSummary: <short title from the story/task, if available>
filesModified: <list of repo-relative paths touched this session>
patternsChosen:
language: <github-actions | azure-devops>
framework: <runner type — self-hosted | hosted>
languageVersion: <runner image version>
designPatterns: <patterns actually used — e.g. ["multi-stage-docker", "non-root-user", "matrix-build"]>
teamConventions: <non-obvious conventions observed from guidelines-ingestion>
lessonsLearned: <problems hit this session and how they were resolved — empty list when none>
outcome: <success | partial | blocked | failed>
Memory-writer is best-effort telemetry. Never block the session on a memory-write failure.
npx claudepluginhub gagandeepp/software-agent-teams --plugin devops-coding-agentGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.