reviewing-code
how to review code effectively
When & Why to Use This Skill
This Claude skill provides a comprehensive framework for conducting effective and systematic code reviews. It guides users through understanding the context of changes, performing technical verification via git diffs, enforcing style consistency (such as PEP8), and ensuring robust test coverage and documentation updates to maintain high software quality.
Use Cases
- Pull Request Auditing: Systematically evaluate code changes by analyzing PR descriptions, linked issues, and the specific scope of modifications to ensure alignment with project goals.
- Style and Pattern Enforcement: Maintain codebase consistency by verifying adherence to PEP8 standards, numpydoc-style docstrings, and specific architectural patterns like scikit-learn estimators.
- Quality Assurance and Testing: Validate that new features or bug fixes are supported by targeted, efficient tests and that critical behaviors are verified locally before merging.
- Documentation Management: Ensure that any changes to APIs or system behavior are accurately reflected in developer guides, API references, and method-level documentation.
- Constructive Peer Feedback: Generate specific, actionable, and professional feedback that clearly distinguishes between mandatory blockers and optional improvements for better team collaboration.
| name | reviewing code |
|---|---|
| description | how to review code effectively |
Reviewing Code Effectively
- Start by understanding the motivation for the change: read the linked issue, PR description, and any relevant design discussion.
- Use
git diffto examine the scope of changes and verify that only necessary files and lines were modified. - Check for consistency with NiMARE’s style and patterns:
- PEP8 compliance and clear, numpydoc-style docstrings for public APIs.
- Use of the scikit-learn–like estimator pattern where appropriate.
- Confirm that new or modified functionality is covered by targeted tests, and that tests are focused and efficient.
- When appropriate, run the relevant tests locally (not the entire test suite) to validate critical behavior or bugfixes.
- Ensure documentation and examples are updated when APIs or behavior change (e.g.,
docs/dev_guide.rst,docs/api.rst, or relevant method docs). - Offer specific, constructive feedback that suggests concrete improvements or clarifications, and be explicit about what is blocking versus optional.