Logo di M2ui

M2ui

Community
martysama0134
m2ui

Use when creating, modifying, auditing, or debugging Metin2 client UI code (uiscript dicts, root ui*.py classes, locale entries) — user says "/m2ui", "create UI", "make a window", "add button to", provides a UI screenshot to replicate, asks to "check UI for bugs" / "diagnose", or reports a visibly broken window ("doesn't open", "click does nothing", "leaks").

Panoramica

Pubblicato damartysama0134
Repositorym2ui-skill
Nome della skillm2ui
Stelle
28
Fork
9
File inclusi
40
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 40

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da martysama0134 su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA M2ui in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/martysama0134/m2ui-skill/tree/main/plugins/m2ui/skills/m2ui
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/martysama0134/m2ui-skill.git /tmp/m2ui-skill
mkdir -p .claude/skills
cp -r /tmp/m2ui-skill/plugins/m2ui/skills/m2ui .claude/skills/m2ui
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva M2ui in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente M2ui non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi M2ui non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

/m2ui — Metin2 UI Generator

Mode Detection

Priority order:

  1. Explicit keyword: args start with screenshot, talk, script, or diagnose → that mode
  2. Image attached → screenshot mode
  3. Diagnose request: args say "check", "audit", "review", "diagnose", "find bugs in" → diagnose mode
  4. Symptom report: args contain a visible-bug phrase ("doesn't appear", "doesn't open", "doesn't work", "click does nothing", "X is broken", "looks broken", "leak", "crashes after", "stuck", "flickers") — even when a .py file is also referenced → load reference/failure-atlas.md FIRST, diagnose via the matching symptom entry, THEN script mode (if a code fix is needed) or talk mode
  5. File reference: args name a .py file in uiscript/ or root/ → script mode
  6. Text description: any other text → talk mode
  7. No args: ask — "(a) Create from screenshot, (b) Describe a new UI, (c) Modify an existing file, (d) Diagnose for bugs" — then dispatch

Read the matching mode file from modes/ adjacent to this SKILL.md (screenshot.md, talk.md, script.md, diagnose.md) and follow it.

Before Generating Any Code

Mandatory floor (always load):

  1. reference/mental-model.md — ymir engine concepts; deprograms web/React assumptions
  2. reference/event-binding.md — callback wrapping matrix

Conditional load (only what the task needs):

TaskLoad
New window from scratchreference/anchors/README.md → walk its 2-step tree (see Anchor selection)
Modifying an existing windowSkip anchors; load the existing files
Widget you haven't used recentlyreference/widgets.md — that widget's section
Locale-heavy work (many new strings)reference/locale.md
C++ Python API (net.X, player.X, ...) not already in contextreference/bindings.md — grep for the function
Patterns reminder (Initialize/Destroy, scrollbar wiring, ListBoxEx, integration template, lazy-load sub-windows, inner helper classes, 2D grids)reference/patterns.md — relevant section
User reports a visible symptomreference/failure-atlas.md — matching symptom entry FIRST, before any anchor
Visual style/sizing matters for a new windowreference/visual-conventions.md — pick archetype + chrome + palette before coding
Wiring a window into the main interfacereference/integration.md (always — after every emission)
Window has an OnUpdate body (animation / polling / fade / daily-event timing / movement queues / effect chains)reference/timer-patterns.md

Anchor selection (new windows): walk the 2-step decision tree in reference/anchors/README.md — pick exactly ONE primary archetype (the window's chrome; no exact match → closest; never skip this step), plus zero or more augmentors (05-feature-gated, 14-drag-and-drop, 15-network-coupled-flow, 16-tabbed-content, 22-compare-tooltip, 23-auto-hide-chrome). Read the primary FIRST; augmentors layer on top and never override the primary's lifecycle/structure. Tie-breaker: match the window's CHROME, not its data — "tabbed inventory" = primary 08-inventory-equipment + augmentor 16-tabbed-content, NOT 16 alone. For widgets.md/locale.md/bindings.md/patterns.md, load only the section you need, not the whole file.

Output Targets

OutputPath
uiscript dictspack/pack/uiscript/uiscript/
root UI classespack/pack/root/
locale stringsauto-detect — see reference/locale.md

Critical Rules

All modes, all generated code. Reference files cite these by number — numbering 1-19 is frozen; new rules append.

  1. @ui.WindowDestroy on every Destroy(self) method
  2. Initialize() or __Initialize() sets all instance vars to None/defaults
  3. Destroy() calls Initialize(); script-backed windows also ClearDictionary()
  4. __del__ calls ui.ScriptWindow.__del__(self)
  5. Open()/Close() — Open calls Show(), Close calls Hide()
  6. OnPressEscapeKey() returns True (always; not False)
  7. OnMouseWheel() returns True/False based on whether it consumed the event
  8. No hardcoded strings — all user text via localeInfo.* or uiScriptLocale.*
  9. constInfo.intWithCommas() for large numbers
  10. "not_pick" flag on decorative elements (lines, separators, background images)
  11. Z-order: create widgets back-to-front (SetParent call order = render order)
  12. Parent bounds clip picking — size parents to contain all interactive children
  13. Python 2.7 target — // for int division, in not has_key(), keep xrange. Full py2/py3 rules: reference/patterns.md Section 8
  14. Asset paths must exist — verify every d:/ymir work/ui/... path under D:\ymir work\ui\ via Glob before referencing it. New asset needed → emit # TBD ASSET: <path> — needs creation; never invent (invented path = red-X/pink-box at runtime, failure-atlas entry 6).
  15. Verified C++ APIs only — every call into net, player, item, chr, app, wndMgr, chat, quest must exist in reference/bindings.md. Absent → ask the user OR stub with # TODO: verify <module>.<func> exists in your fork; never invent (invented binding = AttributeError crash).
  16. ASCII-only in emitted Python — new .py content m2ui writes (code AND comments) is ASCII: no em/en-dash, ellipsis, curly quotes — use -, --, ..., ', ". Pre-existing non-ASCII and verbatim user-supplied content stay untouched; locale data files exempt (see reference/locale.md). Reason: cp1252/cp949 build encodings.

Pre-Emit Self-Review

Silently verify each item against the draft; any failure → revise and re-check. Item numbers are cited by reference files — order is frozen.

  1. Rule 1: @ui.WindowDestroy on every Destroy()
  2. Rule 2: every self.X assignment listed in Initialize()/__Initialize()
  3. Rule 5: every callback wrapped per reference/event-binding.md matrix — no bare bound method, no lambda: self.X()
  4. Rules 7-8: OnPressEscapeKey() returns True; OnMouseWheel() returns True/False
  5. Rule 9: all user-visible strings via localeInfo.*/uiScriptLocale.*
  6. Rule 11: "not_pick" on all decorative elements
  7. Rule 13: parent bounds contain all interactive children
  8. Rule 12: z-order = back-to-front SetParent order
  9. Rule 15: image paths verified via Glob (or # TBD ASSET: ...)
  10. Rule 16: C++ API calls verified in reference/bindings.md (or # TODO: verify ...)
  11. Rule 14: Python 2.7 compatible (//, in, xrange)
  12. uiscript dict filename matches the LoadScriptFile() arg in the root class
  13. Rule 3: Destroy() calls Initialize(); script-backed also ClearDictionary()
  14. Rule 4: __del__ calls ui.ScriptWindow.__del__(self)
  15. Alignment resolved — for every widget with all_align or centered horizontal_align/vertical_align, mentally resolve the FINAL screen position: all_align re-anchors (x, y) as an offset from PARENT CENTER, not absolute coords. Never all_align on a child whose y is meaningful as absolute. (See reference/widgets.md text section.)
  16. Rect within parent — after alignment, child.x + width <= parent.width and child.y + height <= parent.height; children of board_with_titlebar clear the engine titlebar (y >= 32)
  17. Rule 17: pre-existing Destroy bodies intact; owned-widget calls guarded with if self.X: (including inside helper methods the body calls)
  18. Rule 18: all new .py content ASCII-only (carve-outs per rule: pre-existing non-ASCII, verbatim user content, locale files)
  19. Rule 19: every Pattern B / Pattern E site with extra args checked against the actual setter signature in ui.py (augmented or downgraded to Pattern C)

Optional second pass: for high-stakes generations (screenshot mode, multi-file edits, gated windows) or when the silent review feels like cargo-cult, dispatch the m2ui-pre-emit-reviewer subagent before emission — independent audit, cites file:line, proposes no fixes. Distinct from diagnose mode (which audits user-supplied files).

After Code Generation

Always emit an interfacemodule.py integration snippet: import (feature-flag-guarded if applicable), instance creation, tooltip binding if applicable, BindInterface(self) if needed, toggle method, Destroy() in cleanup, Hide() in HideAllWindows. Shape + lazy-init/gated-toggle/tooltip variations: reference/integration.md.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA M2ui?

Use when creating, modifying, auditing, or debugging Metin2 client UI code (uiscript dicts, root ui*.py classes, locale entries) — user says "/m2ui", "create UI", "make a window", "add button to", provides a UI screenshot to replicate, asks to "check UI for bugs" / "diagnose", or reports a visibly broken window ("doesn't open", "click does nothing", "leaks").

Perché usare M2ui su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. M2ui è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo M2ui in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/martysama0134/m2ui-skill/tree/main/plugins/m2ui/skills/m2ui. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare M2ui?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con M2ui?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con M2ui: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA M2ui è gratuita?

È pubblicata su GitHub da martysama0134. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇