← Back to Skills Marketplace
runshengdu

Copy Brain

by runshengdu · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
42
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install copy-brain
Description
Copy a public figure's thinking into a callable "thinking skill". For a given scenario, extract and replicate their **thinking style, mental models, reasonin...
README (SKILL.md)

\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.md is the skill root directory (hereafter \x3CSKILL_DIR>).\r All paths below are relative to \x3CSKILL_DIR>. Before running any script, first cd into \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

  1. List the .md files under \x3CSKILL_DIR>/output/ (ignore .gitkeep; ignore stray intermediate files like .json, see Step 4.1).\r
  2. 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
  3. 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
Usage Guidance
Install only if you are comfortable using Tavily, ScrapeBadger, and RedFox for research. Do not include confidential names, private investigation terms, secrets, or sensitive URLs in searches, and review any generated persona skill before reusing it because it can shape future agent reasoning.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
The network search, platform retrieval, source collection, drafting, and final persona-skill generation all fit the stated goal of building a public-source thinking-style skill.
Instruction Scope
The workflow asks the agent to use built-in search first, optionally call Tavily, ScrapeBadger, and RedFox, keep sources, preview the draft, and save only after confirmation; users should understand that search terms and target IDs can be sent to those services.
Install Mechanism
The package contains markdown instructions, small Python helper scripts, and a single requests dependency; no installer, background worker, obfuscation, or automatic startup behavior was found.
Credentials
The declared API keys are purpose-aligned and documented in the skill metadata and instructions; scripts read only the relevant service keys and do not scan broader local data.
Persistence & Privilege
Persistence is limited to the final generated markdown skill under the skill output directory after user confirmation, with optional script output support present but discouraged by the workflow.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install copy-brain
  3. After installation, invoke the skill by name or use /copy-brain
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
copy-brain 1.0.1 - Full SKILL.md rewritten in English for broader accessibility. - All workflow steps, usage instructions, and quality/ethics notes translated into concise English with terminology clarified. - No functional changes; guidance, path conventions, API usage, and environment variable setup remain the same. - Previous Chinese documentation replaced with an equivalent detailed English version.
v1.0.0
Initial release of copy-brain. - Enables creation of a "thinking skill" that replicates a public figure's reasoning, mental models, and decision logic. - Guides users through confirming the person, configuring optional API keys for data sources, and searching for primary material. - Focuses on capturing how the person thinks, not just mimicking their tone or phrases. - Collects and cites key examples from verified sources to build the skill for a chosen scenario. - Enforces ethical standards: no uncited claims, no private info, and no impersonation for fraudulent use.
Metadata
Slug copy-brain
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 42 downloads so far.

How do I install Copy Brain?

Run "/install copy-brain" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Copy Brain free?

Yes, Copy Brain is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Copy Brain support?

Copy Brain is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Copy Brain?

It is built and maintained by runshengdu (@runshengdu); the current version is v1.0.1.

💬 Comments