input

An input system for an isometric game that turns touch, mouse, pen, keyboard, and camera actions into replayable tile-based simulation events. An isometric game shows a three-dimensional-looking world from an angled view.

In plain words
What is it for?
Wiring taps, drags, pinch-zoom, wheel zoom, keyboard controls, camera movement, and placement or selection interactions.
Why use it?
It keeps input handling separate from the game world and delivers gestures on simulation ticks, helping avoid missed or duplicated actions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/plausibleventures/lattice/input
Any agent
npx skills add plausibleventures/lattice --skill input
Clone the repo
git clone --depth 1 https://github.com/plausibleventures/lattice

Made for: Claude Code, Codex.

Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,532 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00090 $0.04532
Opus 5 $0.00045 $0.02266
Sonnet 5 $0.00018 $0.00906
Haiku 4.5 $0.00009 $0.00453

Measured 2d ago against content hash db465d0b65e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

input scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/input/SKILL.md · 376 lines

How it starts

The opening of the file, as written. The whole thing — 376 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Input

Every way a person can touch a game — finger, mouse, pen, key — arrives as one replayable stream of intents in tile coordinates, bucketed to simulation ticks, behind one object that unbinds all of it.

The two properties that shape everything else:

  • Input never learns what is in the world. There is no registry, no rect, no pickable flag and no hit callback — so an implementation that caches hit boxes during the draw pass cannot be built on it, because there is nowhere to put them and nothing that would read one. (In the source game that cache made every collect bubble untappable in a backgrounded tab.) terrain is not an exception: a heightfield is the shape of the ground, a parameter of the projection in the same sense the camera is, and no hit box can be stored in one or recovered from it.
  • Gestures are delivered on simulation ticks, never on frames. So a tap cannot be dropped by a slow frame or fired twice on a fast one.

The five lines a game writes

import { createInput } from '@latticekit/input';
import type { Camera, HeightField } from '@latticekit/iso';
import type { Loop } from '@latticekit/loop';

export function wire(
  canvas: HTMLCanvasElement,
  camera: Camera,
  loop: Loop,
  land: HeightField,
  maxHeightPx: number,
): void {
  const input = createInput({
    element: canvas,
    camera,
    step: loop,                    // the loop itself, so the step cannot drift
    terrain: { field: land, maxHeightPx },   // or 'flat'. Never nothing — see below
    actions: { place: ['tap', 'key:Space'], cancel: ['key:Escape'] },
  });

  input.onAction('place', (a) => {
    if (!a.onGround) return;       // the pointer was on the sky: gx/gy are NaN
    void a.gx;
    void a.gy;
  });
  loop.onUpdate((_dt, tick) => input.tick(tick));
  loop.onRender((_alpha, _time, nowMs) => input.frame(nowMs));

  // Under Vite: without this a hot reload leaves a zombie game drawing and not responding.
  if (import.meta.hot) import.meta.hot.dispose(() => input.dispose());
}

Read the full file on GitHub · 376 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 376 lines · 90 tokens per session scan A db465d0b65e0

Subscribe to this mod's changes

input is a skill published in the GitHub repository plausibleventures/lattice (35 stars, last pushed 10d ago), licensed MIT. It adds 90 tokens to every session and 4,532 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

gameobject-component-destroy

Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.

IvanMurzak/Unity-MCP · 49 tokens

assets-create-folder

Create a new folder under a parent folder inside 'Assets/'. The parent path must start with 'Assets/' and every intermediate folder in it must already exist. Refreshes the AssetDatabase at the end and returns the GUID(s) of the created folder(s).

IvanMurzak/Unity-MCP · 55 tokens

assets-prefab-instantiate

Instantiate a prefab into the currently active scene at an optional position/rotation/scale, parented under an optional scene GameObject path. Use 'assets-find' to locate the prefab asset first.

IvanMurzak/Unity-MCP · 46 tokens

assets-prefab-save

Save the currently opened prefab edit stage back to its prefab asset without exiting the stage. Pair with 'assets-prefab-open' to enter the edit mode first.

IvanMurzak/Unity-MCP · 37 tokens

console-get-logs

Retrieve Unity Editor logs from the MCP plugin's LogCollector, optionally filtered by log type or time window. Useful for debugging and monitoring Editor activity.

IvanMurzak/Unity-MCP · 35 tokens

gameobject-component-list-all

List the fully-qualified C# type names of every concrete UnityEngine.Component subclass available in the project. Paginated (default 5/page, max 500). Use this to find a valid componentName for 'gameobject-component-add'.

IvanMurzak/Unity-MCP · 57 tokens