This skill should be used when the user asks to "review code", "code review", "check my changes", "review this PR", "review my implementation", "PR review", "look at my code", or when reviewing GUI...
A specialized code review skill for GUI automation projects that applies domain-specific criteria across five key areas: LLM prompts, execution debugging, context optimization, action design, and screenshot/coordinate handling.
Apply this skill when reviewing:
First, categorize the changes by domain:
| Domain | Files/Patterns | Key Concerns |
|---|---|---|
| Prompts | SYSTEM_PROMPT, *_PROMPT, prompt strings |
Clarity, token efficiency, structured output |
| Debugging | Executor, error handling, logging | Failure traceability, recovery paths |
| Context | context_manager.py, history handling |
KV-cache stability, token budget, compression |
| Actions | ActionType, InputController, _* methods |
Schema consistency, PyAutoGUI safety |
| Screenshots | ScreenController, grid overlay, coordinates |
Normalized coords, resolution handling |
For each domain touched by the changes, apply the relevant review criteria from the checklist in references/review-checklist.md.
Check for cross-domain concerns:
Format review feedback as:
## Code Review: [file/feature]
### Domain: [domain name]
**Severity**: [Critical/Important/Minor]
**Issue**: [Description]
**Suggestion**: [How to fix]
**Reference**: [Line number or code snippet]
| Issue | Detection | Fix |
|---|---|---|
| Ambiguous instructions | Multiple valid interpretations | Add explicit constraints |
| Missing output format | No JSON schema reference | Add Pydantic model reference |
| Token bloat | Repeated examples | Use single clear example |
| Issue | Detection | Fix |
|---|---|---|
| Silent failures | Bare except: |
Log error, return (False, str(e)) |
| Missing context | Error lacks action info | Include action type and params |
| No screenshots | Failed action without visual | Call _save_screenshot before action |
| Issue | Detection | Fix |
|---|---|---|
| Prefix mutation | System prompt modified mid-session | Make prefix immutable after init |
| Aggressive compression | Task info lost | Increase min_recent_pairs |
| Token overflow | Context exceeds max_tokens | Trigger compression earlier |
| Issue | Detection | Fix |
|---|---|---|
| Missing enum value | New action not in ActionType | Add to enum class |
| Unhandled in execute | No elif branch | Add dispatch case |
| No delay | Immediate return after action | Add time.sleep(config.action_delay) |
| Issue | Detection | Fix |
|---|---|---|
| Pixel coordinates | Values > 1.0 | Normalize: x / screen_width |
| Grid misalignment | Labels don't match positions | Check font offset calculation |
| Resolution assumptions | Hardcoded 1920x1080 | Use pyautogui.size() |
This skill encodes knowledge from five specialized agents. For deeper analysis, invoke the relevant agent:
| Domain | Agent | When to Escalate |
|---|---|---|
| Prompts | prompt-engineer |
Major prompt rewrites, new LLM integrations |
| Debugging | plan-debugger |
Complex failure patterns, execution traces |
| Context | context-optimizer |
Token budget redesign, compression algorithms |
| Actions | action-designer |
New action types, PyAutoGUI patterns |
| Screenshots | screenshot-analyzer |
Coordinate system changes, grid overlay updates |
Note: These agents are defined in the project's agents/ directory as part of the gui-agent-dev plugin.
For detailed review criteria and checklists, consult:
references/review-checklist.md - Complete checklist with all criteria by domainreferences/common-patterns.md - Code patterns to look for and their implicationsThese project-level files provide additional context:
docs/ARCHITECTURE.md - System architecture overview (if available)agents/ - Domain-specific expertise for deeper analysis