| name | zireael-code-review |
| description | Review C code for compliance with Zireael standards. Use before committing or when reviewing PRs. |
| user-invocable | true |
| allowed-tools | Read, Glob, Grep, Bash(cmake *), Bash(ctest *), Bash(bash scripts/*) |
| argument-hint | [file-path] or [module] |
| metadata | {"short-description":"Code review + compliance check"} |
Response Format (IMPORTANT)
- Start with a 3-sentence summary of what the code does and overall quality
- List specific issues with file:line references (e.g.,
src/core/engine.c:42)
- Provide copyable fix suggestions for each issue
- Keep total response under 500 lines
Get to actionable output quickly. No lengthy preambles.
When to use
Use this skill when:
- Reviewing code before commit or PR
- Checking compliance with Zireael standards
- Auditing code for safety and style issues
Automated Checks
First run automated checks:
cmake --preset posix-clang-debug && cmake --build --preset posix-clang-debug
bash scripts/guardrails.sh
ctest --test-dir out/build/posix-clang-debug --output-on-failure
Platform Boundary Review
If code touches src/core/, src/unicode/, or src/util/:
Safety Review
Per docs/SAFETY_RULESET.md:
Code Style Review
Per docs/CODE_STANDARDS.md:
Error Handling Review
Per docs/ERROR_CODES_CATALOG.md:
Testing Requirements
Forbidden Patterns
Check for absence of:
#include <unistd.h>
#ifdef _WIN32
printf("debug: %d\n", x);
size_t new_size = size + extra;
uint32_t val = *(uint32_t*)ptr;
if (align > 4096u) return false;
buffer->len = new_len;
if (!valid) return ZR_ERR_INVALID_ARGUMENT;
Review Report Format
## Code Review: [file/module]
### Summary
[3 sentences max]
### Automated Checks
- Build: [PASS/FAIL]
- Guardrails: [PASS/FAIL]
- Tests: [PASS/FAIL]
### Issues Found
1. `file:line` - [issue description]
```c
// Fix:
[copyable fix]
Recommendations
- [Brief recommendation]