serde-code-review
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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/anderskev/serde-code-reviewWhat This Skill Does
The serde-code-review skill acts as a specialized linting and architectural reviewer for Rust projects utilizing the Serde ecosystem. It systematically analyzes codebase patterns, focusing on correct trait derivation, enum serialization strategy, and attribute-based field configuration. By enforcing best practices for serialization formats like JSON, TOML, and Bincode, it prevents common pitfalls such as API-breaking field name changes, lossy numeric conversions, and silent key collisions during flattening. The skill provides a standardized output format that clearly categorizes issues by severity, enabling developers to prioritize critical data-loss risks over minor stylistic concerns.
Installation
To install this skill, run the following command in your terminal:
clawhub install openclaw/skills/skills/anderskev/serde-code-review
Use Cases
This skill is indispensable during pull request reviews, refactoring sessions where wire formats might be impacted, and when debugging integration issues between frontend clients and Rust backends. Use it to ensure that your API contracts remain stable when adding new variants to enums, verifying that Option fields are handled correctly using skip_serializing_if, and confirming that custom Serialize or Deserialize implementations do not introduce vulnerabilities or compatibility issues.
Example Prompts
- "Review this model for Serde best practices: [paste code]. I am concerned about forward compatibility and potential field name mismatches."
- "I am getting a deserialization error with my enum. Could you analyze the enum tagging strategy here and suggest fixes to match my JSON payload?"
- "Please perform a security and correctness review on this custom Serde implementation to ensure no data is lost during the round-trip conversion."
Tips & Limitations
To get the most value out of this skill, ensure you provide the corresponding context, such as the target data format (e.g., JSON vs. Bincode) and any specific requirements for API backward compatibility. Note that while this skill excels at identifying logical flaws, attribute misconfigurations, and standard serialization errors, it does not execute your code. It is highly recommended to supplement these findings by writing property-based tests using the proptest or quickcheck crates to verify your implementation logic at runtime. Always check the generated report against your local build environment to confirm that suggested attributes satisfy the compiler's requirements.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-anderskev-serde-code-review": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read
Related Skills
tutorial-docs
Tutorial patterns for documentation - learning-oriented guides that teach through guided doing
fetch-pr-feedback
Fetch review comments from a PR and evaluate with receive-feedback skill
swift-testing-code-review
Reviews Swift Testing code for proper use of
rust-testing-code-review
Reviews Rust test code for unit test patterns, integration test structure, async testing, mocking approaches, and property-based testing. Covers Rust 2024 edition changes including async fn in traits for mocks,
explanation-docs
Explanation documentation patterns for understanding-oriented content - conceptual guides that explain why things work the way they do