AGENT SKILL

code-review

Request or provide code reviews. Check for correctness, maintainability, performance, security. Report issues by severity.

适用职业开发工程师
使用场景代码审查
License 许可
MIT
最近更新
2026-04-05
Stars
★ 0
Forks
0

01 前言 Front Matter

name
code-review
metadata
{ "openclaw": { "emoji": "?️", "requires": { "bins": [] } } }
description
Request or provide code reviews. Check for correctness, maintainability, performance, security. Report issues by severity.

03 SKILL.md 正文

Code Review

Overview

A systematic approach to reviewing code for correctness, maintainability, performance, and security.

Requesting Code Review

Before Requesting

  • [ ] All tests pass locally
  • [ ] Code is self-reviewed
  • [ ] PR description is clear
  • [ ] Changes are focused (not too large)
  • [ ] Documentation updated

What to Include

  1. Context: What problem does this solve?
  2. Approach: How does it solve it?
  3. Concerns: Any areas you're unsure about?
  4. Testing: How was this tested?

Performing Code Review

Review Checklist

Correctness

  • [ ] Does it solve the stated problem?
  • [ ] Are edge cases handled?
  • [ ] Are error cases handled?
  • [ ] Does it match the design/spec?

Code Quality

  • [ ] Is it readable and well-named?
  • [ ] Is DRY (Don't Repeat Yourself)?
  • [ ] Is complexity appropriate?
  • [ ] Are functions/methods focused?

Testing

  • [ ] Are there adequate tests?
  • [ ] Do tests cover edge cases?
  • [ ] Are tests meaningful (not just coverage)?

Performance

  • [ ] Any obvious performance issues?
  • [ ] Appropriate data structures?
  • [ ] Efficient algorithms?

Security

  • [ ] No hardcoded secrets
  • [ ] Input validation present
  • [ ] Output encoding correct
  • [ ] No SQL injection, XSS, etc.

Maintainability

  • [ ] Is it documented?
  • [ ] Can someone else understand it?
  • [ ] Will it be easy to modify?

Issue Severity Levels

? Critical - Must fix before merge

  • Security vulnerabilities
  • Data loss/corruption
  • Breaking existing functionality
  • Critical performance issues

? Major - Should fix soon

  • Code that will cause problems later
  • Significant technical debt
  • Missing important tests
  • Poor error handling

? Minor - Nice to fix

  • Style improvements
  • Minor optimizations
  • Documentation improvements
  • Better naming

? Suggestion - Consider but optional

  • Alternative approaches
  • Food for thought
  • Non-blocking feedback

Writing Review Comments

Good Comments

? Critical: This SQL query is vulnerable to injection.
Use parameterized queries instead:

cursor.execute("SELECT * FROM users WHERE id = ?", (user_id,))

Reference: https://OWASP.org/...
? Major: This function is doing too many things.
Consider splitting into:
- validateInput()
- processData()
- saveResults()

This will make it easier to test and maintain.
? Minor: Consider using more descriptive names.
`x` and `y` don't convey meaning.
How about `rowIndex` and `columnIndex`?

Bad Comments

  • "This is wrong" (without explanation)
  • "I don't like this" (subjective without alternative)
  • "LGTM" on large PRs (not actually reviewed)

Responding to Review

  1. Address all comments - Even if you disagree
  2. Explain your reasoning - Why you made certain choices
  3. Ask for clarification - If feedback is unclear
  4. Make changes or explain why not - Don't ignore feedback

Code Review Anti-Patterns

  • Rubber stamping: "LGTM" without reading
  • Nitpicking: Focusing only on style
  • Scope creep: Requesting unrelated changes
  • Blocking forever: Never approving
  • Being vague: "This could be better" (how?)

After Review

  • [ ] All critical issues addressed
  • [ ] Major issues discussed/resolved
  • [ ] Tests pass
  • [ ] Documentation updated
  • [ ] Ready to merge

04 同仓库更多 Skills

sigitpoerwo
sigitpoerwo/repoworkspace_zahra

zahra-workspace-manager

Comprehensive workspace management skill for Zahra Maurita's development environment. Use when managing projects across 8 divisions (Web, App, AI Agent, Bot, Content, Marketing, Research, Business), organizing files, tracking progress, managing memory, or coordinating multi-domain work. Triggers on mentions of workspace organization, project management, division-specific tasks, memory updates, or cross-domain coordination.

市场营销营销推广资料检索与研究
★ 0
sigitpoerwo
sigitpoerwo/repoworkspace_zahra

tinyfish

AI-powered web automation using TinyFish Web Agent. Use when you need to scrape data from websites, automate form filling, extract structured information, or perform any web-based task using natural language instructions. Works with any website including those with JavaScript, dynamic content, and bot protection.

Skill与智能体开发
★ 0
sigitpoerwo
sigitpoerwo/repoworkspace_zahra

tinyfish-openclaw

TinyFish Web Agent integration for OpenClaw. Use this skill to scrape websites, automate web tasks, extract structured data, and perform browser automation using natural language. Works seamlessly with OpenClaw's MCP protocol.

Skill与智能体开发
★ 0
sigitpoerwo
sigitpoerwo/repoworkspace_zahra

autoresearchclaw

暂无简介

测试与质量资料检索与研究
★ 0
sigitpoerwo
sigitpoerwo/repoworkspace_zahra

researchclaw

暂无简介

★ 0
sigitpoerwo
sigitpoerwo/repoworkspace_zahra

academic-research-assistant

Research assistant for management & digital business academics - literature review, paper analysis, citation management, research methodology

资料检索与研究
★ 0