with one click
ship-it
// Run prek, run tests, resolve issues, commit, push, then monitor the deploy workflow and resolve any deploy failures. Use when user says "ship it", "commit and deploy", "push and deploy", or "land this".
// Run prek, run tests, resolve issues, commit, push, then monitor the deploy workflow and resolve any deploy failures. Use when user says "ship it", "commit and deploy", "push and deploy", or "land this".
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | ship-it |
| description | Run prek, run tests, resolve issues, commit, push, then monitor the deploy workflow and resolve any deploy failures. Use when user says "ship it", "commit and deploy", "push and deploy", or "land this". |
End-to-end workflow: run prek checks, run tests, fix failures, commit, push, and monitor the GitHub Actions deploy pipeline through to a healthy production readiness check.
This skill orchestrates the full ship cycle. Do NOT skip steps.
gh CLI authenticated (gh auth status)git configured with push access to the remoteprek installed (brew install j178/tap/prek)Reply with "LFG š I'll ship it" to acknowledge the user's intent.
cd <workspace> && prek run --all-files
Prek hooks may auto-fix issues (ruff lint --fix, ruff format, trailing whitespace, end-of-file).
If prek fails:
Check if hooks auto-fixed files ā many hooks modify files in place. Re-run prek:
prek run --all-files
If the second run passes ā the auto-fixes resolved everything. Proceed to Step 2.
If the second run still fails ā manual intervention needed:
.gitignore the large fileKeep re-running prek until all hooks pass.
Do NOT proceed to Step 2 until prek passes cleanly.
Run the full test suite locally. This catches runtime errors (template rendering, import issues, dependency upgrades) that static checks cannot detect.
cd <workspace>/api && uv run pytest tests/ ../packages/learn-to-cloud-shared/tests -x --tb=short
cd <workspace>/apps/verification-functions && uv run python -c "import function_app"
If tests fail:
Do NOT proceed to commit until all tests pass. No exceptions.
git status
git diff --stat
Always stage ALL changes. Never cherry-pick files. ship it means ship everything.
git add -A
git diff --cached --stat
If the user provided a commit message, use it directly.
If no commit message was provided, generate one based on the changes:
git commit -m "<type>: <concise description>"
Conventional commit types: feat:, fix:, refactor:, docs:, style:, test:, chore:
Ask the user for a commit message if the intent is ambiguous.
git push
If rejected (behind remote):
git pull --rebase && git push
Note: The deploy workflow triggers on pushes to main. If on a different branch, inform the user that deployment won't trigger automatically.
After pushing to main, the deploy.yml workflow triggers automatically.
sleep 5
gh run list --workflow=deploy.yml --limit 1
gh run watch --exit-status
This blocks until the workflow completes. Exit code 0 = success, non-zero = failure.
If the workflow succeeds ā report success and the deploy URL. Done!
If the workflow fails:
run_id=$(gh run list --workflow=deploy.yml --limit 1 --json databaseId --jq '.[0].databaseId')
gh run view $run_id --log-failed
| Pattern | Fix |
|---|---|
ruff lint errors | (cd api && uv run ruff check --fix . ../packages/learn-to-cloud-shared), commit & push |
ruff-format | (cd api && uv run ruff format . ../packages/learn-to-cloud-shared), commit & push |
ty type errors | Fix type errors, commit & push |
pytest / FAILED | (cd api && uv run pytest tests/ ../packages/learn-to-cloud-shared/tests -x), fix, commit & push |
| Pattern | Fix |
|---|---|
Error acquiring the state lock | Extract Lock ID, cd infra && terraform force-unlock -force <lock-id>, re-run |
AuthorizationFailed | Check OIDC deployment secrets/variables and Azure RBAC ā not fixable locally |
ResourceNotFound | terraform refresh or re-import |
| Pattern | Fix |
|---|---|
docker build fails | Fix Dockerfile or pyproject.toml, commit & push |
Smoke test curl -f fails | Check docker logs, fix startup issue, commit & push |
| API readiness timeout | Check app logs: az containerapp logs show ... |
After fixing:
git add -A && git commit -m "fix: resolve deploy failure"git pushIf no code changes needed (e.g., state lock):
gh run rerun $run_id
gh run watch --exit-status
After a successful deploy:
curl -s https://<api-url>/health
curl -s https://<api-url>/ready
## Ship It: <branch-name>
### 1. Pre-commit
ā
All hooks passed / ā Failed ā fixed ā ā
Passed on re-run
### 2. Stage
ā
X files staged
### 3. Commit
ā
`<commit-hash>` ā `<commit-message>`
### 4. Push
ā
Pushed to `<branch>` on `origin`
### 5. Deploy Workflow
ā
Run #<id> ā succeeded in X min / ā Failed (see step 6)
### 6. Deploy Fix (if needed)
ā <failure reason> ā fixed ā ā
Re-deployed successfully
### 7. Production Health
ā
/health ā healthy | /ready ā ready