Uloop Simulate Mouse Input logo

Uloop Simulate Mouse Input

Community
hatayama
uloop-simulate-mouse-input

Simulate mouse clicks, long-press, movement, and scroll in PlayMode through the Input System. Use for gameplay mouse input; --dry-run checks what a Game View point hits. Use simulate-mouse-ui for UI.

Overview

Publisherhatayama
Repositoryunity-cli-loop
Skill nameuloop-simulate-mouse-input
Stars
578
Forks
49
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by hatayama on GitHub. Read the source before you install it.

Installation

Install the Uloop Simulate Mouse Input AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/hatayama/unity-cli-loop/tree/main/.agents/skills/uloop-simulate-mouse-input
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hatayama/unity-cli-loop.git /tmp/unity-cli-loop
mkdir -p .claude/skills
cp -r /tmp/unity-cli-loop/.agents/skills/uloop-simulate-mouse-input .claude/skills/uloop-simulate-mouse-input
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Uloop Simulate Mouse Input in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Uloop Simulate Mouse Input on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Uloop Simulate Mouse Input is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Task

Simulate mouse input via Input System in Unity PlayMode, or dry-run a Game View coordinate against 3D physics without injecting input.

Workflow

  1. When checking what a screenshot coordinate would hit in 3D physics before clicking, run uloop simulate-mouse-input --dry-run --x <x> --y <y> first (EditMode is fine; no Input System required)
  2. Ensure Unity is in PlayMode (use uloop control-play-mode --action Play if not) before injecting real mouse input. Real input requires the Input System package and Active Input Handling set to 'Input System Package (New)' or 'Both'
  3. For Click/LongPress: determine the target Game View input position from annotated SimX/SimY, raycast-grid InputX/InputY, or raw image pixels converted with ScreenshotToInputFormula
  4. Execute the needed uloop simulate-mouse-input commands
  5. Inspect the result with the lightest useful evidence: runtime state, logs, or a screenshot
  6. When this input verifies a state transition, use Pause Point inspection from the section below as the standard frame proof
  7. Report what happened and which evidence was used

Two rules while verifying:

  • Do not touch the physical mouse or keyboard, and keep the OS pointer off the Unity window — real device input mixes into the same Mouse.current state this tool injects.
  • Read the starting values you will assert against immediately before firing the input; a value measured earlier in the session may have changed.

Tool Reference

bash
uloop simulate-mouse-input --action <action> [options]
uloop simulate-mouse-input --dry-run --x <x> --y <y> [--layer-mask <mask>] [--max-distance <distance>]

Parameters

ParameterTypeDefaultDescription
--actionenumClickClick - inject button press+release, LongPress - inject button hold for --duration seconds, MoveDelta - inject mouse delta (one-shot), SmoothDelta - inject mouse delta smoothly over --duration seconds, Scroll - inject scroll wheel
--xnumber0Target X position in Game View pixels (origin: top-left). Used by Click, LongPress, and --dry-run. Use AnnotatedElements[].SimX, or raw image pixels converted with ScreenshotToInputFormula.
--ynumber0Target Y position in Game View pixels (origin: top-left). Used by Click, LongPress, and --dry-run. Use AnnotatedElements[].SimY, or raw image pixels converted with ScreenshotToInputFormula.
--buttonenumLeftMouse button: Left, Right, Middle. Used by Click and LongPress.
--durationnumber0Hold duration for LongPress, or interpolation duration for SmoothDelta (seconds, max 30). For Click, 0 = one-shot tap.
--delta-xnumber0Delta X in pixels for MoveDelta/SmoothDelta. Positive = right.
--delta-ynumber0Delta Y in pixels for MoveDelta/SmoothDelta. Positive = up.
--scroll-xnumber0Horizontal scroll delta for Scroll action.
--scroll-ynumber0Vertical scroll delta for Scroll action. Positive = up, negative = down. Typically 120 per notch.
--dry-runflag-Query 3D physics at --x/--y without injecting mouse input. Works in EditMode and without the Input System package. Skips PlayMode / Input System preflight.
--layer-masknumberUnity default raycast layersPhysics layer mask used by the raycast. Effective only with --dry-run.
--max-distancenumber1000Maximum raycast distance in world units. Effective only with --dry-run.

Actions

ActionWhat it injectsDescription
ClickMouse.current button press → releaseInject a button click so runtime logic detects wasPressedThisFrame
LongPressMouse.current button press → hold → releaseHold a button for --duration seconds
MoveDeltaMouse.current.deltaInject mouse movement delta one-shot
SmoothDeltaMouse.current.delta (per-frame)Inject mouse delta smoothly over --duration seconds (human-like camera pan)
ScrollMouse.current.scrollInject scroll wheel input

Pause Point Inspection (Standard for E2E)

For standard frame proof when this input drives a state transition, follow the uloop-pause-point skill — it covers line placement and interruption semantics. Tool-specific note: if InterruptedByPausePoint: true, Unity is paused; read PressDeliveredToGame before retrying. Clear inspection-only pause points (uloop clear-pause-point --all) before final validation.

When to use this vs simulate-mouse-ui

All rows below assume the New Input System is installed.

ScenarioTool
Click a Unity UI Button (IPointerClickHandler)simulate-mouse-ui
Runtime logic reads Mouse.current.leftButtonsimulate-mouse-input
Runtime logic reads right-clicksimulate-mouse-input --button Right
Drag a UI slidersimulate-mouse-ui --action Drag
Runtime logic reads Mouse.current.deltasimulate-mouse-input --action MoveDelta
Runtime logic reads Mouse.current.scrollsimulate-mouse-input --action Scroll

Dry-run (3D physics hit check)

Use --dry-run to check what a top-left Game View coordinate hits in 3D physics before clicking. This path does not require PlayMode or the Input System package.

  • Requires an active Camera.main.
  • Uses Unity Physics raycasts, not UI EventSystem raycasts.
  • --x / --y use the same top-left Game View input coordinates as Click/LongPress.
bash
# Check what is under a screenshot coordinate
uloop simulate-mouse-input --dry-run --x 960 --y 540

# Check only specific layers
uloop simulate-mouse-input --dry-run --x 960 --y 540 --layer-mask 1

Examples

bash
# Left-click at a representative Game View point (--button Right for right-click)
uloop simulate-mouse-input --action Click --x 400 --y 300

# Hold left-click for 2 seconds
uloop simulate-mouse-input --action LongPress --x 400 --y 300 --duration 2.0

# Scroll up (negative --scroll-y scrolls down)
uloop simulate-mouse-input --action Scroll --scroll-y 120

# Smooth camera pan right over 0.5 seconds
uloop simulate-mouse-input --action SmoothDelta --delta-x 300 --delta-y 0 --duration 0.5

Coordinate System

--x/--y use top-left Game View coordinates: pass AnnotatedElements[].SimX/SimY directly, convert raw screenshot pixels with ScreenshotToInputFormula, and never flip Y in the caller (the tool converts internally). Conversion formula, Device Simulator notes, and how the injected position reads back inside Unity are in references/output-and-coordinates.md.

Prerequisites

  • For real mouse injection: Unity must be in PlayMode, and the Input System package (com.unity.inputsystem) must be installed; game code must read input via Input System API (e.g. Mouse.current.leftButton.wasPressedThisFrame).
  • For --dry-run: an active Camera.main is required; PlayMode and the Input System package are not required.

Output

The response reports Success, Message, Action, the target/injected coordinates, InterruptedByPausePoint/PausePointHits, and — for --dry-run — the resolved camera (CameraName/CameraPath; check these first when a No physics hit looks wrong) plus the physics hit details. Field-by-field semantics are in references/output-and-coordinates.md. Verify visual outcome with a follow-up screenshot.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Uloop Simulate Mouse Input AI skill do?

Simulate mouse clicks, long-press, movement, and scroll in PlayMode through the Input System. Use for gameplay mouse input; --dry-run checks what a Game View point hits. Use simulate-mouse-ui for UI.

Why use Uloop Simulate Mouse Input on TypingMind?

Because you install it once and use it with any model. Uloop Simulate Mouse Input is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Uloop Simulate Mouse Input in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/hatayama/unity-cli-loop/tree/main/.agents/skills/uloop-simulate-mouse-input. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Uloop Simulate Mouse Input?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Uloop Simulate Mouse Input?

As many as you like. As long as a model supports skills, you can use Uloop Simulate Mouse Input with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Uloop Simulate Mouse Input AI skill free?

Yes. It is published on GitHub by hatayama under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇