mate
Skill này làm gì
Skill này thiết kế một bạn đồng hành hoạt hình tùy chỉnh trên màn hình cho MiMo Desktop. Skill dành cho người muốn có nhân vật thú cưng riêng trên màn hình máy tính.
Khi nào nên dùng
- ✓Khi bạn muốn thiết kế một thú cưng hoặc bạn đồng hành tùy chỉnh trên màn hình.
- ✓Khi bạn muốn một spritesheet gồm các khung hoạt hình cho nhân vật thú cưng.
- ✓Khi bạn muốn thú cưng của mình được nạp vào cài đặt Mate của MiMo Desktop.
Liên kết skill
https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/mate/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn tạo một thú cưng trên màn hình là con cáo cam nhỏ, có hoạt ảnh đứng yên và một cái vẫy tay.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent xây một spritesheet WebP gồm các khung hoạt hình và một manifest mô tả từng hoạt ảnh. Bạn đặt thư mục vào thư mục pets của MiMo Desktop rồi làm mới cài đặt để tải.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Mate Pet Creator
Create animated desktop pet characters for MiMo Desktop's Mate (桌面伙伴) system.
Output Structure
A valid custom pet lives in a folder with this structure:
<pet-id>/
├── manifest.json # Required — animation metadata
└── spritesheet.webp # Required — all animation frames in a grid
The user places this folder in their MiMo Desktop custom pets directory (userData/pets/<pet-id>/), then clicks "Refresh" in Settings → Mate to load it.
Manifest Schema
{
"id": "my-pet",
"name": "My Pet",
"description": "A cute custom pet",
"version": 1,
"spritesheet": "spritesheet.webp",
"frameWidth": 240,
"frameHeight": 240,
"columns": 8,
"totalFrames": 16,
"animations": {
"idle": { "row": 0, "frames": 8, "fps": 8, "loop": true }
}
}
Required Fields
| Field | Type | Description |
|---|---|---|
id |
string | Unique identifier (kebab-case) |
name |
string | Display name |
version |
number | Always 1 |
spritesheet |
string | Filename of the spritesheet image |
frameWidth |
number | Width of each frame in pixels |
frameHeight |
number | Height of each frame in pixels |
columns |
number | Number of columns in the spritesheet grid |
totalFrames |
number | Total number of frames across all animations |
animations |
object | At minimum must include idle |
Optional Fields
| Field | Type | Description |
|---|---|---|
description |
string | Shown in settings UI |
anchorX |
number | Horizontal anchor (0–1, default 0.5) for centering |
Animation Definition
Each animation entry:
| Field | Type | Description |
|---|---|---|
row |
number | Row index in the spritesheet (0-based) |
frames |
number | Number of frames in this animation |
fps |
number | Playback speed (recommended: 6–12) |
loop |
boolean | Whether the animation loops |
The idle animation is required — it plays by default when the pet is loaded.
Spritesheet Layout
- Frames are arranged left-to-right, top-to-bottom in a grid.
- Each row corresponds to one animation (matched by the
rowfield in the animation definition). - All frames must have identical dimensions (
frameWidth × frameHeight). - Transparent background (alpha channel) is required — the pet window has no background.
- Recommended frame size: 240×240 px (renders well at 1× scale on desktop).
- Format: WebP with transparency (lossless or near-lossless for crisp pixel art).
Workflow
Step 1: Understand the Character
Ask the user:
- What animal/creature/character?
- Art style preference (pixel art, cartoon, flat vector, kawaii)?
- Any specific colors or features?
Step 2: Generate the Spritesheet
Use the imagegen skill to generate the spritesheet image. Construct the prompt with these guidelines:
- Request a sprite sheet with specific grid layout (e.g., "8 frames in a single horizontal row, each frame 240×240 pixels")
- Specify transparent background (alpha channel)
- Describe the idle animation motion: gentle breathing, blinking, tail wag, bobbing, etc.
- Keep the character centered in each frame with consistent sizing
- Style: match the user's preference; default to cute/kawaii if unspecified
If the generated image is already WebP, use it directly. If it is PNG or another format, convert to WebP:
# Convert to lossless WebP preserving transparency
cwebp -lossless -q 100 spritesheet.png -o spritesheet.webp
If cwebp is not available, check for sips (macOS Ventura+ supports WebP export):
sips -s format webp spritesheet.png --out spritesheet.webp
If neither tool is available, instruct the user to install one:
brew install webp # provides cwebp
Do NOT silently rename a PNG to .webp — the file must have valid WebP encoding (RIFF/WEBP header). If conversion genuinely cannot be performed, fail explicitly and tell the user what tool to install.
If imagegen is unavailable (skill not enabled or image generation fails), fall back to generating pixel-art frames directly as SVG, then rasterize. Compute dimensions from the manifest:
# Calculate actual spritesheet dimensions from manifest
WIDTH=$((frameWidth * columns))
HEIGHT=$((frameHeight * rows)) # rows = max animation row index + 1
# Rasterize SVG to PNG, then convert to WebP
rsvg-convert -w $WIDTH -h $HEIGHT spritesheet.svg -o spritesheet.png
cwebp -lossless spritesheet.png -o spr
Câu hỏi thường gặp
Thú cưng cần những tệp nào?
Thư mục thú cưng cần một tệp manifest.json và một ảnh spritesheet.webp.
Làm sao để tải thú cưng của tôi?
Đặt thư mục vào thư mục pets tùy chỉnh, rồi nhấn Refresh trong Settings dưới mục Mate.
Thú cưng có cần hoạt ảnh đứng yên không?
Có. Manifest phải có ít nhất một hoạt ảnh idle (đứng yên).
Chi tiết
Mô tả gốc của tác giả
Create custom desktop pet (Mate) characters with spritesheet and manifest. Use when the user asks to 'create a pet', 'make a desktop companion', 'design a mate character', 'generate a spritesheet for my pet', or wants to customize their desktop buddy. Generates a WebP spritesheet + manifest.json that can be loaded by MiMo Desktop's Mate system.
repo: XiaomiMiMo/MiMo-Code
Độ phổ biến
- Sao GitHub
- 14k
- Vị trí xếp hạng
- #11331
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
effect
14kGiúp agent của bạn trả lời câu hỏi về framework TypeScript Effect bằng cách kiểm tra mã nguồn và tài liệu, thay vì dựa vào trí nhớ.
arxiv
14kGiúp agent của bạn tìm, đọc, trích dẫn và theo dõi các bài báo học thuật trên arXiv, gồm tóm tắt, trích dẫn BibTeX, tải PDF và liên kết trích dẫn.
claude-code
14kGiúp agent của bạn giao một tác vụ lập trình cho công cụ dòng lệnh Claude Code, dưới dạng chạy một lần, phiên tương tác hoặc tác vụ nền.
codex
14kGiúp agent của bạn chạy công cụ dòng lệnh OpenAI Codex mà không cần cửa sổ chat, cho tác vụ lập trình, tập lệnh và quy trình tự động.
Skill tương tự
gifgrep
394kCho phép agent của bạn tìm thư viện GIF, xem trước kết quả, tải một GIF, và lấy một khung hình tĩnh hoặc bảng ghép nhiều khung hình.
meme-maker
394kCho phép agent của bạn chọn một mẫu meme, thêm chú thích của riêng bạn và tạo meme dưới dạng ảnh SVG hoặc PNG.
ios-icon-gen
280kGiúp agent tạo biểu tượng cho ứng dụng iOS. Dùng biểu tượng của Apple hoặc từ các nguồn khác để tạo đúng định dạng tệp.