Xpersona
C

Code Review

CLAWHUB · Unverified

Code review best practices and workflow skill. Use when: reviewing pull requests, performing peer code review, setting up code review standards, or improving... Skill: Code Review Owner: sydpz Summary: Code review best practices and workflow skill. Use when: reviewing pull requests, performing peer code review, setting up code review standards, or improving... Tags: latest:1.0.0 Version history: v1.0.0 | 2026-03-27T08:59:43.810Z | auto - Initial public release of the Code Review Skill. - Provides structured code review workflow, including focus areas, severity classification

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s176qewq6nbak0493h164nm4qh83qwds:codereview-assistant
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-sydpz-codereview-assistant/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

13,531 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: code-review
description: >
  Code review best practices and workflow skill.
  Use when: reviewing pull requests, performing peer code review, setting up code review standards,
  or improving code quality processes.
  Triggers: code review, PR review, pull request review, peer review, code quality,
  review standards, lint, static analysis.
  Provides: review checklist templates, focus areas by language/framework,
  review comment guidelines, approval criteria, and severity classification.
---

# Code Review Skill

A structured approach to code review that balances thoroughness with efficiency.

## Core Principles

1. **Review the code, not the author** — Assume good intent, focus on the work.
2. **Be specific and constructive** — Every comment should have a clear action.
3. **Prioritize by severity** — Not all issues are equal.
4. **Approve with confidence** — Don't approve code you wouldn't want to maintain.

## Review Focus Areas

### 🔴 Critical — Must Fix Before Merge
- Security vulnerabilities (SQL injection, auth bypass, secrets in code)
- Data loss risks (missing validations, unguarded deletions)
- Race conditions and concurrency bugs
- Breaking production failures

### 🟡 Important — Should Fix Before Merge
- Error handling gaps
- Performance issues (N+1 queries, missing indexes, memory leaks)
- Missing test coverage for critical paths
- Inconsistent error responses
- Code that violates team conventions

### 🟢 Nit — Consider Fixing
- Naming that could be clearer
- Commented-out code
- Minor formatting inconsistencies
- Overly complex one-liners

## Review Workflow

### Step 1: Understand the Context
1. Read the PR description and linked issues/tickets
2. Check what the PR is trying to accomplish
3. Understand the scope of changes

### Step 2: Scan First Pass
Quick scan for:
- Obvious bugs or logic errors
- Security concerns
- Missing tests
- Breaking changes

### Step 3: Deep Review
For each changed file:
1. Read the diff carefully
2. Cross-reference with design documents
3. Check for side effects on existing functionality
4. Verify test coverage

### Step 4: Classify and Comment
For each issue found, classify:
```
[🔴 CRITICAL] <title>
Description of the issue.
Suggested fix: <action>
```

```
[🟡 IMPORTANT] <title>
Description of the issue.
Suggested fix: <action>
```

```
[🟢 NIT] <title>
Optional suggestion.
```

### Step 5: Make a Decision

| Condition | Decision |
|-----------|----------|
| No critical issues, minor nits | ✅ **Approve** |
| Important issues need fixing | 🔄 **Request Changes** |
| Critical issues found | ❌ **Request Changes** (block merge) |
| Need context/clarification | 💬 **Comment** (don't approve yet) |

## PR Description Checklist

A good PR description should have:

- [ ] **What** — Brief summary of the change
- [ ] **Why** — Business or technical motivation
- [ ] **How** — High-level approach taken
- [ ] **Testing** — How the change was tested
- [ ] **Screenshots** — UI changes (before/after)
- [ 

_meta.json

{
  "ownerId": "kn75pedbsw92gcn4ttmwe963hn83pkmz",
  "slug": "codereview-assistant",
  "version": "1.0.0",
  "publishedAt": 1774601983810
}

references/review-checklist.md

# Code Review Checklist

## Pre-Review

- [ ] PR description exists and explains the "why"
- [ ] PR is appropriately sized (< 400 lines changed)
- [ ] CI/CD checks are passing
- [ ] Branch is up to date with target branch

## Correctness

- [ ] Logic is correct and handles edge cases
- [ ] No obvious bugs or off-by-one errors
- [ ] Error handling is appropriate
- [ ] No infinite loops or recursion risks
- [ ] Concurrency issues considered

## Security

- [ ] No hardcoded credentials or secrets
- [ ] Input validation on all user-controllable data
- [ ] SQL injection prevention (parameterized queries)
- [ ] Authentication/authorization properly enforced
- [ ] Sensitive data not logged
- [ ] No IDOR (Insecure Direct Object Reference)
- [ ] Output encoding for XSS prevention

## Testing

- [ ] Tests exist for new/changed logic
- [ ] Test coverage is adequate
- [ ] Tests actually test the right behavior
- [ ] No commented-out tests
- [ ] Edge cases covered
- [ ] Happy path covered

## Performance

- [ ] No N+1 query patterns
- [ ] Appropriate indexing on database access
- [ ] No memory leaks
- [ ] Large data sets handled efficiently
- [ ] Lazy loading used where appropriate

## Maintainability

- [ ] Code follows project style conventions
- [ ] Variable/function names are descriptive
- [ ] Functions are reasonably sized (< 50 lines ideal)
- [ ] No deeply nested code (> 3 levels)
- [ ] DRY principle followed
- [ ] No commented-out code
- [ ] Comments explain "why", not "what"

## API Design (if applicable)

- [ ] RESTful conventions followed
- [ ] Appropriate HTTP methods used
- [ ] Status codes are correct
- [ ] Error responses are consistent
- [ ] Versioning strategy followed

## Dependencies

- [ ] New dependencies are necessary
- [ ] Dependencies are from trusted sources
- [ ] No transitive dependency vulnerabilities
- [ ] Dependencies are at stable versions

## Documentation

- [ ] Public APIs have documentation
- [ ] Complex logic is explained
- [ ] README updated if needed
- [ ] Breaking changes documented

references/severity-classification.md

# Severity Classification

## Classification Framework

Every code review comment should be classified by severity. This helps authors prioritize fixes and reviewers focus on what matters.

## Severity Levels

### 🔴 Critical

**Definition:** Must fix before merge. Will cause production issues.

**Examples:**
- Security vulnerability (SQL injection, auth bypass, XSS)
- Data loss potential
- Race condition or deadlock
- Breaking production failure
- PII/sensitive data exposure
- Memory safety issue (buffer overflow in C, etc.)

**Author Response:** Fix immediately or blocking merge

### 🟡 Important

**Definition:** Should fix before merge. Technical debt or risk.

**Examples:**
- Missing error handling
- Unhandled edge case
- Performance issue (N+1, missing index)
- Inadequate test coverage
- Inconsistent API design
- Code that violates project conventions
- Missing logging/monitoring
- Hardcoded configuration values

**Author Response:** Fix or provide justification for deferral

### 🟢 Nit

**Definition:** Consider fixing. Polish/improvement.

**Examples:**
- Naming could be clearer
- Commented-out code
- Minor formatting issue
- Overly complex one-liner
- Could use a helper function
- Missing JSDoc/type comment
- Unused variable

**Author Response:** Fix if easy, otherwise ignore

## Severity Examples by Language

### Go

| Issue | Severity |
|-------|----------|
| `db.Query("SELECT * FROM users WHERE id=" + id)` | 🔴 Critical |
| Missing `defer rows.Close()` | 🔴 Critical |
| Goroutine leak | 🔴 Critical |
| No error check on external call | 🟡 Important |
| Magic numbers without constants | 🟢 Nit |

### TypeScript

| Issue | Severity |
|-------|----------|
| `eval(userInput)` | 🔴 Critical |
| `any` type without documentation | 🟡 Important |
| Missing input validation | 🟡 Important |
| Unused import | 🟢 Nit |
| Inconsistent naming (`userId` vs `user_id`) | 🟢 Nit |

## Triage Decision Tree

```
Is it a security vulnerability?
├── Yes → 🔴 Critical
└── No ↓
Does it cause data loss or corruption?
├── Yes → 🔴 Critical
└── No ↓
Does it crash or break production?
├── Yes → 🔴 Critical
└── No ↓
Does it need significant rework later?
├── Yes → 🟡 Important
└── No ↓
Is it a polish/clarity issue?
├── Yes → 🟢 Nit
└── → 🟢 Nit
```

## Response Time Expectations

| Severity | Author Response Time |
|----------|-------------------|
| 🔴 Critical | Within 1 hour / same day |
| 🟡 Important | Within 1 day |
| 🟢 Nit | Before merge (or ignore) |

## Comment Formatting

```markdown
[🔴 CRITICAL] SQL injection vulnerability
The `name` parameter is concatenated directly into the query.
Use parameterized queries instead: `db.Query("SELECT * FROM users WHERE name=$1", name)`

[🟡 IMPORTANT] Missing error handling
The HTTP client call on line 42 doesn't check for errors.
Add: `if err != nil { return nil, fmt.Errorf("HTTP call failed: %w", err) }`

[🟢 NIT] Unused variable
`result` on line 15 is assigned but never used. Remove or use it.
```

skill-card.md

## Description:

Code review best practices and workflow skill for reviewing pull requests, setting review standards, improving code quality processes, and producing checklists, comment guidance, approval criteria, and severity classifications.

This skill is ready for commercial/non-commercial use.

## Publisher:

[sydpz](https://clawhub.ai/user/sydpz)

### License/Terms of Use:

MIT-0

## Use Case:

Developers and engineering teams use this skill to structure pull request reviews, classify findings by severity, write actionable review comments, and decide whether changes are ready to approve or should be revised.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill may activate for broad code-quality or linting discussions where a full pull request review workflow is not the user's intent.

Mitigation: Treat the output as an advisory checklist and confirm that the review workflow is relevant to the current task before applying it.

Risk: Review guidance can miss project-specific conventions, policies, or automated tool findings.

Mitigation: Use the checklist alongside repository standards, tests, linters, type checkers, SAST scanners, and reviewer judgment.

## Reference(s):

- [Code Review Checklist](references/review-checklist.md)
- [Severity Classification](references/severity-classification.md)

## Skill Output:

**Output Type(s):** [text, markdown, guidance]

**Output Format:** [Markdown review checklists, severity labels, decision criteria, and reusable review comment templates]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Advisory output only; no code execution, persistent access, credential access, or destructive behavior is described in the security evidence.]

## Skill Version(s):

1.0.0 (source: server release metadata)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to Code Review and adjacent AI workflows.