X Research logo

X Research

Community
artwist-polyakov
x-research

X/Twitter research via xAI Grok API with x_search tool. Digests, thread analysis, trending topics, custom search. Designed for finding Telegram post ideas from X discussions. Triggers: x research, twitter research, x digest, twitter digest, что в твиттере, дайджест твиттера, тренды x, trending x, analyze tweet, анализ твита, x search, поиск в твиттере.

Overview

Publisherartwist-polyakov
Repositorypolyakov-claude-skills
Skill namex-research
Stars
218
Forks
55
Bundled files
11
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 11 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by artwist-polyakov on GitHub. Read the source before you install it.

Installation

Install the X Research AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/artwist-polyakov/polyakov-claude-skills/tree/main/plugins/x-research/skills/x-research
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/artwist-polyakov/polyakov-claude-skills.git /tmp/polyakov-claude-skills
mkdir -p .claude/skills
cp -r /tmp/polyakov-claude-skills/plugins/x-research/skills/x-research .claude/skills/x-research
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable X Research in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads X Research on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so X Research is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

x-research

Research X/Twitter via xAI Grok API. Grok's x_search tool searches X in real-time and returns synthesized analysis with citations.

Перед запуском

Перед любым запуском скриптов создай рабочую копию скилла в /home/claude/x-research и работай уже из неё:

bash
sh scripts/prepare_runtime.sh
cd /home/claude/x-research

prepare_runtime.sh копирует скилл и, если есть config/.env, нормализует его через sed -i: некавыченные значения с пробелами оборачиваются в кавычки в рабочей копии. Не выводи содержимое .env в ответ; при ошибке формата подскажи пользователю, какие строки нужно заключить в кавычки.

Config

Get an xAI API key at console.x.ai, then:

bash
cp config/.env.example config/.env

Edit config/.env: paste your key into XAI_API_KEY, configure accounts and topics. Quote any value that contains spaces so the file stays shell-compatible. Шаг подготовки также чинит некавыченные значения с пробелами в скопированном .env.

Without .env: skill works with explicit --accounts, --query, --topics.

With .env: digests and trending ready out of the box.

Category registry (same pattern as telegram-channel-parser):

bash
X_CATEGORIES=ai,crypto         # available categories
X_DEFAULT_CATEGORY=ai           # default for "digest" without specifying

X_ACCOUNTS_AI_LABEL="AI & ML"
X_ACCOUNTS_AI=elonmusk,sama,AndrewYNg

X_TOPICS_AI=AI,LLM,GPT,Claude,agents,AGI

Agent algorithm for digest/trending:

  1. Read config/.env
  2. Parse X_CATEGORIES to get available categories
  3. For each: X_ACCOUNTS_<ID> = handles, X_TOPICS_<ID> = topics, X_ACCOUNTS_<ID>_LABEL = name
  4. Match user request to category label or use X_DEFAULT_CATEGORY
  5. Pass to script via --accounts / --topics

Priority: --accounts/--topics explicit > category from .env > agent asks.

Details: config/README.md.

Philosophy

  1. Live-first — every call makes a fresh API request. Real-time data, never stale.
  2. Artifact store — each run saves an immutable snapshot in cache/runs/. Use --prefer-cache to reuse.
  3. Structured output — digest/trending/search return JSON with individual items for machine consumption.
  4. Context hygiene — stdout limited to 30 lines. Full data in artifact file.
  5. Config-driven model — model set in .env, auto-fallback if unavailable.

Workflow

Digest of subscribed accounts

bash
# Default category from .env
bash scripts/digest.sh --period today

# Specific category
bash scripts/digest.sh --category crypto --period week

# Explicit accounts (no .env needed)
bash scripts/digest.sh --accounts "elonmusk,sama" --period today

Returns: structured items (author, date, summary, engagement, URL, topic) + Telegram post ideas.

Analyze a post/thread/topic

bash
# By description
bash scripts/analyze.sh --query "Elon Musk's thread about open source AI"

# By URL
bash scripts/analyze.sh --url "https://x.com/elonmusk/status/123456" --query "context about the post"

# With time period
bash scripts/analyze.sh --query "debate about AI regulation" --period week

Returns: main thesis, key arguments, community reaction, sentiment, interesting findings, Telegram post angles.

Trending topics

bash
# Default topics from .env
bash scripts/trending.sh --period today

# Specific topics
bash scripts/trending.sh --topics "Bitcoin,Ethereum,DeFi" --period today

# Category
bash scripts/trending.sh --category ai --period week

Returns: structured items (topic, summary, sentiment, key voices, engagement) + Telegram post ideas.

Custom search

bash
# Free search
bash scripts/search.sh --query "Claude 4 reactions" --period week

# Search within specific accounts
bash scripts/search.sh --query "AI safety" --accounts "sama,ylecun" --period today

Returns: structured items + narrative summary + Telegram post ideas.

Reuse previous results

bash
# Read last digest without making an API call
bash scripts/digest.sh --category ai --period today --prefer-cache

# Find artifact manually
bash scripts/find_latest.sh --script digest --category ai --period today

Scripts

bash
bash scripts/<script>.sh [params]
ScriptDescriptionKey params
digest.shDigest of subscribed accounts--category, --accounts, --period
analyze.shDeep analysis of post/thread/topic--query, --url, --period
trending.shTrending topics by interests--category, --topics, --period
search.shCustom search query--query, --accounts, --period
find_latest.shFind latest cached artifact--script, --category, --query, --period

Common parameters

ParamRequiredDefaultDescription
--accountsnofrom .envX handles, comma-separated (without @)
--categorynofrom .envCategory ID from X_CATEGORIES
--periodnotodayTime range: 1h, today, yesterday, week, Nd
--queryvaries—Search query or post description
--topicsnofrom .envTopics for trending, comma-separated
--urlno—X post URL for analyze
--limitno30Max output lines
--prefer-cacheno—Use latest cached artifact if available
--refreshno—Force live request (default behavior)

Artifact store

Each run saves a JSON artifact in cache/runs/ with full metadata:

json
{
  "meta": {
    "script": "digest",
    "category": "ai",
    "handles": ["elonmusk", "sama"],
    "period": "today",
    "from_date": "2026-04-01",
    "to_date": "2026-04-01",
    "model": "grok-4-1-fast-reasoning",
    "created_at": "2026-04-01T14:30:22Z",
    "run_id": "a1b2c3"
  },
  "items": [...],
  "ideas": [...],
  "summary": "...",
  "text": "...",
  "citations": [...]
}

Index: cache/index.jsonl — one JSON line per run for fast lookup.

API limits

  • x_search: max 10 handles per allowed_x_handles (auto-batched if more)
  • Rate limits: tier-based, see docs.x.ai/developers/rate-limits
  • Tool pricing: x_search invocations billed separately from tokens
  • Model fallback: if primary model unavailable (HTTP 422/400), auto-retry with grok-4.20-reasoning

Limitations

  • Only public posts (x_search does not access private/protected accounts)
  • x_search is a server-side Grok tool — we get synthesized analysis, not raw post data
  • Structured JSON output depends on model compliance; fallback to plain text if parsing fails
  • No DM access, no analytics data (only public engagement metrics)

Advanced scenarios: references/API_REFERENCE.md

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the X Research AI skill do?

X/Twitter research via xAI Grok API with x_search tool. Digests, thread analysis, trending topics, custom search. Designed for finding Telegram post ideas from X discussions. Triggers: x research, twitter research, x digest, twitter digest, что в твиттере, дайджест твиттера, тренды x, trending x, analyze tweet, анализ твита, x search, поиск в твиттере.

Why use X Research on TypingMind?

Because you install it once and use it with any model. X Research is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install X Research in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/artwist-polyakov/polyakov-claude-skills/tree/main/plugins/x-research/skills/x-research. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use X Research?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with X Research?

As many as you like. As long as a model supports skills, you can use X Research with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the X Research AI skill free?

Yes. It is published on GitHub by artwist-polyakov under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇