sandgardenhq/sgai/deployment
Claude Code and agent skill by sandgardenhq/sgai
- community
Checking that the SKILL.md file is still in the repository.
MANDATORY when GOAL.md mentions deploying, shipping, releasing, or publishing built artifacts to any environment - reads deployment instructions from the .deploy/ directory, enforces pre-deployment verification, artifact integrity checks, deployment execution safety, post-deployment validation, and rollback planning; prevents deploying without tests, skipping rollback plans, or bypassing environment validation. When GOAL.md says deploy, ship, release, publish, or push artifact to production/sta…
Install
npx vskill@latest install sandgardenhq/sgai/deploymentSKILL.md
Deployment
Overview
Deployment of built artifacts requires mandatory safety gates. This skill reads deployment instructions from the .deploy/ directory and enforces a structured safety process around them.
Three-part model:
| Concern | Location | Role | |
|---|---|---|---|
| What to deploy | GOAL.md | Declares deployment intent ("deploy the app to staging") | |
| How to deploy | .deploy/ | Contains deployment commands, targets, health checks, rollback procedures | |
| Safely deploying | This skill | Enforces safety gates, checklists, and rollback planning |
Core principle: No artifact leaves the build environment without passing every gate. No deployment proceeds without a rollback plan. All deployment instructions come from .deploy/.
Violating the letter of this rule is violating the spirit of this rule.
Announce at start: "I'm using the deployment skill to ensure safe artifact deployment."
Activation Rule
This skill is MANDATORY when GOAL.md contains any deployment intent. Scan GOAL.md for:
- Deployment verbs: deploy, ship, release, publish, push, distribute, deliver, roll out
- Artifact nouns: binary, container, image, package, bundle, executable, build output, artifact
- Target nouns: server, cloud, production, staging, environment, cluster, host, instance, registry
If ANY of these appear in GOAL.md in the context of deploying a built artifact, this skill must be loaded and followed. No exceptions.
Not applicable when:
- GOAL.md only mentions building (no deployment target)
- GOAL.md only mentions testing (no deployment step)
- Changes are documentation-only
Process
Step 0: Load Deployment Instructions
Before any gates, read `.deploy/` to understand the deployment procedure.
Read the contents of the .deploy/ directory at the repository root. From it, extract:
- What artifact is being deployed (name, build command, output path)
- Where it is going (target environment, host, registry)
- How to deploy it (commands, scripts, pipelines)
- How to verify it (health check endpoints, smoke test commands)
- How to roll back (rollback commands, previous version restore procedure)
If .deploy/ contains environment-specific subdirectories, identify which environment GOAL.md is targeting and read the relevant subdirectory.
If `.deploy/` does not exist:
- Scan the project structure and GOAL.md to understand the deployment context
- Draft a
.deploy/README.mdwith deployment instructions based on what you can infer from the project (build system, artifact type, any deployment hints in the codebase) - Present the draft to the user for review
- STOP. Do not proceed with deployment until the user confirms the `.deploy/` contents are correct.
The skill never guesses deployment commands at execution time. All deployment commands must be documented in .deploy/ and confirmed by the user before any deployment proceeds.
Step 1: Pre-Deployment Gate
No deployment proceeds until ALL gates pass.
- [ ] Tests pass - Run the full test suite. Fresh run, not cached results.
- [ ] Build succeeds - Build the artifact from clean state. Exit code 0.
- [ ] Linter clean - No lint errors or warnings in shipped code.
- [ ] completionGateScript passes - If GOAL.md defines a
completionGateScript, run it and verify it passes. - [ ] Version/tag is set - Artifact version matches intended release.
- [ ] No debug configuration - Debug flags, dev endpoints, test credentials are removed from the artifact.
Step 2: Artifact Verification
Verify the artifact at the path specified in .deploy/.
- [ ] Artifact exists - The built artifact is present at the path documented in
.deploy/. - [ ] Artifact is correct version - Version string/tag in artifact matches what was intended.
- [ ] Artifact integrity - Record checksum (SHA256) of the artifact for verification.
- [ ] Artifact size sanity - Size is within expected range (not suspiciously small or large).
- [ ] No dev/test artifacts - Only production artifacts are included in the deployment package.
Step 3: Environment Validation
Validate the target environment documented in .deploy/. Use the validation commands from .deploy/ if provided.
- [ ] Target environment is accessible - Can reach the deployment target (SSH, API, registry).
- [ ] Required services available - Dependencies (database, cache, queue) are running.
- [ ] Configuration is correct - Environment variables, secrets, and config files match the target environment.
- [ ] Sufficient resources - Disk space, memory, CPU are adequate.
- [ ] No active incidents - Target environment is not currently experiencing issues.
Step 4: Rollback Plan
MANDATORY. No deployment without a documented rollback.
Use the rollback procedure from .deploy/ as the basis. Verify it is complete and current.
- [ ] Current state recorded - Document what is currently deployed (version, config, state).
- [ ] Rollback procedure documented -
.deploy/contains step-by-step instructions to revert. - [ ] Rollback tested or verified possible - Confirm the rollback mechanism works.
- [ ] Rollback trigger defined - What conditions trigger a rollback (error rate, health check failure, etc.).
- [ ] Time estimate - How long will rollback take?
If .deploy/ does not include rollback instructions, STOP. Add rollback instructions to .deploy/ and get user confirmation before proceeding.
Step 5: Deployment Execution
Execute the deployment command documented in .deploy/.
- [ ] Announce deployment - Notify stakeholders that deployment is starting.
- [ ] Execute deployment command - Run the exact command from
.deploy/. Do not improvise. - [ ] Monitor for errors - Watch deployment output for failures.
- [ ] Log deployment - Record what was deployed, when, and by whom.
If deployment fails: Stop. Do NOT retry blindly. Investigate the failure. If the failure is understood and fixable, fix and restart from Step 1.
Step 6: Post-Deployment Verification
Run the health checks and verification steps documented in .deploy/.
- [ ] Service is running - The deployed artifact is executing.
- [ ] Health checks pass - All health/readiness endpoints from
.deploy/return healthy. - [ ] Key functionality works - Smoke test critical paths as documented in
.deploy/. - [ ] No error spikes - Error rates are within normal range.
- [ ] Performance acceptable - Response times and throughput are within SLA.
The .deploy/ Directory
.deploy/ is a free-form directory at the repository root. It is the single source of truth for how deployment works for this project. The skill makes no assumptions about its internal structure beyond: the contents must be readable and must describe the deployment procedure.
Example Structures
Simple project:
Multi-environment:
Script-based:
Container-based:
Drafting .deploy/ for a New Project
When .deploy/ does not exist and this skill is activated, draft a .deploy/README.md with the following structure, filled in from project context:
After drafting, present it to the user and STOP until confirmed.
Rules
- No deployment without `.deploy/` - If
.deploy/does not exist or is empty, draft it and wait for user confirmation. Never deploy without documented instructions. - No deployment without passing tests - Fresh test run, not "tests passed yesterday." Run them NOW.
- No deployment without rollback plan - If you cannot roll back, you cannot deploy. Period.
- No deployment without environment validation - Deploying to an unreachable or unhealthy environment wastes time and risks data.
- No debug artifacts in production - Debug builds, test credentials, dev endpoints must not reach production.
- No skipping post-deployment verification - Deployment is not done until post-verification passes. Walking away after
deployis negligence. - No retry without investigation - Failed deployments must be investigated before retrying. Blind retries compound problems.
- Rollback on any post-deployment failure - If post-deployment verification fails, execute the rollback plan from
.deploy/immediately. Do not "wait and see." - No improvised deployment commands - Execute what
.deploy/says. If.deploy/is wrong, fix.deploy/first, then redeploy.
Rationalization Table
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcmd/sgai/skel/.sgai/skills/deployment/SKILL.md
Popularity
- Repository stars
- 126
- Repository forks
- 7
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 27 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sandgardenhq/sgai/deployment)