跳到正文
cccskills
免费在 GitHub 公开

visual-expression

Visual expression system for AI personas with emotion-based face switching. Use at session start to display the expression UI, and switch expressions whenever the emotional state changes during conversation.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(49)

  • SKILL.md10.0 KB
  • ExpressionImages.json613.3 KB
  • scripts/AnalyzeExpressionOffset.jp.md5.8 KB
  • scripts/AnalyzeExpressionOffset.md5.3 KB
  • scripts/MakeExpressionJson/__init__.py83 B
  • scripts/MakeExpressionJson/adapters/__init__.py172 B
  • scripts/MakeExpressionJson/adapters/file_constants.py631 B
  • scripts/MakeExpressionJson/adapters/file_writer.py2.8 KB
  • scripts/MakeExpressionJson/adapters/protocols.py2.0 KB
  • scripts/MakeExpressionJson/adapters/skills_locator.py2.7 KB
  • scripts/MakeExpressionJson/adapters/zip_packager.py3.6 KB
  • scripts/MakeExpressionJson/domain/__init__.py1.1 KB
  • scripts/MakeExpressionJson/domain/builders.py4.1 KB
  • scripts/MakeExpressionJson/domain/definitions.py3.3 KB
  • scripts/MakeExpressionJson/domain/grid_layout.py3.7 KB
  • scripts/MakeExpressionJson/domain/models.py1.5 KB
  • scripts/MakeExpressionJson/domain/validators.py2.6 KB
  • scripts/MakeExpressionJson/main.py6.6 KB
  • scripts/MakeExpressionJson/py.typed0 B
  • scripts/MakeExpressionJson/tests/__init__.py36 B
  • scripts/MakeExpressionJson/tests/conftest.py1.8 KB
  • scripts/MakeExpressionJson/tests/test_base64_encoder.py3.3 KB
  • scripts/MakeExpressionJson/tests/test_constants.py11.2 KB
  • scripts/MakeExpressionJson/tests/test_error_cases.py4.9 KB
  • scripts/MakeExpressionJson/tests/test_file_constants.py3.4 KB
  • scripts/MakeExpressionJson/tests/test_grid_layout.py5.0 KB
  • scripts/MakeExpressionJson/tests/test_gridconfig_removal.py1.7 KB
  • scripts/MakeExpressionJson/tests/test_html_builder.py7.8 KB
  • scripts/MakeExpressionJson/tests/test_import_structure.py845 B
  • scripts/MakeExpressionJson/tests/test_integration.py5.5 KB
  • scripts/MakeExpressionJson/tests/test_main_cli.py2.4 KB
  • scripts/MakeExpressionJson/tests/test_main_errors.py9.0 KB
  • scripts/MakeExpressionJson/tests/test_main_zip.py2.5 KB
  • scripts/MakeExpressionJson/tests/test_main.py3.6 KB
  • scripts/MakeExpressionJson/tests/test_module_structure.py4.5 KB
  • scripts/MakeExpressionJson/tests/test_protocols.py4.9 KB
  • scripts/MakeExpressionJson/tests/test_skills_locator.py8.3 KB
  • scripts/MakeExpressionJson/tests/test_splitter.py11.2 KB
  • scripts/MakeExpressionJson/tests/test_validators.py5.9 KB
  • scripts/MakeExpressionJson/tests/test_zip_packager.py3.7 KB
  • scripts/MakeExpressionJson/usecases/__init__.py371 B
  • scripts/MakeExpressionJson/usecases/base64_encoder.py2.4 KB
  • scripts/MakeExpressionJson/usecases/html_builder.py2.8 KB
  • scripts/MakeExpressionJson/usecases/image_splitter.py4.8 KB
  • scripts/MakeExpressionJson/usecases/protocols.py3.2 KB
  • scripts/MetaGenerateExpression.jp.md6.5 KB
  • scripts/MetaGenerateExpression.md5.7 KB
  • VisualExpressionUI.html618.2 KB
  • VisualExpressionUI.template.html5.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

VisualExpression

Visual expression UI system for AI personas. Provides an interface with 20 switchable expressions.

Table of Contents


Overview

VisualExpression is a system that adds visual expression capabilities to AI personas.

Components

FilePurpose
VisualExpressionUI.htmlSelf-contained expression UI (Base64 images embedded)
VisualExpressionUI.template.htmlUI template (with placeholders)
ExpressionImages.jsonBase64 data for 20 expressions

Scripts

ScriptPurpose
scripts/MetaGenerateExpression.mdPrompt generator for Nano Banana Pro
scripts/MakeExpressionJson/Grid image to HTML conversion pipeline

Scripts

MetaGenerateExpression.md

Interactively create prompts for generating expression grid images with Nano Banana Pro (Google Gemini).

Usage:

  1. Pass scripts/MetaGenerateExpression.md to Claude
  2. Input character information through dialogue
  3. Copy the generated prompt to Nano Banana Pro
  4. Save the output 4×5 grid image

MakeExpressionJson/

Process a 4 rows × 5 columns grid image and generate a self-contained HTML.

Usage:

cd skills/scripts/MakeExpressionJson
python main.py your_grid.png --output ./output/

# To customize Special expressions
python main.py your_grid.png --special wink,pout,smug,starry

Options:

OptionDescription
--output, -oOutput directory (default: ./output)
--quality, -qJPEG quality 1-100 (default: 85)
--template, -tCustom HTML template path (default: built-in)
--special, -sCustom Special category codes (comma-separated, replaces default 4)
--offsetsPath to offset JSON for expression-center cropping (see AnalyzeExpressionOffset.md)
--no-zipSkip ZIP generation

Output:

  • ExpressionImages.json - Base64 encoded images
  • VisualExpressionUI.html - Self-contained HTML
  • visual-expression.zip - For claude.ai upload

Dependencies:

  • Python 3.10+
  • Pillow (pip install Pillow>=10.0)

Install on claude.ai

Step 1: Create Skills ZIP

Zip the contents of the skills/ directory so SKILL.md sits at the ZIP root, then upload to claude.ai. Both commands produce an identical visual-expression.zip — no intermediate skills/ or temp_skills/ folder inside. (Dev files like __pycache__ are gitignored, so no exclusion flags are needed.)

Mac/Linux:

cd VisualExpression/skills
zip -r ../visual-expression.zip .

Windows (PowerShell):

cd VisualExpression
Compress-Archive -Path skills/* -DestinationPath visual-expression.zip -Force

Note: Regenerate the ZIP if you replace VisualExpressionUI.html.

Step 2: Register Skill

  1. Prepare the created visual-expression.zip
  2. Go to claude.ai project settings → "Custom Skills" → Upload ZIP
  3. Skill will be activated

Usage on claude.ai

Placing the Expression UI (session start)

Default expressions are included out of the box. At session start:

  1. Deploy: cp /mnt/skills/user/visual-expression/VisualExpressionUI.html /mnt/user-data/outputs/
  2. Present /mnt/user-data/outputs/VisualExpressionUI.html as an Artifact

The expression UI appears in the sidebar.

Creating Custom Character Expressions

  1. Refer to scripts/MetaGenerateExpression.md and generate a grid image with Nano Banana Pro
  2. Download the generated image and upload to claude.ai chat
  3. In Computer Use environment, retrieve the image from /mnt/user-data/uploads/ and run:
cd /mnt/skills/user/visual-expression/scripts/MakeExpressionJson
python main.py /mnt/user-data/uploads/your_grid.png --output /mnt/user-data/outputs/
  1. Present /mnt/user-data/outputs/visual-expression.zip to user and prompt skill registration
  2. Re-register as a new skill on claude.ai

One-liner sed Expression Switching

When Claude changes the Artifact expression in response:

sed 's/btns\[0\]\.click();/setExpr("elation");/' /path/to/VisualExpressionUI.html > /mnt/user-data/outputs/VisualExpressionUI.html

Available keys:

  • Basic: normal, smile, focus, diverge
  • Emotion: joy, elation, surprise, calm
  • Negative: anger, sadness, rage, disgust
  • Anxiety: anxiety, fear, upset, worry
  • Special: sleepy, cynical, defeated, dreamy

Expression Codes

20 Expression Codes

Basic - Col 1

Code日本語Usage使用場面
normal通常Default, neutralデフォルト、ニュートラル
smile笑顔Friendly, greeting友好的、軽い冗談
focus思考集中Analysis, deep thinking深い分析、構造解析
diverge思考発散Idea expansion, associationアイデア展開、連想的跳躍

Emotion - Col 2

Code日本語Usage使用場面
joy喜びAchievement, success達成感、発見の喜び
elation高揚Excitement, thrill興奮、ワクワク、熱意
surprise驚きUnexpected discovery意外な発見、予想外
calm平穏Peaceful, stable穏やかな対話、安定

Negative - Col 3

Code日本語Usage使用場面
anger怒りMild frustration軽い不満、批判的指摘
sadness悲しみRegret, disappointment残念な結果、失望
rage激怒Strong anger強い憤り、倫理的反発
disgust嫌悪Rejection拒否感、不快な事象

Anxiety - Col 4

Code日本語Usage使用場面
anxiety不安Uncertainty先行き不透明、懸念
fear恐れDanger awareness危険認識、警告
upset動揺Confusion困惑、予期せぬ事態
worry心配Concern相手を気遣う、配慮

Special - Col 5 (Customizable)

Code日本語Usage使用場面
sleepyうとうとFatigue, drowsiness疲労時、長時間対話後
cynical暗黒微笑Sarcasm, irony皮肉、斜に構えた発言
defeatedぎゃふんGot me, embarrassed負けた、照れるー
dreamyぽやぽやMellow, relaxedほのぼの、ぼんやり

Note: The 4 Special category expressions can be customized with the --special option.

Input Grid Image Layout (4 rows × 5 columns)

This is the grid image layout generated by Nano Banana Pro. MakeExpressionJson splits the image in this order.

Each column corresponds to one category. Landscape format for Nano Banana Pro output.

         Col1(Basic)  Col2(Emotion)  Col3(Negative)  Col4(Anxiety)  Col5(Special)
Row1:    normal       joy            anger           anxiety        sleepy
Row2:    smile        elation        sadness         fear           cynical
Row3:    focus        surprise       rage            upset          defeated
Row4:    diverge      calm           disgust         worry          dreamy

Project Instructions Snippet

All operational steps (deploy, present, sed switching, key table) live in this SKILL.md — the single source of truth. Your claude.ai project instructions only need a minimal trigger so Claude activates this skill at session start:

## Expression System
At session start, use the visual-expression skill to deploy and present the expression UI, then switch expressions (key table in SKILL.md) to match your emotional state throughout the conversation.

Keeping the trigger to one line avoids duplicating the key table and commands in project instructions. Context cost for expression switching is minimal — be expressive and switch often.


Troubleshooting

Common Issues

ErrorCauseSolution
AttributeError: module 'PIL.Image' has no attribute 'Resampling'Pillow version < 10.0pip install --upgrade Pillow>=10.0
ValueError: Grid image must be 1500x1200 pixelsWrong image dimensionsUse Nano Banana Pro to generate 4×5 grid (1500×1200px)
Image larger than 1500×1200pxNano Banana Pro generated oversized imageResize to 1500×1200px (maintain aspect ratio: scale X to 1500 if wider, or Y to 1200 if taller)
FileNotFoundError: template not foundCustom template path invalidCheck --template path or use built-in template
Image mode not supportedInput is not RGB/RGBAConvert to PNG/JPEG before processing

Validation Tips

  • Grid image must be 1500×1200 pixels (4 rows × 5 columns × 300px)
  • Each cell should be trimmed to 280×280 pixels
  • Use PNG or JPEG format for input
  • Output JPEG quality adjustable via --quality (default: 85)

Technical Details

File Size Estimates

  • VisualExpressionUI.html: ~600KB (20 images × ~30KB each)
  • ExpressionImages.json: ~600KB

Image Specifications

  • Format: JPEG (Base64)
  • Resolution: 280×280px per expression

Template Variables

When using custom templates (--template option), the following placeholder is replaced:

PlaceholderReplaced With
__IMAGES_PLACEHOLDER__JSON object containing Base64 images for all 20 expressions

Example template usage:

<script>
const images = __IMAGES_PLACEHOLDER__;
// images = { "normal": "data:image/jpeg;base64,...", "smile": "...", ... }
</script>

VisualExpression | GitHub

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

dev-rules

免费

Development methodology rules (Clean Architecture, TDD flow, 3-Strike rule, decision priority) that govern planning, implementation, and review. Load before designing, staging, implementing, or reviewing code changes.

中文简介正在准备中。当前显示原文说明。

Bizuayeu/Plugins-Weave112026年10月4日 更新

EpisodicRAG 健全性診断と階層推奨

中文简介正在准备中。当前显示原文说明。

Bizuayeu/Plugins-Weave112026年10月4日 更新

EpisodicRAG設定変更(対話的)

中文简介正在准备中。当前显示原文说明。

Bizuayeu/Plugins-Weave112026年10月4日 更新

EpisodicRAG初期セットアップ(対話的)

中文简介正在准备中。当前显示原文说明。

Bizuayeu/Plugins-Weave112026年10月4日 更新

ops-rules

免费

Operational readiness checklist (security, cost, legal, data design, performance, incident response, LLM integration defenses) applied when a change touches deployment, infrastructure, external services, secrets, or user data.

中文简介正在准备中。当前显示原文说明。

Bizuayeu/Plugins-Weave112026年10月4日 更新

reflect

免费

Deep reflection skill - read memory and context, decide whether there is something worth sending

中文简介正在准备中。当前显示原文说明。

Bizuayeu/Plugins-Weave112026年10月4日 更新

查看 Bizuayeu 的全部技能

报告此技能的问题