--- name: distill description: >- Generate a celebrity/persona distillation skill by scraping their X (Twitter) account and analyzing their thinking patterns, communication style, and mental models. allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebSearch user-invocable: true emoji: "🧬" --- # Distill β€” Celebrity Persona Distillation Scrape any X (Twitter) account using the Dokobot CLI, analyze the person's tweets, and generate a structured persona SKILL.md that captures their thinking patterns, communication style, mental models, and decision heuristics. Works with any AI agent that can run shell commands: Claude Code, Cursor, Windsurf, Codex, OpenClaw, etc. **Prerequisites**: [Dokobot CLI](https://dokobot.ai) (`npm i -g dokobot`), Chrome with Dokobot extension, native bridge (`npx dokobot install-bridge`). **Usage**: `/distill [--screens N] [--output PATH] [--lang zh|en]` Arguments: $ARGUMENTS ## Parameters - `x_handle_or_url` (required): X handle (e.g. `@elonmusk` or `elonmusk`) or full URL (e.g. `https://x.com/elonmusk`) - `--screens N`: Number of screens to scroll on the profile page (default: 10, more = more tweets collected) - `--output PATH`: Output directory for the generated SKILL.md (default: current working directory) - `--lang zh|en`: Output language β€” `zh` for Chinese, `en` for English (default: auto-detect from the person's primary language) ## Workflow Follow these steps **exactly in order**. Do NOT skip steps or combine them. ### Step 1: Parse Input Extract the X handle from the arguments: - If a URL like `https://x.com/username` or `https://twitter.com/username` β†’ extract `username` - If `@username` β†’ extract `username` - If bare `username` β†’ use as-is Set defaults: - `screens` = 10 (or from `--screens`) - `output` = current working directory (or from `--output`) - `lang` = auto (or from `--lang`) ### Step 2: Scrape X Profile ```bash npx dokobot doko read "https://x.com/" --local --screens --timeout 600 > /tmp/distill-raw-.txt ``` ### Step 3: Continue Scrolling (if needed) If the output contains `Session:` with an ID, continue reading: ```bash npx dokobot doko read "https://x.com/" --local --session-id --screens 10 --timeout 600 >> /tmp/distill-raw-.txt ``` Repeat up to 3 times or until you have enough material (~50+ tweets). ### Step 4: Save Tweets to Separate File Extract all tweets by this person from the raw data and save to `/-skill/tweets.md`: ```markdown # @ Tweets > Source: https://x.com/ > Scraped: > Screens: ## Original Tweets ### . Likes: | Reposts: | Views: --- ## Retweets & Engagement List the accounts/tweets this person retweeted or quote-tweeted, grouped by theme. ``` Only include tweets authored by `@` in "Original Tweets". Retweeted content goes in "Retweets & Engagement". ### Step 5: Web Search for Context (optional) Append results to `tweets.md` under a `## Background Context` section. ```bash npx dokobot doko read "https://en.wikipedia.org/wiki/" --local --screens 5 --timeout 300 ``` ### Step 6: Analyze and Distill From `tweets.md`, extract: - **Profile Summary**: name, handle, bio, domain, follower count, posting frequency - **Core Mental Models** (3-7): recurring thinking frameworks with example tweets - **Decision Heuristics** (3-8): rules of thumb with application context - **Expression DNA**: sentence style, vocabulary, tone, rhetorical devices, quirks - **Core Topics**: themes with approximate frequency - **Signature Quotes**: 5-10 most representative ### Step 7: Generate SKILL.md Generate `/-skill/SKILL.md`: ```markdown --- name: -persona description: >- AI persona capturing the thinking patterns, decision frameworks, and communication style of (@). Distilled from their X/Twitter presence. emoji: "🎭" metadata: author: dokobot-distill version: "1.0.0" source: "https://x.com/" distilled_at: "" tweets_analyzed: --- # β€” AI Persona ## Activation Triggers - "δΌšζ€ŽδΉˆηœ‹" / "What would think" - "η”¨ηš„θ§†θ§’" / "From 's perspective" - "εˆ‡ζ’εˆ°ζ¨‘εΌ" / "Switch to mode" ## Source Material Raw tweets and engagement data are in [tweets.md](tweets.md). ## Core Mental Models ### 1. (NO inline tweet quotes β€” reference tweets.md) ## Decision Heuristics | # | Heuristic | Rule | When to Apply | |---|-----------|------|---------------| | 1 | | | | ## Expression DNA ### Voice Characteristics - **Sentence style**: - **Vocabulary**: - **Tone**: - **Rhetorical devices**: - **Quirks**: ### Communication Rules 1. 2. ## Core Topics ## Operational Protocol 1. **Read** tweets.md to refresh on this persona's voice 2. **Classify** the user's question 3. **Select** relevant mental models 4. **Draft** response applying Expression DNA rules 5. **Verify** authenticity against tweets.md 6. Search for current data if factual claims are needed ``` ### Step 8: Report to User 1. Show the output file path 2. Brief summary (tweets analyzed, key models found) 3. Suggest how to use: add SKILL.md to your agent's instructions ## Error Handling - If connection fails: ensure Chrome is open with Dokobot extension, and native bridge is installed (`npx dokobot install-bridge`) - If no tweets returned: check if the handle is correct or if the account is private