deployment-check
Skill0 starsChanged 4 months agoMITView on GitHub
Deployment integrity verification — run this skill automatically after ANY change touching Dockerfile, docker-compose.yml, docker-compose.*.yml, .env files, environment config, deployment scripts, CI/CD config, or any file that affects how the app is built or run. Use whenever the user says: deploy, deployment, docker, compose, dockerfile, production, ship, release, container, build image, push to registry, staging, go live, or "ready to deploy". Also trigger when declaring a task "done" if any deployment-related file was modified — even if the user never said "deploy". Do not skip this skill just because the change seems small; a one-line env change can break a production deployment.
- Reads credentials
In this repository9 other files it gives its agents.
- adversarial-verifySkill
- agent-fanoutSkill
- compounding-engineeringSkill
- goal-contractSkill
- karpathy-guidelinesSkill
- recon-firstSkill
- two-strike-debugSkill
- universal-loopSkill
- writing-claude-mdSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 7 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Before running checks, answer these questions by reading the project files:
- Distinctive: line 50
If a specific Dockerfile path or build context is used in the compose file, mirror that:
- Very specific: line 57
No lines containing ERROR, failed, or error: (case-insensitive) in the output (ignore expected strings like "Successfully built")
- Distinctive: line 60
On failure: Read the error, fix the root cause in the Dockerfile or build context, then re-run Check 1.
- Very specific: line 84
All services show status running or healthy in docker compose ps
- Very specific: line 85
No lines in logs matching: Error, FATAL, panic, exception, Connection refused, failed to connect, OOMKilled, Exiting, exited with code [^0] …
- Very specific: line 91
Check which service failed: docker compose ps and docker compose logs <service>
- Very specific: line 93
Run docker compose down then re-run Check 2 from the top
- Very specific: line 101
Use the endpoint discovered in Step 0.
- Very specific: line 115
Check if the container is actually running: docker compose ps
- Very specific: line 116
Check logs for startup errors: docker compose logs <service> --tail 50
- Very specific: line 117
If the app needs more startup time, retry up to 3 times with sleep 5 between attempts
- Distinctive: line 122
If no health endpoint exists and the user confirmed to skip: note this explicitly in the final summary.
- Very specific: line 138
Check whether any .env files (not .env.example) are tracked by git:
- Distinctive: line 174
After all checks pass, report to the user:
- Distinctive: line 187
If any check was skipped (e.g., no health endpoint), say so explicitly with the reason.
- Distinctive: line 188
If you couldn't run Docker checks (e.g., Docker not installed or not available in this environment), say so and list which checks were …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Deployment Check
Triggers automatically when relevant; invoke directly with /deployment-check or ask, e.g. "check the deployment".
You've been invoked because a change touched deployment-sensitive files. Before declaring the task done, run through all four checks below in order. If anything fails, fix it and re-run that check (and any downstream checks) until it passes, then show the user proof.
Step 0 — Orient yourself
Before running checks, answer these questions by reading the project files:
- Compose file location — look for
docker-compose.yml,docker-compose.yaml,docker-compose.prod.yml, etc. in the project root and subdirectories. - Health endpoint — check
docker-compose.ymlforhealthcheck:stanzas, README for a/health,/status, or/pingroute, or any framework-specific health URL. If you can't find one, ask the user before continuing:"I couldn't detect a health endpoint in the project. Is there one? (e.g., /health, /status, /ping) Or should I skip the health check for this project?"
- Services to check — list all services defined in the compose file.
- Secret patterns — collect any known env var names from
.env.example,docker-compose.yml, or README that should never appear in output (e.g., passwords, API keys, tokens, secrets).
Check 1 — Docker build
docker build . 2>&1 | tee /tmp/docker-build-output.txt
echo "Exit code: $?"If a specific Dockerfile path or build context is used in the compose file, mirror that:
docker build -f path/to/Dockerfile ./context 2>&1 | tee /tmp/docker-build-output.txtPass criteria:
- Exit code 0
- No lines containing
ERROR,failed, orerror:(case-insensitive) in the output (ignore expected strings like "Successfully built")
On failure: Read the error, fix the root cause in the Dockerfile or build context, then re-run Check 1. Don't proceed to Check 2 until this passes.
Show proof: Print the last 10 lines of build output + the exit code.
Check 2 — Compose up and container log inspection
# Bring up all services in detached mode
docker compose up -d 2>&1 | tee /tmp/compose-up-output.txt
# Wait for containers to stabilise (adjust if healthchecks have longer intervals)
sleep 5
# Capture logs from all services
docker compose logs --no-color 2>&1 | tee /tmp/compose-logs.txt
# Check container statuses
docker compose psPass criteria:
- All services show status
runningorhealthyindocker compose ps - No lines in logs matching:
Error,FATAL,panic,exception,Connection refused,failed to connect,OOMKilled,Exiting,exited with code [^0](use case-insensitive grep — false positives in application debug logs are OK to note but not to fail on if the service is running)
On failure:
- Check which service failed:
docker compose psanddocker compose logs <service> - Fix the root cause (config, missing env var, port conflict, etc.)
- Run
docker compose downthen re-run Check 2 from the top
Show proof: Print docker compose ps output.
Check 3 — Health endpoint returns 200
Use the endpoint discovered in Step 0. The default port is typically mapped in the
compose file under ports:.
# Wait a moment for the app to fully start
sleep 3
# Replace HOST, PORT, and PATH with discovered values
curl -s -o /dev/null -w "%{http_code}" http://localhost:<PORT>/<health-path>Pass criteria: HTTP status code is 200.
On failure:
- Check if the container is actually running:
docker compose ps - Check logs for startup errors:
docker compose logs <service> --tail 50 - If the app needs more startup time, retry up to 3 times with
sleep 5between attempts - Fix the root cause, restart with
docker compose restart <service>, re-run Check 3
Show proof: Print the curl command used and the status code returned.
If no health endpoint exists and the user confirmed to skip: note this explicitly in the final summary.
Check 4 — Secrets and .env leak detection
This check has three parts.
4a — Build output scan
grep -iE "(password|secret|api.?key|token|private.?key|auth.?key)\s*[:=]\s*\S+" \
/tmp/docker-build-output.txt /tmp/compose-logs.txt && echo "SECRETS FOUND" || echo "Clean"4b — Committed files scan
Check whether any .env files (not .env.example) are tracked by git:
git ls-files | grep -E "^\.env$|^\.env\." | grep -v "\.example$|\.sample$|\.template$"Any result here is a hard failure — .env files must not be committed.
Also scan recently modified files for hardcoded secrets:
git diff HEAD --name-only | xargs grep -lE \
"(password|secret|api.?key|private.?key)\s*[:=]\s*['\"][^'\"]{8,}" 2>/dev/null4c — Docker image layer scan
# Check if any secret-like strings baked into image layers
docker history --no-trunc $(docker compose images -q | head -1) 2>/dev/null | \
grep -iE "(password|secret|api.?key|token)" | head -20Pass criteria:
- 4a: No matches in build output or logs
- 4b: No
.envfiles in git index; no hardcoded secrets in modified files - 4c: No secret-like strings in image history
On failure:
- 4a/4c: Identify the source (Dockerfile ARG/ENV, app startup log, etc.) and remove the value from the image build chain. Secrets should come from runtime env, not image layers.
- 4b
.envcommitted: Rungit rm --cached .env, add to.gitignore, amend or new commit. Rotate the secret immediately — it's now in git history.
Show proof: Print the output of each scan command.
Final Summary
After all checks pass, report to the user:
✅ Deployment Check — All Clear
Check 1 · docker build PASSED (exit 0)
Check 2 · compose up / logs PASSED (all services running)
Check 3 · health endpoint PASSED (HTTP 200 at <url>)
Check 4 · secrets scan PASSED (no leaks detected)
Safe to ship.If any check was skipped (e.g., no health endpoint), say so explicitly with the reason. If you couldn't run Docker checks (e.g., Docker not installed or not available in this environment), say so and list which checks were skipped — don't silently pass them.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

