matterjs
MengTo/Skills · Agent Skill
Utilizza Matter.js per creare interazioni e comportamenti di layout fisicamente basati.
Vai all'installazione ↓Panoramica
| Autore | |
|---|---|
| Repository | MengTo/Skills ↗ |
| Cartella dello skill | matterjs |
| Stelle | 7038 |
| Fork | 819 |
| File inclusi | 4 |
| Licenza | MIT |
| Aggiornato | 25 ottobre 2026 |
| Link | Sorgente dello skill ↗ · Repository ↗ |
Verifica Mozgi
Cosa abbiamo trovato nei file dello skill. I dettagli con l’abbonamento.
Installazione
Uno skill è una cartella con un file SKILL.md. Scegli il tuo agente ed esegui i comandi in un terminale (macOS, Linux o Git Bash su Windows) dalla radice del progetto.
Incolla il prompt in Claude, Codex o un altro assistente: controllerà lo skill e lo installerà.
Install the “matterjs” skill from mozgi.io (https://mozgi.io/skills/mengto-matterjs/) for me. 1. Download the archive: https://mozgi.io/skills/mengto-matterjs/download If it fails, take the skill folder from the source: https://github.com/MengTo/Skills/tree/main/agent-skills/web-design/matterjs 2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me. 3. Put the “matterjs” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.). 4. Make sure <skills folder>/matterjs/SKILL.md exists. 5. Briefly tell me what this skill does and offer to try it on my task. If you cannot do a step yourself, tell me what to click or type.
git clone --depth 1 --branch main https://github.com/MengTo/Skills.git /tmp/Skills mkdir -p .claude/skills cp -r /tmp/Skills/agent-skills/web-design/matterjs .claude/skills/matterjs
Riavvia Claude Code: lo skill compare nell'elenco; per richiamarlo a mano usa /matterjs. Per tutti i progetti: ~/.claude/skills.
git clone --depth 1 --branch main https://github.com/MengTo/Skills.git /tmp/Skills mkdir -p .agents/skills cp -r /tmp/Skills/agent-skills/web-design/matterjs .agents/skills/matterjs
Codex cerca gli skill in .agents/skills dalla cartella corrente fino alla radice del repo; richiamalo con /skills o $matterjs. Per tutti i progetti: ~/.agents/skills.
git clone --depth 1 --branch main https://github.com/MengTo/Skills.git /tmp/Skills mkdir -p .cursor/skills cp -r /tmp/Skills/agent-skills/web-design/matterjs .cursor/skills/matterjs
Cursor carica lo skill all'avvio; richiamalo con “/” nella chat Agent. Cursor legge anche .claude/skills e .agents/skills. Per tutti i progetti: ~/.cursor/skills.
git clone --depth 1 --branch main https://github.com/MengTo/Skills.git /tmp/Skills mkdir -p .gemini/skills cp -r /tmp/Skills/agent-skills/web-design/matterjs .gemini/skills/matterjs
Gemini CLI propone di attivare lo skill quando il compito corrisponde: tu confermi. Per tutti i progetti: ~/.gemini/skills.
Leggi SKILL.md e i file correlati prima di installare. Clicca un file per l'anteprima.
Contenuto di SKILL.md
Testo originale dell'autore · sola letturaMatter.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 acanvasyou create yourself. - Set
render.options.wireframes = falsefor solid rendering. - Use
Runner.run(runner, engine)for a simple loop, or callEngine.updatein 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?
Domande frequenti
Che cosa fa lo skill matterjs?
Utilizza Matter.js per creare interazioni e comportamenti di layout fisicamente basati.
Come si installa matterjs?
Apri il blocco “Installazione” in questa pagina e scegli il tuo agente — Claude Code, Codex, Cursor o Gemini CLI — per i comandi pronti che copiano la cartella dello skill nel posto giusto. Oppure copia il prompt dalla scheda “Con l'assistente” e lascia che sia l'assistente a controllare e installare lo skill.
Con quali modelli AI funziona matterjs?
Gli skill sono semplici istruzioni in Markdown (formato Agent Skills), quindi matterjs funziona con qualsiasi agente che legge SKILL.md: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode e altri. Il modello carica le istruzioni solo quando il compito corrisponde alla descrizione dello skill.
matterjs è gratuito?
Lo skill è pubblicato apertamente da MengTo con licenza MIT. Lo skill in sé non costa nulla: paghi solo il tuo fornitore AI per i token usati.
È sicuro installare gli skill?
Uno skill è un insieme di istruzioni che il tuo agente seguirà: leggi SKILL.md e i file correlati prima di installarlo. Gli script nella cartella dello skill vengono eseguiti solo se li esegue l'agente: controlla cosa fa e non concedere permessi superflui.
In cosa differisce uno skill da un server MCP o da un plugin?
Un server MCP o un plugin danno al modello nuovi strumenti: codice che viene eseguito e restituisce un risultato. Uno skill fornisce conoscenza e metodo: come affrontare il compito, quali passi seguire e com'è un buon risultato. Non servono server né chiavi API.