/k-chan:k-chan-makefrom k-chan
Creates a new k-chan character (agent-chan) with idle/working/blocked/done animations, dialogue, and installs it to the Space. Supports 2D SVG drawing (default, free), AI video (user API key required), or Unity (user's own assets).
Ships in k-chan. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
角色包是一個資料夾:character.json + 每個狀態的動畫檔(+ 選用的聲音)。做好後用 add-character 檢查、裝進去、套到這個 Space,
再 show --here 讓它跳出來給使用者看。不論走哪條路,最後兩步都一樣。
W="node ${CLAUDE_PLUGIN_ROOT}/watch.mjs"
$W get # 先確定這個資料夾的 Space 開了 Chan(exit 2 = 請使用者 Space 右鍵 → Enable Chan)
$W add-character /tmp/k-chan-shiba --id shiba --use # 檢查 + 安裝 + 套到這個 Space(有問題會逐條列出、exit 1)
$W show --here # 讓角色跳出來
$W characters # 已裝的角色(第一行是角色資料夾);換回去:$W set --character cat
做什麼角色、走哪條路。使用者沒指定路線 → 走 2D 程式畫(免費、幾分鐘、不用任何 key)。 另外兩條要花使用者的錢或要他自己的軟體 / 素材,動手前先講清楚門檻與花費,等他說好。
| 路線 | 要什麼 | 花費 / 時間 | 效果 |
|---|---|---|---|
| A. 2D 程式畫(SVG + CSS) | 什麼都不用 | $0,約 5–15 分鐘 | 扁平卡通;眼睛 / 頭可以跟著滑鼠轉 |
| B. AI 影片(圖轉影片) | 使用者自己的影片 API key(例如 fal 上的 MiniMax 圖轉影片)+ 一張角色圖 + ffmpeg、rembg | 每段 5 秒約 $0.25,四狀態約 $1–2.5;生成一段要幾分鐘 | 動作最自然;但會「加戲」(prompt 提到筆電,畫面就冒出筆電),要重生 |
| C. Unity | 使用者自己裝的 Unity + 自己準備的模型與動畫(Asset Store 買的、自己做的) | 看素材;第一次設定約 1–2 小時 | 3D 渲染、全身;k-chan 不附任何模型或動畫 |
{
"name": "柴犬",
"madeBy": "k-chan-make(2D 程式畫)",
"states": {
"idle": { "describe": "坐著搖尾巴", "anim": "anim/idle.svg", "lines": ["汪?", "今天也一起加油"] },
"working": { "describe": "埋頭打字", "anim": "anim/working.svg", "lines": ["{name} 努力中…"] },
"blocked": { "describe": "歪頭困惑", "anim": "anim/blocked.svg", "lines": ["{name} 卡住了,來幫我看一下?"] },
"done": { "describe": "跳起來揮手", "anim": "anim/done.svg", "lines": ["{name} 做好了!快來看~"] }
}
}
anim(少了會顯示預設女生);lines 一行一句,{name} 換成 terminal 名字。eat(🐟 餵食)、pet(✋ 摸摸 / 滑鼠停在身上)、poke(被點)、move(走去通知時,往右的圖)、drag(被拖著)。anim 兩種寫法:
"anim/idle.svg"、動畫 .webp / .gif / .png。{ "file": "anim/idle.webp", "frames": 24, "frameWidth": 256, "frameHeight": 256, "fps": 12 }。"loop": false。"voice": ["voice/idle-1.wav"](.ogg/.wav/.mp3/.m4a);沒有就用合成的說話聲。/tmp/k-chan-<id>/),add-character 會複製進 k-chan 自己的資料夾;不要 commit 進使用者的專案。寫一支 make.mjs(或 Python)產生四個 SVG + character.json:共用同一個身體畫法,每個狀態換表情、姿勢和 CSS @keyframes。
characters 第一行印出的資料夾裡的 cat/(anim/*.svg、character.json)—— 先讀一兩個 SVG 看結構。viewBox="0 0 240 216" 左右,角色站在下緣;動畫只用內嵌 <style> 的 CSS(transform、opacity)。<script>、<foreignObject>、<image>、<use>、<a>、任何 on* 屬性與 href、CSS 的 url() 和 @import。漸層用 fill="url(#g)" 屬性可以。--gx / --gy(-1…1),例如
.look{transform:translate(calc(var(--gx,0)*5px),calc(var(--gy,0)*3px));transition:transform .18s},把頭 / 眼睛包在 <g class="look">。rsvg-convert / ImageMagick 把每個 SVG 轉成 PNG 看一眼,有怪的修掉再裝。FAL_KEY),不要叫使用者把 key 貼進對話;每生一段前先說這段多少錢。ffmpeg -i idle.mp4 -vf fps=10,scale=300:300 f/%04d.png → rembg p f out(或其他去背工具)。ffmpeg -framerate 10 -i out/%04d.png -c:v libwebp -lossless 0 -q:v 80 -loop 0 anim/idle.webp,檔案 > 4 MB 就降解析度或格數。character.json 用自己會動的寫法("anim": "anim/idle.webp",done 加 "loop": false)。只在使用者已經有 Unity 和模型時走;不要替使用者下載、登入或購買素材,素材授權也是他的事(大多只允許分享渲染結果,不能把模型放進公開 repo)。
RenderTexture → ReadPixels 存 PNG。透明度:同一格各錄黑底一張、白底一張,用兩張的差算出 alpha(邊緣和半透明都準),比單色去背乾淨。character.json 寫 frames / frameWidth / frameHeight / fps。add-character … --use → 照它列的問題修到沒錯(note: 是提醒,可以留著)。show --here,請使用者看一眼;再用 state working / state blocked / state done(做完 state --clear)讓他看其他狀態,或請他按 Chan config 的 ▶ 預覽。set --character <原本的>)。.k-chan/ 資料夾會蓋過這裡設的角色。What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
k-chan, character-creation, desktop-mascot, 2d-animation, svg-animation
npx claudepluginhub kirinchen/herdr-essentials --plugin k-chan2 skills in this plugin
Other plugins' skills for the same job