m2ui-skill
martysama0134 · martysama0134/m2ui-skill
Tạo và sửa đổi mã UI client Metin2, bao gồm các từ điển `uiscript` và lớp `ui*.py`, từ mô tả hoặc ảnh chụp màn hình cho các trợ lý lập trình AI khác nhau.
Kỹ năng lập trình AI để tạo và sửa đổi mã UI client Metin2 từ ảnh chụp màn hình, mô tả hoặc script hiện có. Hoạt động với Claude Code, Cursor, Codex, Windsurf, Cline, Copilot và Gemini CLI.
Xem trước
Bạn có thể làm gì với nó
- Tạo các yếu tố UI trò chơi Metin2 mới dựa trên mô tả ngôn ngữ tự nhiên.
- Sửa đổi mã UI Metin2 hiện có bằng cách cung cấp ảnh chụp màn hình hoặc hướng dẫn cụ thể.
- Tự động hóa việc tạo định nghĩa `uiscript` và các lớp UI Python cho phát triển trò chơi Metin2.
Kiểm tra an toàn
Dùng được, nhưng nên đọc ghi chú trước.
- ●Không có giấy phép rõ ràng: hỏi tác giả trước khi dùng cho sản phẩm thương mại.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
/m2ui — Metin2 UI Code Generator
A skill for AI coding assistants that generates and modifies Metin2 client UI code. It works with screenshots, natural language descriptions, or existing scripts — and outputs correct, production-ready uiscript dicts, root ui*.py classes, and locale string entries.
Supported Agents
m2ui works with all major AI coding tools. Each tool picks up the skill through its native integration mechanism:
| Agent | Mechanism | Auto-activates? |
|---|---|---|
| Claude Code | Plugin system (/m2ui skill) | Yes |
| Codex | Plugin in plugins/m2ui/ | Yes |
| Cursor | .cursor/rules/m2ui.mdc | Yes |
| Windsurf | .windsurf/rules/m2ui.md | Yes |
| Cline | .clinerules/m2ui.md | Yes |
| GitHub Copilot | .github/copilot-instructions.md | Yes |
| Gemini CLI | GEMINI.md extension | Yes |
| Any other agent | AGENTS.md at repo root | Read on demand |
All agents share the same reference documentation. The source of truth is rules/m2ui-activate.md — a CI workflow syncs it to each tool's native format automatically.
Installation
Quick Install (recommended)
Paste this to your AI agent:
Install the m2ui skill from https://github.com/martysama0134/m2ui-skill into my project. For Claude Code, register the repo as a marketplace via `/plugin marketplace add ` and then `/plugin install m2ui@m2ui` — the repo ships a ready-to-use `.claude-plugin/marketplace.json` so symlinking alone is NOT enough.
Claude Code
Claude Code does not auto-discover plugins under ~/.claude/plugins/local/. Plugins must be registered via a marketplace and then installed. This repo ships a ready-to-use marketplace descriptor at .claude-plugin/marketplace.json so the same clone serves as both marketplace and plugin source.
Step 1 — clone the repo somewhere local:
# Anywhere on disk; the path doesn't have to be ~/.claude/plugins/local/
git clone https://github.com/martysama0134/m2ui-skill.git /path/to/m2ui-skill
Step 2 — register the marketplace in Claude Code:
/plugin marketplace add /path/to/m2ui-skill
Step 3 — install the plugin from that marketplace:
/plugin install m2ui@m2ui
(The first m2ui is the plugin name; the second is the marketplace name declared in .claude-plugin/marketplace.json.)
Step 4 — restart Claude Code (or run /reload-plugins) to pick up the slash command and skill. Verify with /help — you should see /m2ui in the slash-command list.
To upgrade later: git pull in the cloned dir + restart Claude Code. The marketplace registration persists.
Cursor / Windsurf / Cline / Copilot
These agents look for rule files at your project root. Copy the relevant directories from this repo into your Metin2 project:
# Clone the skill repo
git clone https://github.com/martysama0134/m2ui-skill.git /tmp/m2ui-skill
# Copy the rule files and reference docs to your project root
cp -r /tmp/m2ui-skill/.cursor /tmp/m2ui-skill/.windsurf /tmp/m2ui-skill/.clinerules your-project/
cp -r /tmp/m2ui-skill/.github/copilot-instructions.md your-project/.github/
cp -r /tmp/m2ui-skill/skills your-project/
Alternatively, add as a submodule at your project root and symlink the rule directories.
The rule files are thin pointers that tell the agent to read the full reference docs in skills/m2ui/reference/.
Codex
The Codex plugin is in plugins/m2ui/. Point your Codex configuration to this directory.
Gemini CLI
Install as a Gemini extension using gemini-extension.json at the repo root.
Usage
In Claude Code
m2ui exposes both a slash command and a Skill. They reach the same engine — the slash command is a thin entry point that delegates to the skill, which does the actual work. Use whichever feels natural:
Slash command (discoverable via /help):
/m2ui Interactive mode — asks what you want to do
/m2ui screenshot Analyze an attached image, generate matching UI code
/m2ui talk make a shop window Describe a UI in plain language, get generated code
/m2ui script uimovechannel.py Modify an existing UI file
/m2ui diagnose uixxx.py Audit an existing UI file for memory leaks and anti-patterns
Natural language (the skill auto-activates from context):
use m2ui to make a shop window
m2ui screenshot:
modify uimovechannel.py with m2ui
m2ui diagnose uixxx.py
audit my UI files with m2ui
The keywords (m2ui, screenshot, diagnose), plus a .py file reference, an attached image, or a plain text description drive auto-detection of the right mode (see Auto-Detection below).
In Other Agents
Just describe what you want in natural language. The agent will automatically read the reference docs and follow the m2ui rules:
- "Create a new window with a title bar, three buttons, and a scrollable item list"
- "Add a search bar to the inventory window"
- "Here's a screenshot of a UI from another game — recreate it as Metin2 UI"
Auto-Detection
When no explicit mode is specified, the skill auto-detects from your input:
- Image attached — screenshot mode (analyze and replicate)
- "check"/"audit"/"diagnose"/"find bugs" — diagnose mode (audit for anti-patterns)
- References a
.pyfile — script mode (modify existing) - Text description — talk mode (generate new)
- No input — interactive mode (asks what you want)
Notes
- Restart needed after updates. When you upgrade m2ui (pull a new version, or land a SKILL.md /
commands// metadata change), quit and relaunch Claude Code so the new skill, slash commands, and metadata are picked up. Existing sessions keep the previously-