Practical quick reference for AI-assisted test generation, code review, and security scanning.
| Command | What It Does |
|---|---|
/tests |
Generate unit tests for selected code. Infers framework (Jest, pytest, xUnit). |
/tests #file |
Generate tests for an entire file |
| Agent mode | "List edge cases for X, then write tests" โ safer than just "write tests" |
A 3-step mini-recipe:
Example prompt:
The AI that wrote the code shouldn't be the only one validating it. Use physics (test runners, linters, type checkers) as your independent verification. Always run the tests โ don't just read them.
How to enable:
Comments cover: bugs, performance, style, security concerns.
Important: Copilot reviews leave comments, never approvals. The human always has final say.
When the coding agent opens a PR:
Create .agent.md files for domain-specific review:
Example .agent.md: