dev-ui-review
Code quality, correctness, and documentation review for UI lessons — run before dev-final-pass
от Nebulavenus★ 51 звезда на GitHub
Установить dev-ui-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Run a UI-specific quality review on a UI lesson before running /dev-final-pass.
This skill catches the recurring code quality, correctness, and documentation
issues specific to the forge_ui / forge_ui_ctx libraries and their callers.
It is not a replacement for /dev-final-pass — it covers the UI-domain concerns
that the general final pass does not.
The user provides:
- Lesson number or name (e.g.
12orauto-widget-layout)
If missing, infer from the current branch name or most recent UI lesson directory.
How to run this skill
Work through the three phases below in order. Each phase launches parallel agents. After each phase, validate findings, apply fixes, then have the agents revalidate. Repeat until no more issues are found.
Use a Task agent (model: haiku) for builds, test runs, and linting — never run those directly from the main agent.
Be literal and exhaustive. This is C — no RAII, no garbage collector. Every resource you acquire must be released on every exit path, every struct field must be documented, every error must be handled. Do not rationalize away findings with "it's probably fine." If the check says every function, check every function.
Phase 1 — Code correctness sweep
Spawn one agent per concern to review every function added or modified in
common/ui/forge_ui.h, common/ui/forge_ui_ctx.h, the lesson's main.c, and
the relevant test files. Each agent works independently and reports findings.
Agent 1: Memory safety
- Buffer overflows, out-of-bounds access, use-after-free
- Array index bounds relative to capacity/count fields
- Pointer arithmetic that could go out of range
- String operations without length checks
Agent 2: Parameter validation
- NULL pointer dereference on every function parameter
- Integer overflow or underflow on size/count parameters
- Negative dimensions, zero denominators, empty arrays
- Functions that silently accept invalid state
Agent 3: Bug detection
- Off-by-one errors in loops and index calculations
- Incorrect operator precedence in compound expressions
- Copy-paste errors (wrong variable name in repeated blocks)
- Incorrect comparison operators (< vs <=, == vs !=)
- Integer truncation or implicit narrowing conversions
Agent 4: Undefined behavior
- Signed integer overflow
- Shift amounts exceeding type width
- Uninitialized variables read before assignment
- Strict aliasing violations
- Division by zero without guards
Agent 5: Resource cleanup
- Every
SDL_malloc/SDL_calloc/SDL_reallochas a matchingSDL_freeon every exit path — baremalloc/freemust not be used; the codebase uses SDL's allocation functions exclusively - Every dynamically allocated array inside a struct is freed with
SDL_freewhen the struct is destroyed - Early-return paths release all resources allocated before the return
- Cleanup functions handle partially initialized state (NULL fields)
After collecting findings from all five agents:
- Validate — review each finding to confirm it is a real issue
- Fix — apply corrections to the source files
- Revalidate — have the agents re-check the fixed code
- Repeat until zero findings remain
- Add tests — write tests covering every function reviewed and every issue found. Ensure callers of these functions check return values.
Phase 2 — Verification checks
Spawn one agent per check to verify the following across all changed files. The scope for each check is specified in its description.
Check 1: Test return value assertions
Scope: all test files in tests/ui/
For setup and success-path code, wrap forge_ui_* / forge_ui_ctx_* calls that
return false on failure with ASSERT_TRUE(...) so tests fail immediately on
unexpected errors.
For negative-path tests that intentionally trigger failures, assert the expected
failure explicitly with ASSERT_FALSE(...) (or equivalent).
What to look for:
- Bare calls like
forge_ui_ctx_init(&ctx, ...)without checking the return - Calls inside helper functions that swallow the return value
- Setup code that calls library functions but does not propagate failures
Check 2: Magic numbers in tests
Scope: all test files in tests/ui/
Numeric literals representing reusable or semantically meaningful tuning
parameters (buffer sizes, dimensions, thresholds, domain constants) should be
defined as #define or enum at the top of the relevant test section. Other
test sections in the same file already follow this convention — new code must
match. One-off literals in a single tightly scoped assertion are acceptable
when they remain clear and do not obscure intent.
Acceptable bare numbers:
0,1,-1as trivial loop/comparison values- Array indices into small known-size arrays
- Mathematical constants inherent to formulas (e.g.
2.0fin2 * pi)
Unacceptable bare numbers:
- Widget dimensions (
200, 300) - Font sizes (
16.0f) - Color v
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл dev-ui-review?
Code quality, correctness, and documentation review for UI lessons — run before dev-final-pass
Как установить скилл dev-ui-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dev-ui-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…