Code Review and Quality
- When another agent or model produced code you need to evaluate
What Is This
The "Code Review and Quality" skill is a multi-dimensional code review process designed for use on the Happycapy Skills platform. Its primary function is to systematically evaluate code-whether written by yourself, another agent, or a human contributor-across five critical axes: correctness, readability, architecture, security, and performance. This systematic approach ensures that every change, no matter how minor, undergoes rigorous assessment before being merged into a main branch. The skill is built to promote continuous improvement in code quality, aiming to identify and address issues early while maintaining momentum in software development.
The review process is not meant to enforce unattainable perfection but rather to raise the overall health of the codebase with each change. By applying clear evaluation criteria, the skill enables reviewers to make consistent, objective decisions. The code review is not limited to new features but is also applicable to refactoring, bug fixes, and any code contributed by automated tools or models.
Why Use It
Consistent and thorough code review is a cornerstone of high-quality software development. The "Code Review and Quality" skill provides several distinct advantages:
- Prevents defects: By systematically checking for correctness, security flaws, and performance issues, it catches bugs and vulnerabilities before they reach production.
- Promotes maintainability: Reviews focused on readability and architecture ensure that code remains understandable and easy to extend.
- Encourages best practices: The skill enforces adherence to project conventions and coding standards, which reduces technical debt over time.
- Facilitates collaboration: When multiple agents or humans contribute to a codebase, objective reviews help maintain consistency and shared understanding.
- Supports automation: The skill is designed to be used both manually and by automated agents or models, making it ideal for modern, AI-assisted development workflows.
How to Use It
To conduct a review using the "Code Review and Quality" skill, follow these steps:
-
Initiate a Review: Whenever a new change, pull request, or code contribution is ready, invoke the skill to start the review process.
-
Assess Across Five Axes: Evaluate the code methodically along each dimension:
- Correctness: Confirm that the code matches requirements, handles edge and error cases, and is properly tested.
- Readability: Ensure code is clean, well-organized, and follows style guidelines. Names should be descriptive, and logic should be easy to follow.
- Architecture: Check that the code fits well within the existing structure, respects boundaries, and avoids unnecessary complexity.
- Security: Look for vulnerabilities such as injection risks, improper data handling, and insecure dependencies.
- Performance: Identify inefficient operations, unnecessary resource usage, and potential scalability problems.
-
Apply the Approval Standard: Only approve a change if it clearly improves the codebase, even if it is not perfect. Perfection is not the goal-progress is.
-
Document Your Findings: Clearly note any issues, suggestions, or approval rationale. For example:
# Example: Readability feedback def add(x, y): return x + y # Suggestion: Add docstring explaining parameters and return value for clarity. -
Request Changes or Approve: If the code falls short in any critical area, request changes with specific, actionable feedback. Otherwise, approve the change and merge.
When to Use It
The "Code Review and Quality" skill should be employed in the following scenarios:
- Before merging any pull request or code change: No change should reach the main branch without review.
- After feature implementation: Ensure new features meet quality standards before integration.
- When another agent or model produces code: Automated code generators often need close scrutiny for correctness and style.
- During refactoring: Validate that improvements do not unintentionally introduce regressions.
- After bug fixes: Review both the fix and any associated regression tests to confirm the root cause is addressed and coverage is sufficient.
Important Notes
- Continuous improvement over perfection: The goal is to make the codebase better with every change. Do not block code simply because it is not how you would write it, as long as it improves quality and adheres to conventions.
- Use as a gating step: Always apply the skill before any merge to production or shared branches.
- Encourage collaboration: Provide constructive, actionable feedback and recognize positive contributions.
- Automatable process: The skill can be integrated with both manual and automated review workflows, making it suitable for hybrid human-AI teams.
- Be specific and objective: Use concrete examples and reference standards or requirements when providing feedback.
By following this structured, multi-axis approach, the "Code Review and Quality" skill helps ensure that every code contribution enhances the overall integrity, security, and maintainability of your software projects.
More Skills You Might Like
Explore similar skills to enhance your workflow
Gws Slides
Read and write Google Slides presentations via CLI
Prioritize Assumptions
Prioritize assumptions using an Impact × Risk matrix and suggest experiments for each. Use when triaging a list of assumptions, deciding what to
Attach DB
Attach a DuckDB database file and explore its schema for subsequent queries
Better Auth
Implement authentication and authorization with Better Auth - a framework-agnostic TypeScript authentication framework. Features include email/passwor
Meme Rush
Tracks and fast-trades meme tokens in real time across launchpads like Pump.fun and Four.meme
SAP AI Core
Deploy and manage AI models with SAP AI Core platform services