Agent Skill
2/7/2026

gui-agent-code-review

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 automation code, vision agent code, or PyAutoGUI-based automation. Provides domain-specific review criteria covering prompts, debugging, context management, action design, and coordinate systems.

Z
zlyv587
0GitHub Stars
1Views
npx skills add zlyv587/marketplace

SKILL.md

Namegui-agent-code-review
DescriptionThis 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 automation code, vision agent code, or PyAutoGUI-based automation. Provides domain-specific review criteria covering prompts, debugging, context management, action design, and coordinate systems.

name: gui-agent-code-review version: 1.0.0 description: | 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 automation code, vision agent code, or PyAutoGUI-based automation. Provides domain-specific review criteria covering prompts, debugging, context management, action design, and coordinate systems.

GUI Agent Code Review

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.

When to Use

Apply this skill when reviewing:

  • Changes to core agent logic (main orchestrator, context manager)
  • LLM prompt modifications (system prompts, planning prompts)
  • New action types or input controller changes
  • Screenshot handling or coordinate system changes
  • Context management or token optimization code
  • Any pull request to a GUI automation project

Review Process

1. Identify Changed Domains

First, categorize the changes by domain:

DomainFiles/PatternsKey Concerns
PromptsSYSTEM_PROMPT, *_PROMPT, prompt stringsClarity, token efficiency, structured output
DebuggingExecutor, error handling, loggingFailure traceability, recovery paths
Contextcontext_manager.py, history handlingKV-cache stability, token budget, compression
ActionsActionType, InputController, _* methodsSchema consistency, PyAutoGUI safety
ScreenshotsScreenController, grid overlay, coordinatesNormalized coords, resolution handling

2. Apply Domain-Specific Criteria

For each domain touched by the changes, apply the relevant review criteria from the checklist in references/review-checklist.md.

3. Assess Cross-Domain Impact

Check for cross-domain concerns:

  • Prompt → Action: Do prompt instructions match available action types?
  • Action → Screenshot: Do new actions handle coordinate normalization?
  • Context → Prompt: Does context compression preserve critical prompt info?
  • Screenshot → Debugging: Are coordinates logged for failure analysis?

4. Provide Structured Feedback

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]

Quick Reference: Critical Checks

Prompts (from prompt-engineer domain)

  • Clear, unambiguous instructions
  • Structured output format specified (JSON schema)
  • Token-efficient (no redundant examples)
  • Consistent terminology with codebase

Debugging (from plan-debugger domain)

  • Errors include context (what was attempted, what failed)
  • Screenshots saved before/after actions
  • Action results logged with coordinates
  • Recovery paths for common failures

Context (from context-optimizer domain)

  • Stable prefix never modified after init
  • History compression preserves task-critical info
  • Token budget respected (check ContextConfig)
  • Checkpoint/restore compatibility maintained

Actions (from action-designer domain)

  • ActionType enum updated for new actions
  • NextAction model has required fields
  • InputController.execute() handles new type
  • Appropriate action_delay after execution
  • Error handling returns (False, "message")

Screenshots (from screenshot-analyzer domain)

  • Coordinates normalized (0.0-1.0 range)
  • Grid overlay respects add_grid parameter
  • Resolution-independent calculations
  • Pixel conversion uses screen dimensions

Common Issues by Domain

Prompt Issues

IssueDetectionFix
Ambiguous instructionsMultiple valid interpretationsAdd explicit constraints
Missing output formatNo JSON schema referenceAdd Pydantic model reference
Token bloatRepeated examplesUse single clear example

Debugging Issues

IssueDetectionFix
Silent failuresBare except:Log error, return (False, str(e))
Missing contextError lacks action infoInclude action type and params
No screenshotsFailed action without visualCall _save_screenshot before action

Context Issues

IssueDetectionFix
Prefix mutationSystem prompt modified mid-sessionMake prefix immutable after init
Aggressive compressionTask info lostIncrease min_recent_pairs
Token overflowContext exceeds max_tokensTrigger compression earlier

Action Issues

IssueDetectionFix
Missing enum valueNew action not in ActionTypeAdd to enum class
Unhandled in executeNo elif branchAdd dispatch case
No delayImmediate return after actionAdd time.sleep(config.action_delay)

Screenshot Issues

IssueDetectionFix
Pixel coordinatesValues > 1.0Normalize: x / screen_width
Grid misalignmentLabels don't match positionsCheck font offset calculation
Resolution assumptionsHardcoded 1920x1080Use pyautogui.size()

Integration with Agents

This skill encodes knowledge from five specialized agents. For deeper analysis, invoke the relevant agent:

DomainAgentWhen to Escalate
Promptsprompt-engineerMajor prompt rewrites, new LLM integrations
Debuggingplan-debuggerComplex failure patterns, execution traces
Contextcontext-optimizerToken budget redesign, compression algorithms
Actionsaction-designerNew action types, PyAutoGUI patterns
Screenshotsscreenshot-analyzerCoordinate system changes, grid overlay updates

Note: These agents are defined in the project's agents/ directory as part of the gui-agent-dev plugin.

Additional Resources

Reference Files

For detailed review criteria and checklists, consult:

  • references/review-checklist.md - Complete checklist with all criteria by domain
  • references/common-patterns.md - Code patterns to look for and their implications

Project Documentation

These project-level files provide additional context:

  • docs/ARCHITECTURE.md - System architecture overview (if available)
  • Agent files in agents/ - Domain-specific expertise for deeper analysis
Skills Info
Original Name:gui-agent-code-reviewAuthor:zlyv587