一键导入
zireael-code-review
// Review C code for compliance with Zireael standards. Use before committing or when reviewing PRs.
// Review C code for compliance with Zireael standards. Use before committing or when reviewing PRs.
Write readable C with proper comments, named constants, and consistent style per CODE_STANDARDS.md.
Enforce locked docs, boundary rules, and safety guardrails for any Zireael change.
Write readable C with proper comments, named constants, and consistent style per CODE_STANDARDS.md.
Write readable C with proper comments, named constants, and consistent style per CODE_STANDARDS.md.
Maintain stable C ABI and versioned binary formats (drawlist + event batches).
Maintain portable CMake builds and deterministic unit/golden/fuzz/integration tests.
| 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"} |
src/core/engine.c:42)Get to actionable output quickly. No lengthy preambles.
Use this skill when:
First run automated checks:
# Build (must pass)
cmake --preset posix-clang-debug && cmake --build --preset posix-clang-debug
# Guardrails (must pass)
bash scripts/guardrails.sh
# Tests (must pass)
ctest --test-dir out/build/posix-clang-debug --output-on-failure
If code touches src/core/, src/unicode/, or src/util/:
<windows.h>, <unistd.h>, <sys/*.h>)#ifdef _WIN32 or #ifdef __linux__docs/LIBC_POLICY.md)uint32_t, size_t, etc.)Per docs/SAFETY_RULESET.md:
Per docs/CODE_STANDARDS.md:
!ptr stylemodule_action_noun(), snake_case vars)Per docs/ERROR_CODES_CATALOG.md:
ZR_OK (0) for successZR_ERR_* codes for failuresCheck for absence of:
// WRONG: OS header in core
#include <unistd.h>
// WRONG: Platform ifdef in core
#ifdef _WIN32
// WRONG: Forbidden libc in core
printf("debug: %d\n", x);
// WRONG: Unchecked arithmetic
size_t new_size = size + extra; // might overflow
// WRONG: Reading without bounds check
uint32_t val = *(uint32_t*)ptr;
// WRONG: Magic number
if (align > 4096u) return false;
// WRONG: Partial effect before validation
buffer->len = new_len; // before checking if valid
if (!valid) return ZR_ERR_INVALID_ARGUMENT;
## 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]