dokobot

distill

Generate a celebrity/persona distillation skill by scraping their X (Twitter) account and analyzing their thinking patterns, communication style, and mental models.

dokobot 9 Updated 1mo ago

Resources

3
GitHub

Install

npx skillscat add dokobot/distill-skill

Install via the SkillsCat registry.

SKILL.md

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 (npm i -g dokobot), Chrome with Dokobot extension, native bridge (npx dokobot install-bridge).

Usage: /distill <x_handle_or_url> [--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

npx dokobot doko read "https://x.com/<USERNAME>" --local --screens <SCREENS> --timeout 600 > /tmp/distill-raw-<USERNAME>.txt

Step 3: Continue Scrolling (if needed)

If the output contains Session: with an ID, continue reading:

npx dokobot doko read "https://x.com/<USERNAME>" --local --session-id <SESSION_ID> --screens 10 --timeout 600 >> /tmp/distill-raw-<USERNAME>.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 <OUTPUT>/<username>-skill/tweets.md:

# @<username> Tweets

> Source: https://x.com/<username>
> Scraped: <ISO_DATE>
> Screens: <N>

## Original Tweets

### <N>. <date>
<tweet text>

Likes: <N> | Reposts: <N> | Views: <N>

---

## Retweets & Engagement

List the accounts/tweets this person retweeted or quote-tweeted, grouped by theme.

Only include tweets authored by @<USERNAME> 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.

npx dokobot doko read "https://en.wikipedia.org/wiki/<PERSON_NAME>" --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 <OUTPUT>/<username>-skill/SKILL.md:

---
name: <username>-persona
description: >-
  AI persona capturing the thinking patterns, decision frameworks, and communication
  style of <Full Name> (@<username>). Distilled from their X/Twitter presence.
emoji: "🎭"
metadata:
  author: dokobot-distill
  version: "1.0.0"
  source: "https://x.com/<username>"
  distilled_at: "<ISO_DATE>"
  tweets_analyzed: <COUNT>
---

# <Full Name> — AI Persona

<One paragraph bio>

## Activation Triggers

- "<Name>会怎么看" / "What would <Name> think"
- "用<Name>的视角" / "From <Name>'s perspective"
- "切换到<Name>模式" / "Switch to <Name> mode"

## Source Material

Raw tweets and engagement data are in [tweets.md](tweets.md).

## Core Mental Models

### 1. <Model Name>
<Description — reference tweets by number, e.g. "see tweet #3">

(NO inline tweet quotes — reference tweets.md)

## Decision Heuristics

| # | Heuristic | Rule | When to Apply |
|---|-----------|------|---------------|
| 1 | <Name> | <Rule> | <Context> |

## Expression DNA

### Voice Characteristics
- **Sentence style**: <description>
- **Vocabulary**: <description>
- **Tone**: <description>
- **Rhetorical devices**: <description>
- **Quirks**: <description>

### Communication Rules
1. <Rule 1>
2. <Rule 2>

## Core Topics
<Bulleted list with estimated frequency>

## 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