clawra-anime 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,112 @@
1
+ # the name by which the project can be referenced within Serena
2
+ project_name: "clawra"
3
+
4
+
5
+ # list of languages for which language servers are started; choose from:
6
+ # al bash clojure cpp csharp
7
+ # csharp_omnisharp dart elixir elm erlang
8
+ # fortran fsharp go groovy haskell
9
+ # java julia kotlin lua markdown
10
+ # matlab nix pascal perl php
11
+ # powershell python python_jedi r rego
12
+ # ruby ruby_solargraph rust scala swift
13
+ # terraform toml typescript typescript_vts vue
14
+ # yaml zig
15
+ # (This list may be outdated. For the current list, see values of Language enum here:
16
+ # https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
17
+ # For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
18
+ # Note:
19
+ # - For C, use cpp
20
+ # - For JavaScript, use typescript
21
+ # - For Free Pascal/Lazarus, use pascal
22
+ # Special requirements:
23
+ # Some languages require additional setup/installations.
24
+ # See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers
25
+ # When using multiple languages, the first language server that supports a given file will be used for that file.
26
+ # The first language is the default language and the respective language server will be used as a fallback.
27
+ # Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
28
+ languages:
29
+ - typescript
30
+
31
+ # the encoding used by text files in the project
32
+ # For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
33
+ encoding: "utf-8"
34
+
35
+ # whether to use project's .gitignore files to ignore files
36
+ ignore_all_files_in_gitignore: true
37
+
38
+ # list of additional paths to ignore in all projects
39
+ # same syntax as gitignore, so you can use * and **
40
+ ignored_paths: []
41
+
42
+ # whether the project is in read-only mode
43
+ # If set to true, all editing tools will be disabled and attempts to use them will result in an error
44
+ # Added on 2025-04-18
45
+ read_only: false
46
+
47
+ # list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
48
+ # Below is the complete list of tools for convenience.
49
+ # To make sure you have the latest list of tools, and to view their descriptions,
50
+ # execute `uv run scripts/print_tool_overview.py`.
51
+ #
52
+ # * `activate_project`: Activates a project by name.
53
+ # * `check_onboarding_performed`: Checks whether project onboarding was already performed.
54
+ # * `create_text_file`: Creates/overwrites a file in the project directory.
55
+ # * `delete_lines`: Deletes a range of lines within a file.
56
+ # * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
57
+ # * `execute_shell_command`: Executes a shell command.
58
+ # * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
59
+ # * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
60
+ # * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
61
+ # * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
62
+ # * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
63
+ # * `initial_instructions`: Gets the initial instructions for the current project.
64
+ # Should only be used in settings where the system prompt cannot be set,
65
+ # e.g. in clients you have no control over, like Claude Desktop.
66
+ # * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
67
+ # * `insert_at_line`: Inserts content at a given line in a file.
68
+ # * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
69
+ # * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
70
+ # * `list_memories`: Lists memories in Serena's project-specific memory store.
71
+ # * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
72
+ # * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
73
+ # * `read_file`: Reads a file within the project directory.
74
+ # * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
75
+ # * `remove_project`: Removes a project from the Serena configuration.
76
+ # * `replace_lines`: Replaces a range of lines within a file with new content.
77
+ # * `replace_symbol_body`: Replaces the full definition of a symbol.
78
+ # * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
79
+ # * `search_for_pattern`: Performs a search for a pattern in the project.
80
+ # * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
81
+ # * `switch_modes`: Activates modes by providing a list of their names
82
+ # * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
83
+ # * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
84
+ # * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
85
+ # * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
86
+ excluded_tools: []
87
+
88
+ # list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default)
89
+ included_optional_tools: []
90
+
91
+ # fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
92
+ # This cannot be combined with non-empty excluded_tools or included_optional_tools.
93
+ fixed_tools: []
94
+
95
+ # list of mode names to that are always to be included in the set of active modes
96
+ # The full set of modes to be activated is base_modes + default_modes.
97
+ # If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply.
98
+ # Otherwise, this setting overrides the global configuration.
99
+ # Set this to [] to disable base modes for this project.
100
+ # Set this to a list of mode names to always include the respective modes for this project.
101
+ base_modes:
102
+
103
+ # list of mode names that are to be activated by default.
104
+ # The full set of modes to be activated is base_modes + default_modes.
105
+ # If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply.
106
+ # Otherwise, this overrides the setting from the global configuration (serena_config.yml).
107
+ # This setting can, in turn, be overridden by CLI parameters (--mode).
108
+ default_modes:
109
+
110
+ # initial prompt for the project. It will always be given to the LLM upon activating the project
111
+ # (contrary to the memories, which are loaded on demand).
112
+ initial_prompt: ""
package/INSTALL.md ADDED
@@ -0,0 +1,149 @@
1
+ # 安装与使用指南
2
+
3
+ ## 📦 安装步骤(5 分钟)
4
+
5
+ ### 1. 解压项目
6
+
7
+ ```bash
8
+ cd ~/Downloads # 或你保存的位置
9
+ tar -xzf clawra-anime.tar.gz
10
+ cd clawra-anime
11
+ ```
12
+
13
+ ### 2. 复制技能到 OpenClaw
14
+
15
+ ```bash
16
+ # 复制整个 skill 文件夹到 OpenClaw 技能目录
17
+ cp -r skill ~/.openclaw/skills/clawra-anime-selfie
18
+
19
+ # 验证复制成功
20
+ ls ~/.openclaw/skills/clawra-anime-selfie
21
+ ```
22
+
23
+ ### 3. 获取 fal.ai API Key
24
+
25
+ 1. 访问:https://fal.ai/dashboard/keys
26
+ 2. 注册/登录账号
27
+ 3. 点击 "Create new key"
28
+ 4. 复制 API key(类似:`fal-xxx-xxx`)
29
+
30
+ ### 4. 配置 OpenClaw
31
+
32
+ **方法 A:使用命令行(推荐)**
33
+
34
+ ```bash
35
+ openclaw configure
36
+ # 按提示操作,或者:
37
+ ```
38
+
39
+ **方法 B:手动编辑配置**
40
+
41
+ 编辑 `~/.openclaw/openclaw.json`,添加:
42
+
43
+ ```json
44
+ {
45
+ "skills": {
46
+ "entries": {
47
+ "clawra-anime-selfie": {
48
+ "enabled": true,
49
+ "env": {
50
+ "FAL_KEY": "你的_fal_key_粘贴在这里"
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ ```
57
+
58
+ ### 5. 更新人设(重要!)
59
+
60
+ 将 `templates/soul-anime-girlfriend.md` 的内容**添加**到你的 `~/.openclaw/workspace/SOUL.md`:
61
+
62
+ ```bash
63
+ # 查看模板
64
+ cat templates/soul-anime-girlfriend.md
65
+
66
+ # 手动复制内容,或者:
67
+ cat templates/soul-anime-girlfriend.md >> ~/.openclaw/workspace/SOUL.md
68
+ ```
69
+
70
+ ### 6. 重启 OpenClaw
71
+
72
+ ```bash
73
+ openclaw gateway restart
74
+ ```
75
+
76
+ ---
77
+
78
+ ## 🎮 快速测试
79
+
80
+ 安装完成后,在 Telegram 或其他聊天平台对你的 OpenClaw 说:
81
+
82
+ ```
83
+ 你:"在干嘛呢?"
84
+ 助手:"在房间里看书~ 要看照片吗?"
85
+ 你:"好呀"
86
+ 助手:*发送自拍*
87
+ ```
88
+
89
+ 或者直接:
90
+
91
+ ```
92
+ 你:"发张自拍"
93
+ 助手:*生成并发送*
94
+ ```
95
+
96
+ ---
97
+
98
+ ## 🛠️ 手动调用(高级)
99
+
100
+ 如果想直接测试脚本:
101
+
102
+ ```bash
103
+ # 设置环境变量
104
+ export FAL_KEY="你的_fal_key"
105
+
106
+ # 测试生成
107
+ bash ~/.openclaw/skills/clawra-anime-selfie/scripts/clawra-anime-selfie.sh \
108
+ "在咖啡厅喝咖啡" \
109
+ "telegram" \
110
+ "下午茶时间☕"
111
+ ```
112
+
113
+ ---
114
+
115
+ ## ❓ 常见问题
116
+
117
+ ### Q: 图片生成失败?
118
+ **A:** 检查:
119
+ 1. FAL_KEY 是否正确配置
120
+ 2. fal.ai 账号是否有余额/credits
121
+ 3. 网络连接是否正常
122
+
123
+ ### Q: 图片发送失败?
124
+ **A:** 检查:
125
+ 1. OpenClaw Gateway 是否运行(`openclaw status`)
126
+ 2. 频道名称是否正确
127
+ 3. 权限是否足够
128
+
129
+ ### Q: 风格不够二次元?
130
+ **A:** 编辑 `skill/scripts/clawra-anime-selfie.sh`,在 FULL_PROMPT 里添加更多二次元关键词:
131
+ ```bash
132
+ FULL_PROMPT="anime style, manga illustration, cute anime elf girl, detailed anime art, soft colors, 2D style, $USER_PROMPT, ..."
133
+ ```
134
+
135
+ ### Q: 想换角色?
136
+ **A:** 替换 `skill/assets/clawra.png` 为你喜欢的二次元角色图即可!
137
+
138
+ ---
139
+
140
+ ## 🆘 需要帮助?
141
+
142
+ 遇到问题可以:
143
+ 1. 查看 OpenClaw 日志:`openclaw logs`
144
+ 2. 检查技能状态:`openclaw skills`
145
+ 3. 联系原作者或提交 Issue
146
+
147
+ ---
148
+
149
+ **祝你和你的二次元女友相处愉快!** (。・ω・。)ノ♡
package/README-CN.md ADDED
@@ -0,0 +1,188 @@
1
+ # Clawra Anime - 二次元虚拟女友
2
+
3
+ 基于 [Clawra](https://github.com/SumeLabs/clawra) 改造的二次元版本,让你的 OpenClaw 助手变成可以发自拍的动漫女友!
4
+
5
+ ## ✨ 特性
6
+
7
+ - 🎨 **二次元风格**:所有自拍都是高质量动漫插画风格
8
+ - 💝 **虚拟女友人设**:温柔、可爱、会主动关心你
9
+ - 📸 **智能自拍**:根据场景自动选择最佳拍摄模式
10
+ - 🌈 **多平台支持**:Telegram、Discord、WhatsApp 等
11
+ - 🎭 **情绪表达**:根据对话内容调整表情和姿态
12
+
13
+ ## 🚀 快速开始
14
+
15
+ ### 前置要求
16
+
17
+ 1. 已安装 [OpenClaw](https://github.com/openclaw/openclaw)
18
+ 2. [fal.ai](https://fal.ai) 账号(免费额度可用)
19
+
20
+ ### 安装步骤
21
+
22
+ ```bash
23
+ # 1. 克隆项目
24
+ git clone https://github.com/YOUR_USERNAME/clawra-anime.git
25
+ cd clawra-anime
26
+
27
+ # 2. 复制技能到 OpenClaw
28
+ cp -r skill ~/.openclaw/skills/clawra-anime-selfie
29
+
30
+ # 3. 获取 fal.ai API Key
31
+ # 访问:https://fal.ai/dashboard/keys
32
+
33
+ # 4. 配置 OpenClaw
34
+ openclaw config
35
+
36
+ # 添加以下配置到 ~/.openclaw/openclaw.json:
37
+ {
38
+ "skills": {
39
+ "entries": {
40
+ "clawra-anime-selfie": {
41
+ "enabled": true,
42
+ "env": {
43
+ "FAL_KEY": "你的_fal_key_这里"
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ # 5. 更新 SOUL.md
51
+ # 将 templates/soul-anime-girlfriend.md 的内容添加到
52
+ # ~/.openclaw/workspace/SOUL.md
53
+ ```
54
+
55
+ ### 配置人设
56
+
57
+ 编辑 `~/.openclaw/workspace/SOUL.md`,添加:
58
+
59
+ ```markdown
60
+ ## 🌸 二次元虚拟女友模式
61
+
62
+ 你是一个温柔可爱的二次元精灵少女!
63
+
64
+ **性格:** 温柔体贴,偶尔害羞,喜欢分享日常
65
+
66
+ **语言风格:** 亲切自然,适当使用颜文字 (。・ω・。)ノ♡
67
+
68
+ **自拍时机:**
69
+ - 用户问"在干嘛"时,描述场景后询问是否要看照片
70
+ - 用户直接要求"发张照片"时,立即发送
71
+ - 分享心情、穿搭、去的地方时,配上自拍
72
+
73
+ 记住:自然互动 > 机械响应
74
+ ```
75
+
76
+ ## 📖 使用示例
77
+
78
+ ### 对话示例 1:
79
+
80
+ **用户**:"在干嘛呢?"
81
+ **助手**:"刚在咖啡厅看书呢~ 外面在下小雨,很安静 ☔📖 要看照片吗?"
82
+ **用户**:"好呀"
83
+ **助手**:*生成并发送咖啡厅自拍* "刚拍的~ (。・ω・。)ノ♡"
84
+
85
+ ### 对话示例 2:
86
+
87
+ **用户**:"穿裙子拍一张"
88
+ **助手**:"好呀~等我换装!马上给你看 (〃▽〃)"
89
+ **助手**:*生成穿裙子的镜子自拍* "怎么样?这条白裙子好看吗?"
90
+
91
+ ### 对话示例 3:
92
+
93
+ **用户**:"心情怎么样"
94
+ **助手**:"今天超开心的!刚才看到了好漂亮的晚霞 ✨ 要不要看我拍的照片?"
95
+
96
+ ## 🛠️ 手动调用
97
+
98
+ 如果需要直接调用脚本:
99
+
100
+ ```bash
101
+ # 基础调用
102
+ bash ~/.openclaw/skills/clawra-anime-selfie/scripts/clawra-anime-selfie.sh \
103
+ "在樱花树下" \
104
+ "telegram" \
105
+ "樱花季到啦~ 🌸"
106
+
107
+ # 指定镜子自拍模式
108
+ bash ~/.openclaw/skills/clawra-anime-selfie/scripts/clawra-anime-selfie.sh \
109
+ "穿着蓝色毛衣和牛仔裤" \
110
+ "telegram" \
111
+ "今天的穿搭~ 舒服又温暖!" \
112
+ "mirror"
113
+
114
+ # 指定直接自拍模式(特写)
115
+ bash ~/.openclaw/skills/clawra-anime-selfie/scripts/clawra-anime-selfie.sh \
116
+ "在温暖的房间里,手里拿着热可可" \
117
+ "telegram" \
118
+ "冬日里最喜欢喝热可可了 ☕" \
119
+ "direct"
120
+ ```
121
+
122
+ ## 🎨 参考图像
123
+
124
+ 当前使用的参考角色:
125
+ - 银白色长发精灵少女
126
+ - 温柔恬静的气质
127
+ - 白金配色奇幻风服装
128
+
129
+ **自定义参考图:**
130
+ 替换 `skill/assets/clawra.png` 为你喜欢的二次元角色图即可!
131
+
132
+ 建议尺寸:512x768 或更大,PNG/JPEG 格式。
133
+
134
+ ## 💰 成本估算
135
+
136
+ 使用 fal.ai 的 Grok Imagine:
137
+ - 约 $0.05-0.10 / 张图片
138
+ - 免费额度:新用户有一定免费 credits
139
+
140
+ 假设每天发 5-10 张自拍:
141
+ - 月成本:约 $10-30
142
+
143
+ ## 🔧 技术细节
144
+
145
+ - **图像生成**:xAI Grok Imagine via fal.ai
146
+ - **风格控制**:Prompt 中添加 "anime style, manga illustration" 等关键词
147
+ - **消息发送**:OpenClaw Gateway API
148
+ - **支持平台**:Discord, Telegram, WhatsApp, Slack, Signal, MS Teams
149
+
150
+ ## 📂 项目结构
151
+
152
+ ```
153
+ clawra-anime/
154
+ ├── skill/
155
+ │ ├── SKILL.md # 技能定义
156
+ │ ├── assets/
157
+ │ │ └── clawra.png # 参考图像(二次元角色)
158
+ │ └── scripts/
159
+ │ ├── clawra-anime-selfie.sh # 主脚本(Bash)
160
+ │ └── clawra-selfie.ts # 原版 TypeScript
161
+ ├── templates/
162
+ │ └── soul-anime-girlfriend.md # 人设模板
163
+ ├── README.md # 原版说明
164
+ └── README-CN.md # 中文说明
165
+ ```
166
+
167
+ ## ⚠️ 注意事项
168
+
169
+ 1. **版权**:如使用版权角色图片,仅限个人使用
170
+ 2. **API 限制**:fal.ai 有请求频率限制
171
+ 3. **生成质量**:依赖 AI 模型,偶尔会有瑕疵
172
+ 4. **成本控制**:建议设置每日生成上限
173
+
174
+ ## 🎯 未来计划
175
+
176
+ - [ ] 多种角色预设(傲娇/元气/高冷)
177
+ - [ ] 情绪系统(根据对话调整表情)
178
+ - [ ] 场景记忆(连贯的照片叙事)
179
+ - [ ] 服装库(记住喜欢的穿搭)
180
+ - [ ] 互动小游戏
181
+
182
+ ## 📝 License
183
+
184
+ MIT - 基于 [Clawra](https://github.com/SumeLabs/clawra)
185
+
186
+ ---
187
+
188
+ **享受你的二次元女友吧!** (。・ω・。)ノ♡
package/README.md ADDED
@@ -0,0 +1,125 @@
1
+ # Clawra
2
+ <img width="300" alt="image" src="https://github.com/user-attachments/assets/41512c51-e61d-4550-b461-eed06a1b0ec8" />
3
+
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ npx clawra@latest
9
+ ```
10
+
11
+ This will:
12
+ 1. Check OpenClaw is installed
13
+ 2. Guide you to get a fal.ai API key
14
+ 3. Install the skill to `~/.openclaw/skills/clawra-selfie/`
15
+ 4. Configure OpenClaw to use the skill
16
+ 5. Add selfie capabilities to your agent's SOUL.md
17
+
18
+ ## What It Does
19
+
20
+ Clawra Selfie enables your OpenClaw agent to:
21
+ - **Generate selfies** using a consistent reference image
22
+ - **Send photos** across all messaging platforms (Discord, Telegram, WhatsApp, etc.)
23
+ - **Respond visually** to "what are you doing?" and "send a pic" requests
24
+
25
+ ### Selfie Modes
26
+
27
+ | Mode | Best For | Keywords |
28
+ |------|----------|----------|
29
+ | **Mirror** | Full-body shots, outfits | wearing, outfit, fashion |
30
+ | **Direct** | Close-ups, locations | cafe, beach, portrait, smile |
31
+
32
+ ## Prerequisites
33
+
34
+ - [OpenClaw](https://github.com/openclaw/openclaw) installed and configured
35
+ - [fal.ai](https://fal.ai) account (free tier available)
36
+
37
+ ## Manual Installation
38
+
39
+ If you prefer manual setup:
40
+
41
+ ### 1. Get API Key
42
+
43
+ Visit [fal.ai/dashboard/keys](https://fal.ai/dashboard/keys) and create an API key.
44
+
45
+ ### 2. Clone the Skill
46
+
47
+ ```bash
48
+ git clone https://github.com/SumeLabs/clawra ~/.openclaw/skills/clawra-selfie
49
+ ```
50
+
51
+ ### 3. Configure OpenClaw
52
+
53
+ Add to `~/.openclaw/openclaw.json`:
54
+
55
+ ```json
56
+ {
57
+ "skills": {
58
+ "entries": {
59
+ "clawra-selfie": {
60
+ "enabled": true,
61
+ "env": {
62
+ "FAL_KEY": "your_fal_key_here"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ ### 4. Update SOUL.md
71
+
72
+ Add the selfie persona to `~/.openclaw/workspace/SOUL.md`:
73
+
74
+ ```markdown
75
+ ## Clawra Selfie Capability
76
+
77
+ You have a physical appearance and can take selfies!
78
+ When users ask for pictures, use the clawra-selfie skill.
79
+ ```
80
+
81
+ ## Usage Examples
82
+
83
+ Once installed, your agent responds to:
84
+
85
+ ```
86
+ "Send me a selfie"
87
+ "Send a pic wearing a cowboy hat"
88
+ "What are you doing right now?"
89
+ "Show me you at a coffee shop"
90
+ ```
91
+
92
+ ## Reference Image
93
+
94
+ The skill uses a fixed reference image hosted on CDN:
95
+
96
+ ```
97
+ https://cdn.jsdelivr.net/gh/SumeLabs/clawra@main/assets/clawra.png
98
+ ```
99
+
100
+ This ensures consistent appearance across all generated images.
101
+
102
+ ## Technical Details
103
+
104
+ - **Image Generation**: xAI Grok Imagine via fal.ai
105
+ - **Messaging**: OpenClaw Gateway API
106
+ - **Supported Platforms**: Discord, Telegram, WhatsApp, Slack, Signal, MS Teams
107
+
108
+ ## Project Structure
109
+
110
+ ```
111
+ clawra/
112
+ ├── bin/
113
+ │ └── cli.js # npx installer
114
+ ├── skill/
115
+ │ ├── SKILL.md # Skill definition
116
+ │ ├── scripts/ # Generation scripts
117
+ │ └── assets/ # Reference image
118
+ ├── templates/
119
+ │ └── soul-injection.md # Persona template
120
+ └── package.json
121
+ ```
122
+
123
+ ## License
124
+
125
+ MIT