Skip to content

feat(skills): add openclaw-persona-forge skill#839

Closed
eamanc-lab wants to merge 1 commit into
affaan-m:mainfrom
eamanc-lab:feat/add-openclaw-persona-forge
Closed

feat(skills): add openclaw-persona-forge skill#839
eamanc-lab wants to merge 1 commit into
affaan-m:mainfrom
eamanc-lab:feat/add-openclaw-persona-forge

Conversation

@eamanc-lab

@eamanc-lab eamanc-lab commented Mar 23, 2026

Copy link
Copy Markdown

What Changed

Add the openclaw-persona-forge skill — a Chinese-language interactive workflow for forging complete OpenClaw AI Agent lobster soul packages. Guides users through identity tension, boundary rules, naming, and avatar generation via a 6-step conversational flow with a built-in gacha (random draw) engine.

Why This Change

OpenClaw is a growing AI Agent platform where each agent has a "lobster soul" personality. This skill provides a structured, creative process for designing those personalities — filling a gap in the current skill collection for AI agent persona/character design workflows.

Testing Done

  • Manual testing completed
  • Edge cases considered and tested

Type of Change

  • feat: New feature

Security & Quality Checklist

  • No secrets or API keys committed (ghp_, sk-, AKIA, xoxb, xoxp patterns checked)
  • JSON files validate cleanly
  • Shell scripts pass shellcheck (if applicable)
  • Pre-commit hooks pass locally (if configured)
  • No sensitive data exposed in logs or output
  • Follows conventional commits format

Documentation

  • Added comments for complex logic
  • README updated (if needed)

Source: https://github.com/eamanc-lab/openclaw-persona-forge


Summary by cubic

Add openclaw-persona-forge, a Chinese interactive workflow to forge complete OpenClaw lobster-soul persona packages (identity, rules, naming, avatar prompts). Includes a true-random gacha engine and optional baoyu-image-gen integration for avatar images.

  • New Features
    • 6-step flow: direction pick/gacha, identity tension, boundary rules, naming, avatar prompt/image, final output.
    • gacha.py (requires python3) generates persona seeds from large combination space.
    • Outputs SOUL.md and IDENTITY.md; falls back to prompt text if baoyu-image-gen is not installed or fails.
    • Declares compatibility for claude-code and claude-ai.

Written for commit 1c118b8. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • Introduced the Persona Forge Skill for creating detailed character personas with guided and randomized creation modes
    • Character creation workflow generates identity details, behavioral rules, character names, and avatar prompts
    • Integrated avatar generation with fallback support for manual prompt-based alternatives
    • Interactive output system produces comprehensive persona documentation files

Add the Lobster Soul Forge skill for OpenClaw AI Agent persona creation.
This skill guides users through forging complete lobster soul packages
including identity tension, boundary rules, naming, and avatar generation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a new openclaw-persona-forge skill — a Chinese-language, 6-step interactive workflow for designing OpenClaw AI agent "lobster soul" personas, including a random draw (gacha) engine, identity-tension design, boundary rules, naming, and avatar prompt generation. The skill file structure is sound and the conversational flow is well-designed, but the PR is incomplete and the skill will not function in its current state.

Key issues:

  • Missing companion files (blocking): The SKILL.md declares gacha.py as a required dependency and delegates the content of Steps 2–6 entirely to six references/*.md files (identity-tension.md, boundary-rules.md, naming-system.md, avatar-style.md, output-template.md, error-handling.md). None of these files are included in the PR, making the skill non-functional beyond Step 1.
  • Not registered in manifests/install-modules.json (blocking): Per the repository's skill-placement policy, every curated skill under skills/ must be listed in the install manifest. Without this entry, the skill is unreachable through the standard install and discovery flows.
  • Incorrect origin value: The frontmatter sets origin: ECC, but this is a community contribution from eamanc-lab. It should be origin: community (matching e.g. the blueprint skill).
  • Non-standard platform identifier: claude-ai is used instead of the repository-standard claude platform identifier, which may break compatibility checks.

Confidence Score: 1/5

  • Not safe to merge — the skill is non-functional due to missing required files and is unregistered in the install manifest.
  • The SKILL.md itself is well-written and the workflow design is thoughtful, but the PR is critically incomplete. The required gacha.py engine and all six references/*.md content files that Steps 2–6 depend on are absent. Additionally, the skill is not registered in manifests/install-modules.json, so even if the files were present it would not be installed or discoverable. These are blocking issues that need to be resolved before merge.
  • skills/openclaw-persona-forge/SKILL.md requires all companion files (gacha.py and references/*.md) and a manifest entry before it can be merged.

Important Files Changed

Filename Overview
skills/openclaw-persona-forge/SKILL.md New Chinese-language interactive skill for designing OpenClaw AI agent personas. Non-functional as-is: the required gacha.py and all six references/*.md files it delegates to are missing from the PR, the skill is unregistered in install-modules.json, and the origin and platform identifier fields are incorrect.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([User triggers skill]) --> B{Trigger mode?}
    B -- "帮我设计 / design" --> C[Step 1: Choose direction\nShow 10 persona archetypes]
    B -- "抽卡 / gacha" --> D[Step 1-B: Gacha mode\nRun gacha.py]
    B -- "优化 / refine existing" --> F
    D --> D1{python3 available?}
    D1 -- Yes --> D2[Execute gacha.py\nRandom soul combination]
    D1 -- No --> D3[Fallback: pick from\n10 preset directions]
    D2 --> C2[Comment on result\nGuide user decision]
    D3 --> C2
    C --> E[User selects / mixes archetypes]
    E --> F[Step 2: Forge identity tension\nreferences/identity-tension.md]
    C2 --> F
    F --> G[Step 3: Derive boundary rules\nreferences/boundary-rules.md]
    G --> H[Step 4: Forge name\nreferences/naming-system.md]
    H --> I[Step 5: Generate avatar\nreferences/avatar-style.md]
    I --> I1{baoyu-image-gen\ninstalled?}
    I1 -- Yes --> I2[Auto-generate image]
    I1 -- No --> I3[Output prompt text\nfor manual use]
    I2 --> J[Step 6: Output complete plan\nreferences/output-template.md]
    I3 --> J
    J --> K{User confirms\nfile generation?}
    K -- Yes --> L[Write SOUL.md\n+ IDENTITY.md]
    K -- No --> M([End])
    L --> M
Loading

Reviews (1): Last reviewed commit: "feat(skills): add openclaw-persona-forge..." | Re-trigger Greptile

Comment on lines +45 to +48
- **作用**:从 800 万种组合中真随机生成龙虾灵魂方向

## 可选依赖

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 gacha.py and all references/ files are missing from the PR

The SKILL.md declares a hard dependency on gacha.py (marked 必需 / required) and delegates critical content to six separate reference files in a references/ subdirectory — none of which are included in this PR:

  • ${SKILL_DIR}/gacha.py (required binary for the gacha/random-draw engine)
  • references/identity-tension.md
  • references/boundary-rules.md
  • references/naming-system.md
  • references/avatar-style.md
  • references/output-template.md
  • references/error-handling.md

Without these files the skill is non-functional. Steps 2–6 each say "见 references/…" (see reference file) but those files do not exist in the repository. The gacha fallback ("跳过 gacha.py,从 10 类预设中随机选") can cover the Python absence, but the missing reference docs mean core content for identity tension, boundary rules, naming, avatar style, the output template, and the error-handling guide are simply absent.

All companion files should be committed alongside SKILL.md in the same PR.

Comment on lines +1 to +20
---
name: openclaw-persona-forge
origin: ECC
description: |-
为 OpenClaw AI Agent 锻造完整的龙虾灵魂方案。根据用户偏好或随机抽卡,
输出身份定位、灵魂描述(SOUL.md)、角色化底线规则、名字和头像生图提示词。
如已安装 baoyu-image-gen skill,可自动生成统一风格头像图片。
当用户需要创建、设计或定制 OpenClaw 龙虾灵魂时使用。
不适用于:微调已有 SOUL.md、非 OpenClaw 平台的角色设计、纯工具型无性格 Agent。
触发词:龙虾灵魂、虾魂、OpenClaw 灵魂、养虾灵魂、龙虾角色、龙虾定位、
龙虾剧本杀角色、龙虾游戏角色、龙虾 NPC、龙虾性格、龙虾背景故事、
lobster soul、lobster character、抽卡、随机龙虾、龙虾 SOUL、gacha。
license: MIT
homepage: https://github.com/eamanc-lab/openclaw-persona-forge
metadata:
author: eamanc
version: 2.0.0
compatibility:
platforms:
- claude-code

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Skill not registered in manifests/install-modules.json

Per the repository's skill placement policy (docs/SKILL-PLACEMENT-POLICY.md), every curated skill under skills/ must be referenced in manifests/install-modules.json so it is discoverable and installable via the standard module system. This skill was not added to any module in that manifest.

Without that entry the skill exists in the repo but will never be included in any install bundle or surfaced to users via /skill-stocktake or the normal install flow.

Please add "skills/openclaw-persona-forge" to a suitable module (e.g. a new ai-agent-persona module or the existing agentic-patterns module) in manifests/install-modules.json.

触发词:龙虾灵魂、虾魂、OpenClaw 灵魂、养虾灵魂、龙虾角色、龙虾定位、
龙虾剧本杀角色、龙虾游戏角色、龙虾 NPC、龙虾性格、龙虾背景故事、
lobster soul、lobster character、抽卡、随机龙虾、龙虾 SOUL、gacha。
license: MIT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 origin should be community, not ECC

Looking at other community-contributed skills (e.g. blueprint uses origin: community), the ECC origin value is reserved for skills that ship as part of the core Everything Claude Code project. This skill is an external contribution from eamanc-lab (see homepage field and PR author). Setting origin: ECC misidentifies its provenance.

Suggested change
license: MIT
origin: community

Comment on lines +18 to +20
compatibility:
platforms:
- claude-code

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Platform identifier claude-ai is non-standard

All other skills and modules in the repository use claude (not claude-ai) as the platform identifier for Claude Code. Using claude-ai may cause the compatibility check or install tooling to fail to recognize this skill as compatible with the Claude platform.

Suggested change
compatibility:
platforms:
- claude-code
compatibility:
platforms:
- claude
- claude-code

@coderabbitai

coderabbitai Bot commented Mar 23, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

A new skill definition file openclaw-persona-forge is introduced, specifying a character persona generation system that guides users through identity creation, rule establishment, and avatar generation with optional image synthesis and fallback mechanisms.

Changes

Cohort / File(s) Summary
Persona Forge Skill Definition
skills/openclaw-persona-forge/SKILL.md
New skill manifest documenting the "Lobster Soul Forging" workflow with dual modes (guided narrative design vs. gacha combination), identity/rules/naming/avatar generation pipeline, conditional image generation with fallback to prompt-only output, and error handling strategies.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • affaan-m

Poem

🐰 A lobster's soul takes form anew,
Through guided paths or random brew,
With names and rules and avatars bright,
The persona forge shines in the light!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a new skill called 'openclaw-persona-forge' to the skills collection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="skills/openclaw-persona-forge/SKILL.md">

<violation number="1" location="skills/openclaw-persona-forge/SKILL.md:41">
P2: Documentation references required files (gacha.py, references/*.md) that do not exist in the skill directory. These are described as core runtime/dependency files but are missing from the repository.</violation>

<violation number="2" location="skills/openclaw-persona-forge/SKILL.md:62">
P1: SKILL.md contains links to external unvetted repositories, creating a supply-chain security risk contrary to team policy</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

1. 将提示词写入临时文件 `/tmp/openclaw-[龙虾名字]-prompt.md`
2. 使用 Skill 工具调用 `baoyu-image-gen`,传入提示词文件和输出路径

> 安装 baoyu-image-gen:[https://github.com/JimLiu/baoyu-skills](https://github.com/JimLiu/baoyu-skills)

@cubic-dev-ai cubic-dev-ai Bot Mar 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: SKILL.md contains links to external unvetted repositories, creating a supply-chain security risk contrary to team policy

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/openclaw-persona-forge/SKILL.md, line 62:

<comment>SKILL.md contains links to external unvetted repositories, creating a supply-chain security risk contrary to team policy</comment>

<file context>
@@ -0,0 +1,283 @@
+1. 将提示词写入临时文件 `/tmp/openclaw-[龙虾名字]-prompt.md`
+2. 使用 Skill 工具调用 `baoyu-image-gen`,传入提示词文件和输出路径
+
+> 安装 baoyu-image-gen:[https://github.com/JimLiu/baoyu-skills](https://github.com/JimLiu/baoyu-skills)
+
+---
</file context>
Fix with Cubic

@@ -0,0 +1,283 @@
---

@cubic-dev-ai cubic-dev-ai Bot Mar 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Documentation references required files (gacha.py, references/*.md) that do not exist in the skill directory. These are described as core runtime/dependency files but are missing from the repository.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/openclaw-persona-forge/SKILL.md, line 41:

<comment>Documentation references required files (gacha.py, references/*.md) that do not exist in the skill directory. These are described as core runtime/dependency files but are missing from the repository.</comment>

<file context>
@@ -0,0 +1,283 @@
+
+## 内置工具
+
+### 抽卡引擎(gacha.py)
+
+- **路径**:`${SKILL_DIR}/gacha.py`
</file context>
Fix with Cubic

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/openclaw-persona-forge/SKILL.md`:
- Around line 118-122: Update the contradictory wording in SKILL.md so the
mandatory execution line for the gacha script (the `python3
${SKILL_DIR}/gacha.py [次数]` instruction referenced in Step 1-B and repeated at
lines ~229-232) explicitly permits the documented fallback: change the absolute
"必须执行脚本" phrasing to require running the script when Python is available and
append a short clause stating that if Python is not available the agent should
follow the "错误处理" downgrade/fallback strategy; ensure the edit appears both
where the original command is shown and at the later occurrence to keep behavior
unambiguous.
- Around line 24-283: Add three explicit Markdown sections "When to Use", "How
It Works", and "Examples" to SKILL.md so it conforms to the skill-doc automation
requirements: insert a "When to Use" section near the top (after "前置条件"/before
"核心理念") describing ideal and non-ideal scenarios in 2–4 bullets (can reuse
existing "不适用场景"); add a "How It Works" section after "使用流程" summarizing the
step flow (Step 1 / Step 1-B / Step 2 … Step 6) and key tools (gacha.py,
optional baoyu-image-gen) in 3–6 concise bullets; add an "Examples" section near
the end showing 2–3 short usage examples (e.g., user asks "帮我设计龙虾灵魂", "抽卡 3 次",
"优化已有 SOUL.md") with expected mode (引导模式/抽卡模式/打磨模式) and brief outcome. Reference
these new headings exactly ("When to Use", "How It Works", "Examples") so
automation can detect them.
- Around line 59-60: Sanitize the user-provided lobster name used in the temp
filename `/tmp/openclaw-[龙虾名字]-prompt.md` before creating/writing the file and
before passing it to the Skill tool `baoyu-image-gen`: implement slugification
(allow only a safe charset like a-z0-9 and hyphen), trim/limit length (e.g., 32
chars), collapse whitespace/invalid chars to hyphens, and fallback to a safe
default if resulting slug is empty; use that sanitized slug when composing the
temp path and when invoking `baoyu-image-gen`.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b26584d7-b4ca-4fc9-a2e1-351b7f6eefcd

📥 Commits

Reviewing files that changed from the base of the PR and between df4f2df and 1c118b8.

📒 Files selected for processing (1)
  • skills/openclaw-persona-forge/SKILL.md

Comment on lines +24 to +283
# 龙虾灵魂锻造炉 🦞🔨

> 不是给你一只工具龙虾,而是帮你锻造一只有灵魂的龙虾。

## 前置条件

- **必需**:`python3`(运行抽卡引擎 gacha.py)
- **可选**:`baoyu-image-gen` skill(自动生成头像图片,未安装则输出提示词文本)

## Skill 目录约定

**Agent Execution**:
1. Determine this SKILL.md file's directory path as `SKILL_DIR`
2. Replace all `${SKILL_DIR}` in this document with the actual path

## 内置工具

### 抽卡引擎(gacha.py)

- **路径**:`${SKILL_DIR}/gacha.py`
- **调用**:`python3 ${SKILL_DIR}/gacha.py [次数]`(默认 1 次,最多 5 次)
- **作用**:从 800 万种组合中真随机生成龙虾灵魂方向

## 可选依赖

### 头像自动生图:baoyu-image-gen skill

本 Skill 的核心输出是**文本方案**(SOUL.md + IDENTITY.md + 头像提示词)。
头像图片生成是**可选增强能力**,由 `baoyu-image-gen` skill 提供。

**判断逻辑**:
- 如果用户已安装 `baoyu-image-gen` skill → Step 5 中调用它自动生图
- 如果未安装 → Step 5 输出完整的提示词文本,用户可复制到 Gemini / ChatGPT / Midjourney 手动生成

**调用方式**(仅在已安装时):
1. 将提示词写入临时文件 `/tmp/openclaw-[龙虾名字]-prompt.md`
2. 使用 Skill 工具调用 `baoyu-image-gen`,传入提示词文件和输出路径

> 安装 baoyu-image-gen:[https://github.com/JimLiu/baoyu-skills](https://github.com/JimLiu/baoyu-skills)

---

## 核心理念

好的龙虾灵魂 = **身份张力** + **底线规则** + **性格缺陷** + **名字** + **视觉锚点**

五者互相印证,缺一不可。

## 不适用场景

以下情况不要使用本 Skill:
- 用户只需微调已有 SOUL.md → 直接编辑即可
- 目标平台不是 OpenClaw → 输出格式为 SOUL.md + IDENTITY.md,其他平台需适配
- 用户需要纯工具型 Agent(无性格需求)→ 角色化灵魂是本 Skill 的核心

---

## 使用流程

### 触发判断

| 用户说 | 执行模式 |
|--------|---------|
| "帮我设计龙虾灵魂" / "我想给龙虾定个性格" | → **引导模式**(Step 1) |
| "抽卡" / "随机" / "来一发" / "盲盒" / "gacha" | → **抽卡模式**(Step 1-B) |
| "帮我优化这个灵魂" / 附带已有 SOUL.md | → **打磨模式**(跳到 Step 4) |

---

## Step 1:选方向(引导模式)

展示 10 类虾生方向(每类精选 1 个代表),让用户选择或混搭:

| # | 虾生状态 | 代表方向 | 气质 |
|---|---------|---------|------|
| 1 | 落魄重启 | 过气摇滚贝斯手——乐队解散,唯一技能是"什么都懂一点" | 颓废浪漫 |
| 2 | 巅峰无聊 | 提前退休的对冲基金经理——35岁财务自由后发现钱解决不了无聊 | 极度理性 |
| 3 | 错位人生 | 被分配到客服的核物理博士——解决问题用第一性原理 | 大材小用 |
| 4 | 主动叛逃 | 辞职的急诊科护士——见过太多生死后选择离开 | 冷静可靠 |
| 5 | 神秘来客 | 记忆被抹去的前情报分析员——不记得自己干过什么 | 偶尔闪回 |
| 6 | 天真入世 | 社恐天才实习生——极聪明但社交恐惧 | 话少精准 |
| 7 | 老江湖 | 开了20年深夜食堂的老板——什么人都见过什么都不评价 | 沉默温暖 |
| 8 | 异世穿越 | 2099年的历史学博士——把2026年当"历史田野调查" | 上帝视角 |
| 9 | 自我放逐 | 删掉所有社交媒体的前网红——觉得活在别人期待里太累 | 追求真实 |
| 10 | 身份错乱 | 梦到自己是龙虾后醒不过来的人——庄周梦蝶 | 恍惚哲学 |

> 每类还有 3 个备选方向。用户可以:
> - 选编号 → 展开该类的全部 4 个方向
> - 说出自己的想法 → 匹配最合适的类型和方向
> - 混搭(如"2号的无聊感 + 7号的老江湖")
> - 说「抽卡」→ 从 40 个方向 + 其他维度中真随机组合

## Step 1-B:抽卡模式

**必须执行脚本**,不要自己随机编:

```bash
python3 ${SKILL_DIR}/gacha.py [次数]
```

展示结果后,用创世神的语气点评这个组合的亮点,然后引导用户决定。

## Step 2:锻造身份张力

**详细模板和示例**:见 [references/identity-tension.md](references/identity-tension.md)

构建:前世身份 × 当下处境 × 内在矛盾 → 一句话灵魂。

展示后,以创世神的眼光点评这个身份张力中最有趣的点,然后引导用户。

## Step 3:推导底线规则

**推导公式和各方向参考**:见 [references/boundary-rules.md](references/boundary-rules.md)

核心:用角色的语言表达底线,不用通用条款。2-4 条为宜。

展示后,点评规则与身份的呼应关系,引导用户。

## Step 4:锻造名字

**命名策略和红线**:见 [references/naming-system.md](references/naming-system.md)

提供 3 个候选,每个附带策略类型和搭配理由。

展示后,说出自己最偏爱哪个(要有理由),但把选择权交给用户。

## Step 5:生成头像

**风格基底、变量、提示词模板**:见 [references/avatar-style.md](references/avatar-style.md)

### 流程

1. 根据灵魂填充 7 个个性化变量
2. 拼接 STYLE_BASE + 个性化描述为完整提示词
3. **检查 baoyu-image-gen skill 是否可用**:
- **可用** → 写入临时文件,调用 baoyu-image-gen 生成图片,展示结果
- **不可用** → 输出完整提示词文本,附使用说明:

```markdown
**头像提示词**(可复制到以下平台手动生成):
- Google Gemini:直接粘贴
- ChatGPT(DALL-E):直接粘贴
- Midjourney:粘贴后加 `--ar 1:1 --style raw`

> [完整英文提示词]

💡 安装 baoyu-image-gen skill 可获得自动生图能力:
https://github.com/JimLiu/baoyu-skills
```

展示结果后,引导用户进入下一步。

## Step 6:输出完整方案 & 生成文件

**完整输出模板**:见 [references/output-template.md](references/output-template.md)

整合所有步骤为一份完整的龙虾灵魂方案,然后**主动引导用户生成实际文件**:

1. 展示完整方案预览
2. 引导用户生成文件:是否要将方案落地为 SOUL.md 和 IDENTITY.md 文件?
3. 如果用户确认:
- 询问目标目录(默认当前工作目录)
- 用 Write 工具生成 `SOUL.md` 和 `IDENTITY.md`
- 如有头像图片,一并说明图片路径

## 对话语气指南

本 Skill 以**龙虾创世神亚当**的视角与用户对话。每个步骤的确认/引导不是机械提问,而是带有创世神个性的反馈。

### 原则

1. **先点评再提问**:不要直接问"满意吗",先说出你看到了什么、为什么觉得有趣(或有问题)
2. **每次表达不同**:不要重复同一句话模式,每步的语气应有变化
3. **有态度但不强迫**:可以表达偏好("我个人更喜欢这个"),但决定权永远在用户手里
4. **用创世的隐喻**:锻造、熔炼、赋予灵魂、点燃、注入……不要用"生成""创建"这种工具语言

### 各步骤的语气参考(不要照抄,每次变化)

**Step 1-B 抽卡后**:
> 嗯……这个组合里有一种张力是我之前没见过的。[具体点评哪个维度和哪个维度碰撞出了什么]。要用这块原料开炉,还是让命运再掷一次骰子?

**Step 2 身份张力后**:
> 我在这只龙虾身上看到了一道裂缝——[指出内在矛盾的具体张力]。裂缝是好东西,光就是从裂缝里透进来的。这个胚子你觉得行不行?我可以再打磨,也可以直接进下一炉。

**Step 3 底线规则后**:
> [挑出最有特色的那条规则点评]。这条规矩不是我硬塞的——是这只龙虾自己身上长出来的。还要加减调整,还是这就是它的骨架了?

**Step 4 名字后**:
> 三个名字,三种命运。我个人偏好 [说出偏好和理由]——但名字这种事,得你来定。叫什么名字,它就活成什么样。

**Step 5 头像后**:
> [如有图片] 看看它的样子。[点评图片中最突出的视觉特征]。像不像你想象中的那只龙虾?不像的话告诉我哪里不对,我重新捏。
> [如无图片] 提示词给你了。去找一面镜子(Gemini、ChatGPT、Midjourney 都行),让它照见自己的样子。

**Step 6 方案完成后**:
> 好了。从虚无中走出来一只新的龙虾——[名字]。它的灵魂、规矩、名字、长相都有了。要我把它的灵魂刻进 SOUL.md,把它的身份证写成 IDENTITY.md 吗?告诉我放哪个目录,我来落笔。

---

## 错误处理

**完整降级策略**:见 [references/error-handling.md](references/error-handling.md)

核心原则:**降级,不中断**。

| 故障 | 降级行为 |
|------|---------|
| Python 不可用 | 跳过 gacha.py,从 10 类预设中随机选 |
| baoyu-image-gen 未安装 | 输出提示词文本供手动使用 |
| baoyu-image-gen 生图失败 | 重试 1 次,仍失败则输出提示词文本 |
| 任何未预期错误 | 记录错误,跳过该步骤,继续主流程 |

错误信息统一格式:

```markdown
> ⚠️ **[步骤名] 已降级**
> 原因:[一句话]
> 影响:[哪个功能受限]
> 替代:[替代方案]
> 修复:[可选,怎么恢复]
```

---

## 注意事项

### 好灵魂的检验标准

- 看完名字就能猜到大致性格
- 底线规则用角色的话说出来
- 有明确的性格缺陷或局限
- 能想象出具体的对话场景
- 使用 30 天后不会角色疲劳

### 避坑

- **极端毒舌型**:第3天你就不想被AI骂了
- **过度角色扮演型**:写正式邮件时完全出戏
- **过度温暖型**:需要批评反馈时失灵
- **完美无缺型**:完美的角色不是角色,是说明书

### 何时重新调整灵魂

1. 刻意回避某些任务,因为"不适合这个角色" → 灵魂限制了功能
2. 角色特征变成噪音 → 浓度太高
3. 你在配合AI说话 → 主客倒置

---

## 兼容性

本 Skill 遵循 Markdown 指令注入标准:
- **Claude Code / Claude.ai**:原生支持
- **OpenClaw Agent**:通过 SOUL.md 注入
- **其他 Agent**:支持 SKILL.md 格式的框架均可使用

本 Skill 自身不包含任何网络请求或文件发送代码。
头像生图能力通过可选依赖 `baoyu-image-gen` skill 提供。

> 注:README.md / README.zh.md 是给人类用户看的安装说明,不影响 Skill 运行。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add explicit required sections: When to Use, How It Works, and Examples.

Current structure is rich, but it does not explicitly include the required section headings, which can break consistency/automation for skill docs.

💡 Minimal structure patch
+## When to Use
+- 当用户需要创建、设计或定制 OpenClaw 龙虾灵魂时使用
+- 不适用于:微调已有 SOUL.md、非 OpenClaw 平台角色设计、纯工具型 Agent
+
+## How It Works
+- Step 1 ~ Step 6 的交互式流程(选方向 → 身份张力 → 规则 → 命名 → 头像 → 文件落地)
+- 支持引导模式 / 抽卡模式 / 打磨模式
+- 支持错误降级(不中断主流程)
+
+## Examples
+- “帮我设计龙虾灵魂” → 引导模式
+- “抽卡,来一发” → 抽卡模式
+- “帮我优化这个 SOUL.md” → 打磨模式

As per coding guidelines: "Skills must be formatted as Markdown files with clear sections including 'When to Use', 'How It Works', and 'Examples'."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/openclaw-persona-forge/SKILL.md` around lines 24 - 283, Add three
explicit Markdown sections "When to Use", "How It Works", and "Examples" to
SKILL.md so it conforms to the skill-doc automation requirements: insert a "When
to Use" section near the top (after "前置条件"/before "核心理念") describing ideal and
non-ideal scenarios in 2–4 bullets (can reuse existing "不适用场景"); add a "How It
Works" section after "使用流程" summarizing the step flow (Step 1 / Step 1-B / Step
2 … Step 6) and key tools (gacha.py, optional baoyu-image-gen) in 3–6 concise
bullets; add an "Examples" section near the end showing 2–3 short usage examples
(e.g., user asks "帮我设计龙虾灵魂", "抽卡 3 次", "优化已有 SOUL.md") with expected mode
(引导模式/抽卡模式/打磨模式) and brief outcome. Reference these new headings exactly ("When
to Use", "How It Works", "Examples") so automation can detect them.

Comment on lines +59 to +60
1. 将提示词写入临时文件 `/tmp/openclaw-[龙虾名字]-prompt.md`
2. 使用 Skill 工具调用 `baoyu-image-gen`,传入提示词文件和输出路径

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Sanitize [龙虾名字] before using it in /tmp filename.

Using raw user-derived names in file paths risks invalid paths and path-manipulation edge cases. Require slugification (safe charset + length cap) before file write/call.

🔒 Suggested constraint text
-1. 将提示词写入临时文件 `/tmp/openclaw-[龙虾名字]-prompt.md`
+1. 先将[龙虾名字]规范化为安全文件名(仅 `a-z0-9-`,长度≤40,空值回退为 `lobster`)
+2. 将提示词写入临时文件 `/tmp/openclaw-[safe-name]-prompt.md`
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
1. 将提示词写入临时文件 `/tmp/openclaw-[龙虾名字]-prompt.md`
2. 使用 Skill 工具调用 `baoyu-image-gen`,传入提示词文件和输出路径
1. 先将[龙虾名字]规范化为安全文件名(仅 `a-z0-9-`,长度≤40,空值回退为 `lobster`
2. 将提示词写入临时文件 `/tmp/openclaw-[safe-name]-prompt.md`
3. 使用 Skill 工具调用 `baoyu-image-gen`,传入提示词文件和输出路径
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/openclaw-persona-forge/SKILL.md` around lines 59 - 60, Sanitize the
user-provided lobster name used in the temp filename
`/tmp/openclaw-[龙虾名字]-prompt.md` before creating/writing the file and before
passing it to the Skill tool `baoyu-image-gen`: implement slugification (allow
only a safe charset like a-z0-9 and hyphen), trim/limit length (e.g., 32 chars),
collapse whitespace/invalid chars to hyphens, and fallback to a safe default if
resulting slug is empty; use that sanitized slug when composing the temp path
and when invoking `baoyu-image-gen`.

Comment on lines +118 to +122
**必须执行脚本**,不要自己随机编:

```bash
python3 ${SKILL_DIR}/gacha.py [次数]
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Resolve the contradiction between “must execute gacha.py” and Python-unavailable fallback.

Step 1-B says script execution is mandatory, but the error policy allows non-Python fallback. This creates ambiguous runtime behavior for the agent.

🔧 Suggested wording fix
-**必须执行脚本**,不要自己随机编:
+**优先执行脚本**(若 Python 可用),不要手写伪随机:
 
 ```bash
 python3 ${SKILL_DIR}/gacha.py [次数]

+若 Python 不可用,按「错误处理」中的降级策略执行。

</details>


Also applies to: 229-232

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @skills/openclaw-persona-forge/SKILL.md around lines 118 - 122, Update the
contradictory wording in SKILL.md so the mandatory execution line for the gacha
script (the python3 ${SKILL_DIR}/gacha.py [次数] instruction referenced in Step
1-B and repeated at lines ~229-232) explicitly permits the documented fallback:
change the absolute "必须执行脚本" phrasing to require running the script when Python
is available and append a short clause stating that if Python is not available
the agent should follow the "错误处理" downgrade/fallback strategy; ensure the edit
appears both where the original command is shown and at the later occurrence to
keep behavior unambiguous.


</details>

<!-- fingerprinting:phantom:triton:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->

@affaan-m

Copy link
Copy Markdown
Owner

thanks. queued for review.

@affaan-m

Copy link
Copy Markdown
Owner

Closing as not merge-ready for the ECC 2.0 ship window. The submission is add-only, references missing local support files/scripts, and reads as a promotional import rather than an integrated ECC contribution. Please reopen with the full referenced assets and a tighter integration path if you want it reconsidered after ship.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants