matterjs

matterjs is a skill for Claude Code, Codex from devinilabs/pro-skill. It costs 39 tokens per session (511 once invoked), scanned A, a copy of matterjs, MIT.

A JavaScript library for simulating two-dimensional physics, such as falling bodies, collisions, constraints, and mouse interaction.

In plain words
What is it for?
Use it to create interactive canvas scenes, draggable objects, constrained bodies, and physics-based game interactions.
Why use it?
It handles the movement and collisions of objects so you do not have to build that physics logic yourself.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create interactive canvas scenes, draggable objects, constrained bodies, and physics-based game interactions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/devinilabs/pro-skill/matterjs
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.

Any agent
npx skills add devinilabs/pro-skill --skill matterjs
Clone the repo
git clone --depth 1 https://github.com/devinilabs/pro-skill

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for matterjs

README.md
[![agentmods](https://agentmods.dev/badge/skills/devinilabs/pro-skill/matterjs.svg)](https://agentmods.dev/skills/devinilabs/pro-skill/matterjs)
Your own site
<a href="https://agentmods.dev/skills/devinilabs/pro-skill/matterjs"><img src="https://agentmods.dev/badge/skills/devinilabs/pro-skill/matterjs.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 511 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.1 $0.00039 $0.00511
Opus 5 $0.00019 $0.00255
Sonnet 5 $0.00008 $0.00102
Haiku 4.5 $0.00004 $0.00051

Measured 4d ago against content hash eeb1d2f6521e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

matterjs 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 4d 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.

Origin

This is a copy

100% identical to matterjs — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

agent-skills/web-design/matterjs/SKILL.md · 67 lines

What it actually says

Matter.js Skill

Workflow

  1. Confirm environment (plain HTML, React, or canvas-only) and rendering approach (Matter.Render for debug vs custom renderer).
  2. Provide a minimal Engine/World/Render/Runner setup and add bodies.
  3. Add interactions (mouse constraint) or constraints only if requested.
  4. Share cleanup steps for SPA or teardown scenarios.

Minimal setup

<script>
  const { Engine, Render, Runner, Bodies, Composite } = Matter;

  const engine = Engine.create();

  const render = Render.create({
    element: document.body,
    engine: engine,
    options: {
      width: 800,
      height: 600,
      wireframes: false
    }
  });

  const runner = Runner.create();
  Runner.run(runner, engine);
  Render.run(render);

  const ground = Bodies.rectangle(400, 610, 810, 60, { isStatic: true });
  const box = Bodies.rectangle(400, 200, 80, 80);

  Composite.add(engine.world, [ground, box]);
</script>

Common patterns

  • Use Composite.add(engine.world, [...]) to add bodies to the world.
  • Use Render.create({ element, engine }) to create a canvas automatically, or pass a canvas you create yourself.
  • Set render.options.wireframes = false for solid rendering.
  • Use Runner.run(runner, engine) for a simple loop, or call Engine.update in your own loop if you need custom timing.

Mouse interaction (optional)

const { Mouse, MouseConstraint } = Matter;
const mouse = Mouse.create(render.canvas);
const mouseConstraint = MouseConstraint.create(engine, { mouse });
Composite.add(engine.world, mouseConstraint);
render.mouse = mouse;

Cleanup checklist (SPA)

  • Stop the runner with Runner.stop(runner).
  • Remove the render canvas from the DOM.
  • Clear engine and world if needed.

Questions to ask when specs are missing

  • What viewport size and scaling should the canvas use?
  • Are we using Matter.Render or a custom renderer?
  • Do you want mouse/touch drag interaction?
  • Should the simulation loop be paused when offscreen?
Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 67 lines · 39 tokens per session scan A eeb1d2f6521e

Subscribe to this mod's changes

matterjs is a skill published in the GitHub repository devinilabs/pro-skill (23 stars, last pushed 25d ago), licensed MIT. It adds 39 tokens to every session and 511 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to matterjs, differing in 0 lines, and is treated as a copy.