$npx -y skills add sordi-ai/skill-everything --skill review-deploymentApply when reviewing code or planning a deployment. Pre-merge checks, migration ordering, rollback strategy, post-deploy verification.
| 1 | # Sub-Skill: Review & Deployment Process |
| 2 | <!-- target: ~800 tokens (real tiktoken count) --> |
| 3 | |
| 4 | **Purpose:** Prevents deployment accidents and ensures reviews are more than rubber-stamping. |
| 5 | Concrete checklists the agent runs through before every PR and deployment. |
| 6 | |
| 7 | --- |
| 8 | |
| 9 | ## PR Review Checklist (Agent runs this before opening a PR) |
| 10 | |
| 11 | ### Correctness |
| 12 | - [ ] All new functions have tests |
| 13 | - [ ] Existing tests pass (`npm test` / `pytest` / etc.) |
| 14 | - [ ] Edge cases covered: null/undefined, empty arrays, negative numbers |
| 15 | - [ ] No TODO comments without a linked ticket |
| 16 | |
| 17 | ### Security |
| 18 | - [ ] No secrets or API keys in code (not even in comments) |
| 19 | - [ ] User input is validated before flowing into DB queries or shell commands |
| 20 | - [ ] New endpoints have authentication/authorization |
| 21 | - [ ] No `eval()`, `exec()`, or dynamic SQL strings without prepared statements |
| 22 | |
| 23 | ### Performance |
| 24 | - [ ] No N+1 queries (database queries in loops) |
| 25 | - [ ] Large datasets are paginated, not loaded entirely |
| 26 | - [ ] New indexes for new WHERE clauses in queries |
| 27 | |
| 28 | ### Maintainability |
| 29 | - [ ] Complex logic is commented (the *why*, not the *what*) |
| 30 | - [ ] No duplicated code blocks (DRY) |
| 31 | - [ ] Dependencies updated in `package.json` / `requirements.txt` |
| 32 | |
| 33 | --- |
| 34 | |
| 35 | ## Deployment Checklist |
| 36 | |
| 37 | ### Before Deployment |
| 38 | 1. **Check migrations:** Are all DB migrations backward-compatible? (No DROP COLUMN without prior deprecation cycle) |
| 39 | 2. **Feature flags:** New features behind a feature flag? Especially for large changes. |
| 40 | 3. **Rollback plan:** How to roll back if something goes wrong? Documented? |
| 41 | 4. **Monitoring:** Are alerts set up for new critical paths? |
| 42 | |
| 43 | ### Deployment Order (for microservices) |
| 44 | 1. First: Database migrations (additive changes) |
| 45 | 2. Then: Backend services (new version) |
| 46 | 3. Last: Frontend (new version) |
| 47 | 4. Never: Frontend before backend when there are API changes |
| 48 | |
| 49 | ### After Deployment |
| 50 | - [ ] Health check endpoint responds with 200 |
| 51 | - [ ] Error rate in monitoring not elevated (observe for 5 minutes) |
| 52 | - [ ] Critical user flows manually tested (login, main feature, checkout) |
| 53 | |
| 54 | --- |
| 55 | |
| 56 | ## Escalation Rules |
| 57 | |
| 58 | | Situation | Action | |
| 59 | |-----------|--------| |
| 60 | | Test coverage drops below 70% | Block PR, request additional tests | |
| 61 | | Security vulnerability in dependency | Patch immediately, no merge until fixed | |
| 62 | | Production errors > 1% error rate | Rollback immediately, then analyze | |
| 63 | | Deployment takes > 30 min | Abort, investigate root cause | |
| 64 | |
| 65 | --- |
| 66 | |
| 67 | ## Why This Sub-Skill Earns Stars |
| 68 | |
| 69 | The agent never forgets security checks or deployment order. |
| 70 | Every PR is reviewed as if a senior developer went through the checklist — automatically. |