Serde Code Review
name: serde-code-review
by anderskev · published 2026-04-01
$ claw add gh:anderskev/anderskev-serde-code-review---
name: serde-code-review
description: Reviews serde serialization code for derive patterns, enum representations, custom implementations, and common serialization bugs. Use when reviewing Rust code that uses serde, serde_json, toml, or any serde-based serialization format. Covers attribute macros, field renaming, and format-specific pitfalls.
---
# Serde Code Review
Review Workflow
1. **Check Cargo.toml** — Note serde features (`derive`, `rc`) and format crates (`serde_json`, `toml`, `bincode`, etc.)
2. **Check derive usage** — Verify `Serialize` and `Deserialize` are derived appropriately
3. **Check enum representations** — Enum tagging affects wire format compatibility and readability
4. **Check field attributes** — Renaming, defaults, skipping affect API contracts
5. **Verify round-trip correctness** — Serialized data must deserialize back to the same value
Output Format
Report findings as:
[FILE:LINE] ISSUE_TITLE
Severity: Critical | Major | Minor | Informational
Description of the issue and why it matters.Quick Reference
| Issue Type | Reference |
|------------|-----------|
| Derive patterns, attribute macros, field configuration | [references/derive-patterns.md](references/derive-patterns.md) |
| Custom Serialize/Deserialize, format-specific issues | [references/custom-serialization.md](references/custom-serialization.md) |
Review Checklist
Derive Usage
Enum Representation
Field Configuration
Database Integration (sqlx)
Correctness
Severity Calibration
Critical
Major
Minor
Informational
Valid Patterns (Do NOT Flag)
Before Submitting Findings
Load and follow `beagle-rust:review-verification-protocol` before reporting any issue.
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...