svd-ai-lab/sim-cli/gui
Claude Code and agent skill by svd-ai-lab/sim-cli
- community
Checking that the SKILL.md file is still in the repository.
Cross-driver GUI actuation for CAE solvers running under sim-cli. Use to click buttons, fill fields, dismiss dialogs, and capture window screenshots against GUI-capable driver windows through `sim exec`.
Install
npx vskill@latest install svd-ai-lab/sim-cli/guiSKILL.md
gui — cross-driver GUI actuation
Whenever the active driver runs with ui_mode=gui (or desktop), sim serve injects a `gui` object into your sim exec namespace alongside session / solver / meshing / model. The object is the same shape across solvers — only the process filter differs — so one skill serves every GUI-capable driver.
/connect advertises it:
If tools doesn't contain "gui", the driver launched headless and the object is absent — don't call it.
When to reach for gui
Three scenarios dominate:
- A blocking dialog is wedging the workflow. A login prompt,
overwrite confirmation, or script-error dialog can pause agent work until someone clicks a button — that someone is you, via gui.
- You need to drive the GUI where the SDK can't. Some workflows
expose a UI-only surface that the driver API does not cover.
- You need a per-window screenshot.
sim screenshotcaptures the
whole desktop. SimWindow.screenshot() captures just the window you care about — cheaper to read, less visual clutter for the LLM.
If the SDK has a programmatic path (session.tui.*, model.solve(), ModelUtil.loadCopy()), prefer that. gui is for the UI-only surface that the SDK doesn't cover.
Remote equivalence
gui is in the session namespace on the sim serve side. You talk to it via the existing /exec HTTP channel:
No new endpoint, no new protocol — the same API shape from anywhere the agent runs.
Requirement on the server host: sim serve must run in a real interactive desktop session (normal login or RDP). Windows service / SSH session 0 has no desktop, so pywinauto can't enumerate any windows even though the solver processes are running. This is the same constraint GUI-capable drivers document.
API
Discover what the controller is looking at
Find a window (polled until timeout)
title_contains is a plain substring match (case-sensitive, any language). Returns None if nothing matched — always check before calling methods on it:
Act on a window
Every action returns {ok: bool, ...}. No exceptions unless you pass invalid Python types — surface ok=False + error to the agent.
Each action method tries the most natural pywinauto strategy first (button_by_title) and falls back to a broader match (any_control_by_title) before giving up — the response tells you which path worked via the strategy field.
Full UIA dump
Expensive but sometimes necessary for reasoning about an unfamiliar GUI:
Use this when find(title) misses and you need to see what the GUI actually exposes.
Handle metadata
SimWindow fields you can read without another round-trip:
Typical patterns
Pattern 1 — dismiss a blocking login dialog
Pattern 2 — confirm a "file exists, overwrite?" dialog
Pattern 3 — walk the solver UI tree to find an unexpected control
Pattern 4 — capture only the solver window for the agent to read
Error handling
Every call returns a dict; failures look like {"ok": False, "error": "connect(handle=...) failed: ..."}. The UIA machinery runs in an isolated subprocess so a COM glitch in one call never poisons the next.
Things that commonly make ok false:
| Symptom | Likely cause | What to do | |
|---|---|---|---|
find returns None | title didn't match / process filter too strict | print gui.list_windows() to see what is live | |
click says no control titled ... in hwnd=... | the button label in the UI is not what you think | snapshot the window, read controls[*].name | |
screenshot returns minimal PNG | window is minimized (pywinauto captures the window rect; min'd windows live at (-32000, -32000, …)) | dlg.activate() first, then screenshot | |
gui.available is False | off-Windows host, or pywinauto not installed | don't use gui — fall back to SDK-only path | |
list_windows() returns [] even though the solver clearly launched | sim serve was started from an SSH / non-interactive Windows session — the GUI exists in a session with no display surface and pywinauto can't see it | ask the operator to restart sim serve from a desktop session (RDP, Windows Terminal, or Task Scheduler with "run only when user is logged on" + interactive). See `../SKILL.md` → "Where `sim serve` runs". Do not retry. | |
screenshot returns a uniformly black PNG | same as above — non-interactive session has no compositor | same fix |
Pitfalls
- Don't guess button labels. Windows localisation is real. Use
gui.snapshot() to confirm the actual accessible name before calling click(name).
- Don't assume single window. Some solvers open extra floating
panels. find(title) returns the first match; if the workflow is ambiguous, use list_windows() and pick by pid.
- Don't rely on `gui` for SDK-shaped work. Solver objects (
session,
model) are always faster and more reliable than UI clicks. gui is the fallback for the UI-only surface.
- Remote servers need a real desktop. If
sim serveruns from an
SSH session, a Windows service, or any non-interactive context, the spawned solver process inherits a session with no display surface. pywinauto then finds zero windows, screenshots come back uniformly black, and find(...) silently times out — the server itself is up and reachable, only the GUI half is dead. Restart sim serve from a desktop session (Windows Terminal on the console, RDP, or Task Scheduler with "run only when user is logged on" + interactive). See `../SKILL.md` → "Where `sim serve` runs" for the full driver-by-driver matrix.
Related skills
- Solver skills list the dialogs that a given driver is known
to pop. Check those for recipes before inventing your own.
sim.inspectprobes (issue #8awindow_observed, #8b screenshots)
tell you what is on screen — read them first, then reach for gui to act.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/sim/_skills/sim-cli/gui/SKILL.md
Popularity
- Repository stars
- 223
- Repository forks
- 22
- 7-day trend score
- 27
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/svd-ai-lab/sim-cli/gui)