review-code
npx machina-cli add skill aiskillstore/marketplace/review-code --openclawFiles (1)
SKILL.md
785 B
Code Review Skill
Workflow
- Understand: Read context (ticket, PR description) and identifiy scope.
- Execute: Use the checklist in references/checklist.md.
- Core areas: Quality, Security, Performance, Maintainability.
- Tools: Run project-specific linting and testing commands (e.g.,
just lint,npm test,pytest); use static analysis if available. - Document: Provide constructive feedback with rationale and suggestions.
- Follow Up: Track and verify fixes.
References
checklist.md: Detailed review criteria.
Source
git clone https://github.com/aiskillstore/marketplace/blob/main/skills/0xmsc/review-code/SKILL.mdView on GitHub Overview
This skill provides a structured workflow to plan and execute code reviews like a senior engineer. It guides you from understanding the ticket or PR scope through executing a checklist, running project tests, documenting feedback, and following up on fixes.
How This Skill Works
Begin by Understand-ing the ticket or PR to identify the scope. Then Execute using the references/checklist.md checklist, covering Quality, Security, Performance, and Maintainability. Use Tools to run project-specific linting and tests (e.g., just lint, npm test, pytest) and apply static analysis if available; finally Document feedback with rationale and follow up on fixes.
When to Use It
- Reviewing a PR before merging to ensure code quality and alignment with requirements.
- Planning a dedicated code review task for a feature branch to scope work and ownership.
- Auditing changes for security vulnerabilities or potential weaknesses.
- Assessing a refactor or optimization for performance implications.
- Onboarding new reviewers with a repeatable, checklist-driven process.
Quick Start
- Step 1: Understand the ticket/PR and identify the scope and acceptance criteria.
- Step 2: Execute the checklist in references/checklist.md focusing on Quality, Security, Performance, and Maintainability.
- Step 3: Run project-specific linting and tests (e.g., just lint, npm test, pytest), document feedback with rationale, and follow up on fixes.
Best Practices
- Read the ticket/PR description first to identify the precise scope and acceptance criteria.
- Use the references/checklist.md as the core review criteria, focusing on Quality, Security, Performance, and Maintainability.
- Run project-specific linting and tests (e.g., just lint, npm test, pytest) and apply static analysis if available.
- Provide constructive feedback with clear rationale and concrete suggestions for improvements.
- Follow up on fixes by tracking changes and verifying updates before sign-off.
Example Use Cases
- Review a PR implementing a security fix, validating it against the checklist and running tests before merge.
- Plan a review for a performance-critical refactor, evaluating impact using performance tests and static analysis.
- Conduct a feature-adding review with linting, unit tests, and maintainability checks.
- Use the checklist as part of an onboarding session to teach junior engineers the review process.
- Pre-merge review of a CI-managed PR after checklist criteria pass and fixes are verified.
Frequently Asked Questions
Add this skill to your agents