Skip to content
Back to skills

Code Review 3

ASecurity

Reviews code changes for architectural fitness, extensibility, and alignment with design principles. Use when reviewing code, checking PRs, or validating implementations.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
code-qualitygoc++code-review

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill code-review-3 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Review 3?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Review 3
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-code-review-3/badge)](https://www.skillsdirectory.com/skills/david-li0406-code-review-3)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-review
description: Reviews code changes for architectural fitness, extensibility, and alignment with design principles. Use when reviewing code, checking PRs, or validating implementations.
---

# Code Review

Early-stage C++ compiler project. Primary goal: keep architecture clean and extensible.

## Review Checklist

### 1. Architecture and Extensibility

- Does the change fit the intended structure and boundaries?
- If it doesn't fit existing abstractions, should we generalize the design?
- Will this scale as we add more features?

### 2. No Hacks or Special Cases

- Avoid patch-like solutions with feature-specific workarounds
- No scattered conditional logic ("just for this feature")
- If forcing something in, consider a better abstraction

### 3. Use Existing Utilities

- Don't reinvent what standard library or codebase already provides
- Use modern C++ when it improves clarity (not for fancy)

### 4. Error Handling

Check `docs/error-handling.md` for correct error type usage:

- `DiagnosticException` only in AST→MIR (with source location)
- `InternalError` for compiler bugs (MIR→LIR, codegen, unreachable code)
- `std::runtime_error` for interpreter/SDK runtime failures
- Never use `std::unreachable()` or `DiagnosticException({})`

### 5. Design Principles Alignment

Read `docs/design-principles.md` and check:

- No Workarounds
- Parameterize, Don't Specialize
- Capture Behavior at the Source
- Unify Before Multiplying
- Follow Established Patterns
- Use Domain Vocabulary
- Comments Explain Why, Not What

### 6. LIR Design (if touching LIR)

Check that LIR changes follow the correct mental model (see `docs/architecture.md`):

- **Variable access**: uses slang's flat symbol model (symbol = unique address, no instance traversal)
- **Operations**: RISC-V assembly style (register-based, explicit data flow)
- **Method calls on complex types**: RISC-V function call style (object pointer as `this`)

## Output Format

1. **Summary**: One sentence on what the change does
2. **Architecture**: Impact on system structure, potential issues
3. **Concerns**: Hacky patterns, violations of design principles
4. **Suggestions**: Better abstractions if needed

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…