Copy Brain
/install copy-brain
\r \r
copy-brain\r
\r Copy a public figure specified by the user into a callable thinking skill.\r \r
The core is not imitating tone, but replicating the "brain". Tone and wording are only surface-level; what we truly want to capture is how this person thinks, how they weigh trade-offs, and how they make decisions under uncertainty. The final skill should enable the agent to reason out the answer this person would likely give on a new problem using their thinking style, rather than reusing things they have already said.\r Path convention: The directory containing this
SKILL.mdis the skill root directory (hereafter\x3CSKILL_DIR>).\r All paths below are relative to\x3CSKILL_DIR>. Before running any script, firstcdinto\x3CSKILL_DIR>(the directory containing this SKILL.md); output/template paths are resolved relatively in the same way.\r \r
Workflow\r
\r
Step 0 / 1: Check the output directory and determine the persona\r
\r
- List the
.mdfiles under\x3CSKILL_DIR>/output/(ignore.gitkeep; ignore stray intermediate files like.json, see Step 4.1).\r - If skill files already exist: list them for the user and ask "Do you want to reuse one of the existing skills, or create a new persona skill?".\r
- If they choose to reuse → read that file and complete the user's subsequent request based on it, then end this workflow.\r
- If the directory is empty: directly ask "Whose thinking would you like to copy?".\r \r Once you have the persona's name, do a lightweight confirmation: is the name unique (if there are namesakes, ask the user to add field/nationality), and determine a slug for the filename (pinyin or English, lowercase, hyphenated).\r \r ---\r \r
Step 2: Check and explain the API Keys\r
\r
This skill can use three data sources (recommended but not required; skip whichever is missing). Ask the user to configure the corresponding API Keys in their computer's system environment variables using the variable names in the table below:\r
\r
| Service | Env Variable | Purpose | Sign Up |\r
|------|-----------|------|------|\r
| Tavily | TAVILY_API_KEY | Fallback search when the built-in search is poor (stale results / multilingual / poor matching); good at non-Chinese / non-China content | https://app.tavily.com |\r
| ScrapeBadger | SCRAPEBADGER_API_KEY | Fetch the persona's profile and posts on X (Twitter) | https://scrapebadger.com/dashboard |\r
| RedFox | REDFOX_API_KEY | Fetch Xiaohongshu and WeChat Official Account articles | https://redfox.hk/dashboard/keys |\r
\r
Explain the table above to the user (purpose + recommended setup). How to configure (after setting, you must reopen the terminal for it to take effect):\r
\r
# Windows PowerShell (persist to user environment variables)\r
setx TAVILY_API_KEY "your_key"\r
setx SCRAPEBADGER_API_KEY "your_key"\r
setx REDFOX_API_KEY "your_key"\r
```\r
\r
```bash\r
# macOS / Linux (add to ~/.zshrc or ~/.bashrc)\r
export TAVILY_API_KEY="your_key"\r
export SCRAPEBADGER_API_KEY="your_key"\r
export REDFOX_API_KEY="your_key"\r
```\r
\r
Check the current configuration:\r
\r
```bash\r
python scripts/check_keys.py\r
```\r
\r
> If dependencies are missing, install first: `pip install -r requirements.txt` (run in `\x3CSKILL_DIR>`)\r
\r
- The script signals that a service is not configured with `EXIT_NO_KEY` (exit code 2) + a stderr message.\r
- Even if none of the three are configured, you can continue using just the agent's built-in web search + web extraction tools, only with narrower coverage. **Do not force the user to configure them**.\r
- The Tavily script only exposes 3 search parameters: `query` (required), `--search-depth` (optional, basic/advanced/fast/ultra-fast, default basic), `--time-range` (optional, day/week/month/year). For full text, use the built-in web extraction tool on the result URLs.\r
\r
---\r
\r
### Step 3: Search background → determine scenario\r
\r
1. **First use the agent's built-in web search** to do a **quick background check** on the persona (identity, field, notable achievements, active platforms). If the built-in results are poor (stale / multilingual / poor matching), use Tavily as a fallback:\r
\r
```bash\r
python scripts/tavily_search.py "{persona} bio background"\r
# When you need higher relevance or a time window:\r
python scripts/tavily_search.py "{persona} bio background" --search-depth advanced --time-range year\r
```\r
\r
2. Summarize the quick-check highlights to the user in 2-4 sentences, then **ask about the scenario**: "In which scenario would you like to think/decide using this persona's **thinking style**?" and offer a few candidate examples (tailored to the persona's traits), emphasizing **thinking and judgment** rather than tone.\r
\r
After the user confirms the scenario, record `scenario` and its slug.\r
\r
---\r
\r
### Step 4: Deep search → draft → confirm → save\r
\r
**4.1 Collect deeply and broadly** (multiple angles, multiple keywords). **Prioritize first-hand original platform sources**—as long as a Key is configured, use the scripts below as much as possible, treating the persona's own posts/notes/articles as the primary corpus; supplement general background/commentary with the built-in search (Tavily fallback when poor):\r
Every script supports `-h` to view its parameters.\r
\r
```bash\r
# ① First-hand platform sources (primary)—X platform (persona is active on X and ScrapeBadger is configured)\r
python scripts/scrapebadger.py profile {x_username}\r
python scripts/scrapebadger.py tweets {x_username} --pages 3\r
# You can also precisely search their tweets by topic (advanced operators):\r
python scripts/scrapebadger.py search "from:{x_username} {scenario_keywords}" --type Latest --pages 2\r
\r
# ① First-hand platform sources (primary)—Xiaohongshu / WeChat Official Accounts (Chinese personas, RedFox configured)\r
python scripts/redfox_xhs.py search "{persona}" --pages 2\r
python scripts/redfox_gzh.py search "{persona} {scenario_keywords}" --sort _4 --pages 2\r
# After a hit, use detail / work to pull the full text of a single piece to get the complete reasoning:\r
python scripts/redfox_xhs.py detail --id {workId}\r
python scripts/redfox_gzh.py work {workUuid}\r
\r
# ② General background, views, controversies, recent developments—built-in search first, Tavily fallback when poor\r
python scripts/tavily_search.py "{persona} {scenario_keywords}" --search-depth advanced\r
python scripts/tavily_search.py "{persona} views quotes interview" --time-range year\r
```\r
\r
Every fact/view/piece of reasoning must keep a **source link**; especially preserve original excerpts that reveal "**why he thinks this way**".\r
\r
- **Read the full text**: both the built-in search and Tavily return summaries/snippets; to read the full text, use the agent's built-in web extraction tool on the result URLs. If a platform post fetched by a script only has a summary, use `redfox_*.py detail/work` or extract the original link to get the full text.\r
- **Do not save intermediate JSON to disk**: the scripts print JSON to the terminal stdout by default, and the agent can just read the terminal output. **Do not** use `--out`, and **do not** save `.json` or other intermediate collection files under `output/`. `output/` only holds the final persona skill `.md` (see 4.3). If you accidentally generate a `.json` under `output/` or an `output/output/` subdirectory, delete it after saving the `.md`.\r
\r
**4.2 Generate the draft**: apply the structure of `\x3CSKILL_DIR>/templates/persona_skill_template.md`, filling it in for the chosen scenario. **Present the draft to the user for preview**, explain the data sources and collection time, and proactively point out areas that are uncertain / lack evidence.\r
**4.3 Save after confirmation**: once the user agrees, save to:\r
\r
```\r
\x3CSKILL_DIR>/output/{people_name_slug}-{scenario_slug}.md\r
```\r
\r
After saving, tell the user the file path and note: this file is itself a persona skill with frontmatter and can be reused.\r
\r
## Quality and Ethics Requirements\r
- Factual claims need sources; distinguish between "facts" and "stylistic simulation". Do not fabricate quotes or falsify data.\r
- Do not use this to impersonate the actual person for fraud, defamation, or misleading purposes; do not include private/non-public information.\r
- Search with the utmost rigor. If the information found is insufficient to copy the public figure's thinking, stop generating the draft and inform the user.\r
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install copy-brain - 安装完成后,直接呼叫该 Skill 的名称或使用
/copy-brain触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Copy Brain 是什么?
Copy a public figure's thinking into a callable "thinking skill". For a given scenario, extract and replicate their **thinking style, mental models, reasonin... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 42 次。
如何安装 Copy Brain?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install copy-brain」即可一键安装,无需额外配置。
Copy Brain 是免费的吗?
是的,Copy Brain 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Copy Brain 支持哪些平台?
Copy Brain 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Copy Brain?
由 runshengdu(@runshengdu)开发并维护,当前版本 v1.0.1。