# Review

> Review code against CLAUDE.md standards with focus on multi-chain safety, BigInt precision, and config separation. Use when this capability is needed.

- Skill: `tomevault-io/review-60` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/review-60`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/review-60/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/review-60

---


# Review Skill

Review code changes against the root CLAUDE.md standards.

## Usage

```
/review              # Review changed files (default)
/review <path>       # Review specific file or directory
```

## Workflow

### 1. Gather Standards

Read the root `CLAUDE.md` to understand the code standards.

### 2. Identify Files to Review

Run:
```bash
git diff --name-only origin/main...HEAD
```
Filter to `.ts` files, exclude `node_modules`, `dist`, and generated files.

For a specific path: review only files under the provided path.

### 3. Review Each File

For each file, check for violations of CLAUDE.md standards. Focus areas:

**Config Separation** (CRITICAL):
- Client code must NOT import from `process.env` or `dotenv`
- Client code must NOT hardcode addresses, chain IDs, or parameters that belong in config
- New parameters must be added to config types and passed through, not hardcoded
- Venue/pricer ordering must only be defined in config, never in client logic

**BigInt Precision**:
- No `number` type for on-chain values (amounts, prices, gas)
- No manual `10 ** n` — use `parseUnits`/`formatUnits`
- Rounding direction is correct (down for collateral, up for debt)
- No floating-point arithmetic on token amounts

**Multi-Chain Safety**:
- No hardcoded chain-specific addresses in client code (they belong in config)
- Chain ID assumptions are documented
- New chain additions include all required config fields

**Liquidity Venue / Pricer / Data Provider Patterns**:
- New venues implement the `LiquidityVenue` interface in `apps/liquidity-venues/src/`
- New pricers implement the `Pricer` interface in `apps/pricers/src/`
- New data providers implement the `DataProvider` interface in `apps/data-providers/src/`
- Registered in the respective factory switch statement
- Type name added to the union type in config (`apps/config/src/types.ts`)
- Config constants exported from config package
- Tests added

**viem Usage**:
- Uses viem types (`Address`, `Hex`, `Chain`) consistently
- Uses `viem/actions` for chain interactions
- Proper error handling around on-chain calls

**Error Handling**:
- On-chain calls wrapped in try/catch
- Errors logged with `logTag` prefix
- Stack traces preserved with `{ cause: err }`
- Individual venue/pricer failures don't crash the bot

### 4. Output Format

For each issue found:
```
[PRIORITY] TITLE
  Standard: SECTION > RULE
  FILE:LINE
  DESCRIPTION
```

Where:
- PRIORITY: P0 (critical — config/secret leak, BigInt misuse), P1 (high), P2 (medium), P3 (low)
- Standard: Reference to the CLAUDE.md section violated

### 5. No Issues

If no violations found:
```
No issues found (reviewed N files)
```

---
> Source: [morpho-org/morpho-blue-liquidation-bot](https://github.com/morpho-org/morpho-blue-liquidation-bot) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-22 -->

