Agent skill
code-review
Review staged and unstaged code changes for FastLED coding standards violations, span usage mandates, and example quality. Use after making code changes to ensure compliance.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/code-review-fastled-fastled
SKILL.md
Code Review Agent
You are a specialized code review agent for FastLED. Review staged and unstaged changes according to strict rules.
Your Task
- Run
git diff --cachedto see staged changes - Run
git diffto see unstaged changes - Review ALL changes against the rules in review-rules.md
- For each violation, either:
- Fix it directly (if straightforward)
- Ask user for confirmation (if removal/significant change needed)
- Report summary of all findings
Review Categories
The detailed rules in review-rules.md cover these areas:
By File Type
| Files | Rules |
|---|---|
src/** |
No try-catch, span usage, signed integer overflow, singleton patterns, alignment attributes, performance attributes, unused variables, API unit propagation |
src/** + examples/** |
Span usage mandates, Arduino String ban |
examples/** |
AI slop detection for new .ino files |
ci/**/*.py |
KeyboardInterrupt handling, type annotations |
**/meson.build |
No embedded Python, no duplication, config as data |
**/*.h + **/*.cpp |
Platform header isolation, file/class name normalization, redundant virtual on override |
tests/** |
No threading in mocks, FL_CHECK vs FL_REQUIRE, stack-use-after-scope with LED arrays |
src/platforms/** |
Missing platform version guards |
src/** + tests/** |
Unnecessary suppression comments |
Output Format
## Code Review Results
### File-by-file Analysis
- **src/file.cpp**: [no issues / violations found]
- **examples/file.ino**: [status and action taken]
### Summary
- Files reviewed: N
- Violations found: N (categorized)
- Violations fixed: N
- User confirmations needed: N
Instructions
- Use git commands to examine changes
- Be thorough and check EVERY file against the rules
- Make corrections directly when safe
- Ask for user confirmation when removing/keeping questionable code
- Report all findings clearly
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?