$npx -y skills add langchain-ai/deepagents --skill code-reviewPerform a structured code review of changes, checking for correctness, style, tests, and potential issues.
| 1 | # Code Review Skill |
| 2 | |
| 3 | Use this skill after implementing changes to validate your work before delivering. |
| 4 | |
| 5 | ## Review Checklist |
| 6 | |
| 7 | ### 1. Correctness |
| 8 | - [ ] Changes solve the original issue/task |
| 9 | - [ ] No unintended side effects on existing functionality |
| 10 | - [ ] Edge cases are handled |
| 11 | - [ ] Error handling is appropriate (not excessive) |
| 12 | |
| 13 | ### 2. Code Quality |
| 14 | - [ ] Code matches existing style and patterns |
| 15 | - [ ] No unnecessary complexity or abstraction |
| 16 | - [ ] Variable and function names are clear |
| 17 | - [ ] No dead code, commented-out code, or TODOs left behind |
| 18 | |
| 19 | ### 3. Tests |
| 20 | - [ ] New functionality has test coverage |
| 21 | - [ ] Existing tests still pass |
| 22 | - [ ] Tests cover both happy path and error cases |
| 23 | - [ ] Tests are not brittle (don't test implementation details) |
| 24 | |
| 25 | ### 4. Safety |
| 26 | - [ ] No hardcoded secrets or credentials |
| 27 | - [ ] User input is validated at boundaries |
| 28 | - [ ] No SQL injection, XSS, or command injection vectors |
| 29 | - [ ] File operations use safe paths |
| 30 | |
| 31 | ## Process |
| 32 | |
| 33 | 1. Read each modified file end-to-end (not just the diff) |
| 34 | 2. Run the test suite: `execute("python -m pytest -v")` |
| 35 | 3. Run linters if available: `execute("ruff check .")` |
| 36 | 4. Run the bundled lint check: `execute("python /skills/code-review/lint_check.py .")` |
| 37 | 5. Check against each item in the review checklist |
| 38 | 6. If any issues found, fix them and re-review |
| 39 | 7. When everything passes, the review is complete |
| 40 | |
| 41 | ## Helper Scripts |
| 42 | |
| 43 | - **`/skills/code-review/lint_check.py`** — Scans Python files for missing |
| 44 | docstrings, long functions (>50 lines), and bare `except:` clauses. Run it |
| 45 | via `execute("python /skills/code-review/lint_check.py [path ...]")`. |