/harness-claude:harness-deploymentfrom harness-claude
Analyzes CI/CD pipelines and deployment strategies, and enforces deployment readiness with a hard gate command. Use before approving PRs that touch deployment config or when setting up deployment workflows.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:harness-deployment still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
CI/CD pipeline analysis, deployment strategy design, and environment management. From commit to production with confidence. Deployment readiness is a hard gate:
harness check-deploymentblocks a deploy on unambiguous, incident-causing violations, advises on maturity gaps, and abstains loudly when a repo does not deploy. This is a gate, not a suggestion.
on_pr triggers fire and the change touches pipeline, environment, or deploy-script filesThis is the mechanical gate and it runs first. The phases below (DETECT/ANALYZE/DESIGN/VALIDATE) are the advisory context you use to fix what the gate finds — they never replace it.
Invoke the gate. Never reimplement it. Run harness check-deployment (add --json for machine output, --findings-json for the trailing findings-contract line). The skill invokes the command; it does not re-derive the detection or the block/advise decision by hand. Hand-rolling the mechanical check instead of calling the command is a Red-Flag pattern.
Read the exit code as the authority. The gate reports one of four values, and each means exactly one thing:
| Exit | Meaning | What it says about the deploy |
|---|---|---|
0 | Pass — deployment config detected, no hard violations (or the gate is explicitly disabled via deployment.enabled: false). | Cleared. Soft findings may still be listed as advisories. |
1 | Blocked — at least one hard violation. | Do not deploy. Fix the finding; the gate is the authority and does not get hand-waved past. |
2 | Error — internal failure or misconfiguration (unreadable/malformed harness.config.json). | Indeterminate. Fix the tooling/config; never treat a 2 as a pass. |
3 | Abstained — no deployment configuration detected at all. | The gate examined nothing — abstained, not passed. Never green. Confirm the repo genuinely does not deploy, or that detection missed the config. |
Apply the block-vs-advise contract. Hard rules block (exit 1); soft rules advise (surfaced, exit 0):
| Code | Class | Fires when |
|---|---|---|
DEPLOY-SEC001 | HARD — non-waivable | A hardcoded secret or long-lived cloud credential appears in a pipeline file or a committed environment file. A ${{ secrets.X }} / process.env.X reference is not a leak and does not trip it. |
DEPLOY-RB001 | HARD | A deploy target is detected but no rollback path is wired. |
DEPLOY-ENV001 | HARD | A production deploy is reachable with no promotion/approval gate (direct-to-prod, no environment protection, no manual approval, no prior staging job). |
DEPLOY-STAGE001 | SOFT | Recommended pre-deploy stages are missing (security scan, smoke tests, post-deploy verification), or a pipeline file is unparseable. |
DEPLOY-ENV002 | SOFT | Weak environment separation (shared non-secret config across environments) that is not an outright leak. |
DEPLOY-HC001 | SOFT | No post-deploy health check wired for a deploy target. |
DEPLOY-PERF001 | SOFT | Pipeline structure smells (serial stages that could parallelize, missing dependency/build caching). |
Severity overrides are per-rule and bounded. deployment.rules may downgrade a waivable hard rule (DEPLOY-RB001, DEPLOY-ENV001) to advisory for a repo where the concept genuinely does not apply — with a config comment saying why. DEPLOY-SEC001 ignores any downgrade: a leaked credential is never a judgment call. Disabling the whole gate (deployment.enabled: false) is an explicit, reviewable opt-out — not a fix for a single finding.
When the gate blocks, drop into the advisory phases. Use DETECT to locate the offending config, ANALYZE to understand the gap, and DESIGN to write the fix in the project's CI/CD syntax. Re-run the gate until it clears.
Scan for CI/CD configuration files. Search the project root for pipeline definitions:
.github/workflows/*.yml -- GitHub Actions.gitlab-ci.yml -- GitLab CIJenkinsfile -- Jenkins.circleci/config.yml -- CircleCIbitbucket-pipelines.yml -- Bitbucket Pipelinesazure-pipelines.yml -- Azure DevOpsdeploy/, scripts/deploy* -- custom deployment scriptsIdentify deployment targets. Parse pipeline files for deployment steps and extract:
Detect environment configuration. Look for environment-specific config:
.env.production, .env.staging filesMap the deployment topology. Build a summary of what gets deployed where:
Present detection summary. Output the discovered topology before proceeding:
Deployment Topology:
Platform: GitHub Actions
Pipelines: 3 workflow files
Environments: dev, staging, production
Strategy: Rolling (detected from kubectl rolling-update)
Approval gates: production (manual)
Check pipeline stage completeness. A mature pipeline includes these stages. Flag any that are missing:
Evaluate environment isolation. Verify that environments are properly separated:
Check deployment safety mechanisms. Verify the pipeline includes:
Analyze pipeline performance. Identify bottlenecks:
Check secret hygiene in pipelines. Verify:
Recommend deployment strategy. Based on the service characteristics:
Design missing pipeline stages. For each gap identified in Phase 2, provide:
Recommend environment promotion workflow. Design the path from commit to production:
Design rollback procedure. Every deployment must have a documented rollback:
Recommend monitoring integration. Connect deployment events to observability:
Lint pipeline configuration. Run syntax validation:
actionlint or YAML schema validationgitlab-ci-lint API endpointVerify environment variable completeness. For each environment:
Verify branch protection alignment. Confirm that:
Generate deployment readiness report. Summarize findings:
Deployment Readiness: [PASS/WARN/FAIL]
Pipeline stages: 7/9 present (missing: security scan, smoke tests)
Environment isolation: PASS
Rollback procedure: WARN (documented but not automated)
Secret hygiene: PASS
Pipeline performance: 12m avg (recommend parallelizing test stages)
Recommendations:
1. Add SAST scan stage between build and deploy
2. Add post-deploy smoke test stage
3. Automate rollback on health check failure
Present results. Use emit_interaction to deliver the report and ask whether to proceed with implementing recommendations.
harness check-deployment -- The mechanical gate. Verifies deployment readiness and exits per the four-value contract (0 pass / 1 blocked / 2 error / 3 abstained). --json emits the full result; --findings-json emits the trailing findings-contract line. The skill invokes this command; it never reimplements the check.harness skill run harness-deployment -- Advisory invocation for the DETECT/ANALYZE/DESIGN/VALIDATE walkthrough used to fix what the gate reports.harness validate -- Run after any pipeline configuration changes to verify project health.harness check-deps -- Verify deployment script dependencies are available.emit_interaction -- Present deployment readiness report and gather decisions on strategy.harness check-deployment verifies a rollback path exists — pre-ship readiness answering "can we roll back?" It is satisfied by any of: a rollback block in harness.config.json (the circuit breaker is wired), a revert/rollback workflow or deploy/rollback script, or a documented rollback runbook. It never deploys and never merges a revert. Its complement, harness-rollback, executes post-ship: when a signal or evaluation fires, it opens a revert PR (propose-only; a human merges). The two are connected by the shared rollback config seam. On a DEPLOY-RB001 block, point the human at harness-rollback to establish the missing post-ship path — but the gate's job is only to confirm the path exists before this merges.Phase 1: DETECT
Found: .github/workflows/ci.yml, .github/workflows/deploy.yml
Environments: staging (auto), production (manual dispatch)
Strategy: Rolling (kubectl set image)
Registry: ghcr.io/org/api-server
Phase 2: ANALYZE
Missing stages: security scan, post-deploy smoke tests
Environment isolation: PASS
Secret hygiene: WARN -- AWS_ACCESS_KEY_ID used instead of OIDC
Pipeline duration: 18m (test and lint run sequentially)
Phase 3: DESIGN
Recommendation: Add trivy scan after Docker build
Recommendation: Switch to AWS OIDC for keyless authentication
Recommendation: Parallelize lint and test jobs (saves ~4m)
Recommendation: Add smoke test job after deploy-staging
Phase 4: VALIDATE
actionlint: PASS
Environment variables: PASS
Branch protection: WARN -- main branch allows force-push
Result: WARN -- 3 recommendations, 1 security improvement needed
Phase 1: DETECT
Found: .gitlab-ci.yml with 5 stages
Environments: dev, staging, production
Strategy: Canary (Istio VirtualService weight shifting)
Registry: registry.gitlab.com/org/service
Phase 2: ANALYZE
All 9 standard stages present
Environment isolation: PASS
Canary configuration: 5% -> 25% -> 75% -> 100% over 30 minutes
Rollback: Automatic on 5xx rate > 1%
Phase 3: DESIGN
Current strategy is well-configured. Minor recommendations:
- Add canary duration metrics to Grafana dashboard
- Add deployment event annotation to Prometheus
- Consider adding a manual gate between 75% and 100%
Phase 4: VALIDATE
GitLab CI lint: PASS
Environment variables: PASS
Branch protection: PASS
Result: PASS -- pipeline is production-ready
These are hard stops enforced mechanically by harness check-deployment. A hard violation is an error, not a warning — it maps to a non-zero exit and the skill does not hand-wave past it.
harness check-deployment is the authority. Each hard rule maps to exit 1. If the gate returns 1, the deploy does not proceed until the finding is fixed and the gate clears. There is no "explain it away" path around a 1.DEPLOY-SEC001 (leaked/long-lived credential) is non-waivable. A hardcoded secret or long-lived cloud credential in a pipeline file or a committed env file blocks the deploy and cannot be downgraded by deployment.rules. Rotate the credential and remove the literal.DEPLOY-RB001 (no rollback path) blocks. A detected deploy target with no rollback path (no rollback config, no revert/rollback workflow or script, no runbook) exits 1. Wire the path before this merges; on a block, hand off to harness-rollback for the post-ship half.DEPLOY-ENV001 (direct-to-prod, no promotion gate) blocks. A production deploy reachable with no approval/promotion gate exits 1.3) is not a pass. When the gate detects no deployment configuration it examines nothing and abstains loudly — never green. Confirm the repo genuinely does not deploy before treating a 3 as clear.2) is not a pass. A malformed or unreadable harness.config.json exits 2; fix the tooling before shipping. The gate never guesses config.DEPLOY-RB001/DEPLOY-ENV001 requires a deployment.rules entry with a rationale comment. Disabling the gate (deployment.enabled: false) is a visible opt-out, not a remediation.When this skill makes claims about existing code, architecture, or behavior, it MUST cite evidence using one of:
file:line format (e.g., src/auth.ts:42)file with description (e.g., src/utils/hash.ts —
"existing bcrypt wrapper")evidence session section via manage_stateUncited claims: Technical assertions without citations MUST be prefixed with
[UNVERIFIED]. Example: [UNVERIFIED] The auth middleware supports refresh tokens.
These apply to ALL skills. If you catch yourself doing any of these, STOP.
These reasoning patterns sound plausible but lead to bad outcomes. Reject them.
| Rationalization | Reality |
|---|---|
| "The secret is only in a workflow file, not application code" | A leaked credential in a pipeline is a live secret. DEPLOY-SEC001 is non-waivable — rotate it and remove the literal; deployment.rules cannot downgrade it. |
| "We'll add a rollback path before we actually deploy" | The gate verifies the rollback path exists now. "Later" means an incident finds you with no revert route. Wire rollback config, a rollback workflow/script, or a runbook before this merges. |
| "This repo only has one environment, so the promotion gate does not apply" | Then downgrade DEPLOY-ENV001 explicitly via deployment.rules with a comment — do not disable the whole gate. An unconfigured direct-to-prod path is exactly what DEPLOY-ENV001 exists to catch. |
| "The gate abstained, so we're clear to ship" | Abstention (exit 3) means the gate examined nothing — it is not a pass. Either the repo genuinely does not deploy, or detection missed the config. Confirm which before treating it as green. |
"Just set enabled: false to get the pipeline green" | Disabling the gate is an explicit opt-out that shows up in config review, not a fix. If one hard rule is wrong for this repo, downgrade that single rule with a rationale; do not blind the whole gate. |
"The pipeline references ${{ secrets.X }}, so DEPLOY-SEC001 is a false positive" | An env-var reference is not a leak and does not trip the rule — a hardcoded value does. If the gate flagged it, the literal is real; do not suppress it, remove it. |
| "It's just a config change, not a code change" | Config changes cause outages at the same rate as code changes. The gate applies the same rigor and rollback requirement to them. |
| "We tested this in staging" | Staging is not production. Traffic patterns, data volume, and edge cases differ. Staging success does not clear a hard gate finding. |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job