Agent skill

X/Twitter Research via Grok

by artwist-polyakov in artwist-polyakov/polyakov-claude-skills

Searches X/Twitter through the xAI Grok API to build digests, trend reports and thread analysis, meant to surface post ideas for a Telegram channel.

MITAuto-check: notesWriting & Content

Install X/Twitter Research via Grok

skills CLI
$ npx skills add artwist-polyakov/polyakov-claude-skills --skill x-research -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install artwist-polyakov/polyakov-claude-skills x-research --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/artwist-polyakov/polyakov-claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/x-research/skills/x-research .claude/skills/x-research && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
x-research
GitHub stars
208
Token cost
~1.8k tokens
SKILL.md length
546 words
Files
15 (incl. scripts, references)
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

Searches X/Twitter through the xAI Grok API to build digests, trend reports and thread analysis, meant to surface post ideas for a Telegram channel.

  • Works in 5 steps: Read config/.env → Parse X_CATEGORIES to get available… → For each: X_ACCOUNTS_ = handles,… → …
  • Building a digest of what tracked X accounts posted recently
  • SKILL.md covers Перед запуском, Config, Philosophy and Workflow, plus 5 more sections
  • Runs Shell scripts from its folder; calls bash and sh; reaches x.com; needs XAI_API_KEY

What it does

The skill wraps Grok's x_search tool, which searches X in real time and returns a synthesized, cited answer. Before running any script it copies itself into a working directory and normalizes the config file so unquoted values with spaces are quoted, without ever printing the file's contents. An xAI API key from console.x.ai goes into config/.env along with the accounts and topics to track, organized into named categories the same way a companion telegram-channel-parser skill does; without a .env file the scripts still take explicit account, query and topic arguments.

Its stated design rules are to make a live API call every time rather than reuse stale data, to save an immutable snapshot of each run under cache/runs/ that a --prefer-cache flag can reuse, to return structured JSON for digest, trending and search results, to cap terminal output at 30 lines while keeping full data in the artifact file, and to read the model choice from config with an automatic fallback. Shell scripts handle the digest, trending lookup, search and a small test suite. The excerpt is cut off inside the digest workflow example.

When your agent uses it

  • Building a digest of what tracked X accounts posted recently
  • Pulling trending topics on X for a given category
  • Researching a topic on X to find ideas for a Telegram post

Example prompts

  • “Give me today's digest for the AI category accounts I follow on X.”
  • “Search X for discussion of the latest crypto regulation news and summarize it.”
  • “Show me trending X topics for the crypto category and cite the sources.”

Requirements

  • An xAI API key
  • A shell environment to run the bash scripts

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

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

What it can do on your machine

Read from SKILL.md and the folder at commit 8bbeead. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 10 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • sh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • x.com

    Also links to:

    • console.x.ai
    • docs.x.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • XAI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

X/Twitter Research via Grok loads about 1.8k tokens when it runs, and up to ~2.7k if it reads all its reference files. Until then it costs about 91 tokens; SKILL.md has 546 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:25
    .sh` копирует скилл и, если есть `config/.env`, нормализует его через `sed -i`: некавыченные значения с пробелами оборач
  • NoteMentions a .env fileSKILL.md:31
    cp config/.env.example config/.env
  • NoteMentions a .env fileSKILL.md:34
    Edit `config/.env`: paste your key into `XAI_API_KEY`, configure accounts and topics.
  • NoteMentions a .env fileSKILL.md:35
    ые значения с пробелами в скопированном `.env`.
  • NoteMentions a .env fileSKILL.md:37
    **Without `.env`:** skill works with explicit `--accounts`, `--query`, `--topics`.
  • NoteMentions a .env fileSKILL.md:39
    **With `.env`:** digests and trending ready out of the box.
  • NoteMentions a .env fileSKILL.md:53
    1. Read `config/.env`
  • NoteMentions a .env fileSKILL.md:59
    ts`/`--topics` explicit > category from `.env` > agent asks.
  • NoteMentions a .env fileSKILL.md:69
    **Config-driven model** — model set in `.env`, auto-fallback if unavailable.
  • NoteMentions a .env fileSKILL.md:76
    # Default category from .env

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from artwist-polyakov/polyakov-claude-skills at commit 8bbeead, republished under its MIT licence (© artwist-polyakov). 546 words, ~1,810 tokens.

Download SKILL.mdSave it as .claude/skills/x-research/SKILL.md (or your agent's skills folder). This skill also uses 14 other files; get the full folder from GitHub.
name
x-research
description
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, поиск в твиттере.

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.

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.

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
Show full SKILL.md (229 more words)Show less

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

© artwist-polyakov, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 14 other files (scripts, references) in plugins/x-research/skills/x-research of artwist-polyakov/polyakov-claude-skills.

  • SKILL.md
  • .gitignore
  • config/.env.example
  • config/README.md
  • references/API_REFERENCE.md
  • scripts/analyze.sh
  • scripts/common.sh
  • scripts/digest.sh
  • scripts/find_latest.sh
  • scripts/prepare_runtime.sh
  • scripts/sanitize_env.sh
  • scripts/search.sh
  • scripts/tests/run.sh
  • scripts/tests/test_config_loader.sh
  • scripts/trending.sh

Open the folder on GitHubat commit 8bbeead

Compare with similar skills

X/Twitter Research via Grok next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

X/Twitter Research via Grok compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
X/Twitter Research via Grok this skillartwist-polyakov/polyakov-claude-skills208—~1.8kAutomated safety check: NotesMIT
Socialcoreyhaines31/marketingskills54k4 repos~4.5kAutomated safety check: PassMIT
Social Contentfreekmurze/dotfiles1k23 repos~2.1kAutomated safety check: PassNone
Changelog Social RecapFlorianBruniaux/claude-code-ultimate-guide6.1k—~1.8kAutomated safety check: NotesCC-BY-SA-4.0
X Mastery Mentoralchaincyf/x-mentor-skill1.2k—~2.3kAutomated safety check: PassMIT
Content Repurposeririnabuht12-oss/marketing-skills4.1k—~2kAutomated safety check: PassNone

Similar skills

  • Social

    coreyhaines31/marketingskills

    When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, or Facebook, or wants to do social listening and engagement triage.

    54k GitHub starsUsed in 4 repos~4.5k tokens
    Writing & ContentAuto-check passed
  • Social Content

    freekmurze/dotfiles

    When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, Facebook, or other platforms.

    1k GitHub starsUsed in 23 repos~2.1k tokens
    Writing & ContentAuto-check passed
  • Changelog Social Recap

    FlorianBruniaux/claude-code-ultimate-guide

    Turns CHANGELOG.md entries for a release or a week into LinkedIn, Twitter/X, newsletter and Slack posts in French and English.

    6.1k GitHub stars~1.8k tokensUpdated 3 days ago
    Writing & ContentAuto-check: notes
  • X Mastery Mentor

    alchaincyf/x-mentor-skill

    $10K/hr级X/Twitter运营导师。基于Nicolas Cole、Dickie Bush、Sahil Bloom、Justin Welsh、 Dan Koe、Alex Hormozi六位顶级创作者的方法论 + X开源算法深度分析 + AI/科技赛道专精策略, 提炼6个核心心智模型、10条决策启发式、完整的选题-写作-增长操作手册。

    1.2k GitHub stars~2.3k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed
  • Content Repurposer

    irinabuht12-oss/marketing-skills

    Transform one long-form piece into multiple platform-specific content derivatives including LinkedIn posts, tweet threads, email snippets, ad hooks, and video scripts while maintaining voice…

    4.1k GitHub stars~2k tokensUpdated 16 days ago
    Writing & ContentAuto-check passed
  • Kortix Social

    kortix-ai/suna

    Recipe: write platform-native social content for Kortix (LinkedIn posts, X threads, carousels, Instagram, TikTok, Reels and Shorts video scripts, content calendars) and repurpose one long-form piece…

    20k GitHub stars~1.8k tokensUpdated today
    Writing & ContentAuto-check passed

More from artwist-polyakov/polyakov-claude-skills

All 21 skills in this repo
  • Agent Deck Sessions

    artwist-polyakov/polyakov-claude-skills

    Launches, monitors and collects results from child AI agent sessions with the agent-deck terminal session manager.

    208 GitHub stars~965 tokensUpdated 2 days ago
    Auto-check passed
  • Crawl4AI SEO Site Crawler

    artwist-polyakov/polyakov-claude-skills

    Crawls a site with Crawl4AI to audit titles, meta tags, H1s, canonicals, navigation and internal links, and to compare landing pages and competitor sites.

    208 GitHub stars~1.7k tokensUpdated 2 days ago
    Auto-check passed
  • GitHub Pages Publisher

    artwist-polyakov/polyakov-claude-skills

    Publishes already-built static pages to a GitHub Pages repo under a year, year-month and slug folder layout, optimizes large images and returns the public URL.

    208 GitHub stars~1.2k tokensUpdated 2 days ago
    Auto-check passed
  • Perplexity Search and Research

    artwist-polyakov/polyakov-claude-skills

    Shell scripts for web search and research through the Perplexity API: raw results, cited answers, background deep research and page fetching, with results cached on disk.

    208 GitHub stars~2.5k tokensUpdated 2 days ago
    Auto-check: notes
  • Sourcecraft Publisher

    artwist-polyakov/polyakov-claude-skills

    Publish static page artifacts to SourceCraft Sites (Yandex infrastructure, works in Russia), with advisory image optimization and an original-image path.

    208 GitHub stars~990 tokensUpdated 2 days ago
    Auto-check: notes
  • Yandex Metrika

    artwist-polyakov/polyakov-claude-skills

    Яндекс Метрика: детализация трафика по источникам и UTM-меткам, отчёты по конверсиям и поисковым системам, API-сегменты и доступы к счётчикам.

    208 GitHub stars~2.1k tokensUpdated 2 days ago
    Auto-check: notes

Questions about X/Twitter Research via Grok

What does X/Twitter Research via Grok do?

Searches X/Twitter through the xAI Grok API to build digests, trend reports and thread analysis, meant to surface post ideas for a Telegram channel. The skill wraps Grok's x_search tool, which searches X in real time and returns a synthesized, cited answer. Before running any script it copies itself into a working directory and normalizes the config file so unquoted values with spaces are quoted, without ever printing the file's contents.

When should I use X/Twitter Research via Grok?

X/Twitter Research via Grok fits situations like: building a digest of what tracked X accounts posted recently; pulling trending topics on X for a given category; researching a topic on X to find ideas for a Telegram post.

How do I install X/Twitter Research via Grok in Claude Code?

Run `npx skills add artwist-polyakov/polyakov-claude-skills --skill x-research -a claude-code`. Or copy the skill folder (plugins/x-research/skills/x-research in artwist-polyakov/polyakov-claude-skills) into .claude/skills/x-research in your project. Claude Code loads it when a task matches its description.

How do I install X/Twitter Research via Grok in Codex?

Run `npx skills add artwist-polyakov/polyakov-claude-skills --skill x-research -a codex`. Or copy the skill folder (plugins/x-research/skills/x-research in artwist-polyakov/polyakov-claude-skills) into .agents/skills/x-research in your project. Codex loads it when a task matches its description.

Can I use X/Twitter Research via Grok in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add artwist-polyakov/polyakov-claude-skills --skill x-research -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/x-research, .gemini/skills/x-research, .github/skills/x-research and .opencode/skills/x-research in your project.

What does X/Twitter Research via Grok need to run?

Going by SKILL.md and its folder, X/Twitter Research via Grok needs a shell for the scripts in its folder, the command-line tools its instructions call (bash and sh) and credentials named XAI_API_KEY. Our summary lists: An xAI API key; A shell environment to run the bash scripts.

Does X/Twitter Research via Grok access the network?

SKILL.md names 3 domains. In commands or code: x.com; the agent is likely to contact it when it follows the instructions. As links in the text: console.x.ai and docs.x.ai. This is read from the text; nothing was executed.

Is X/Twitter Research via Grok safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does X/Twitter Research via Grok use?

X/Twitter Research via Grok is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does X/Twitter Research via Grok use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 916 tokens, read only when the agent opens those files.

What are the alternatives to X/Twitter Research via Grok?

Skills that share tags, products or a category with X/Twitter Research via Grok: Social (coreyhaines31/marketingskills, 54k stars), Social Content (freekmurze/dotfiles, 1k stars), Changelog Social Recap (FlorianBruniaux/claude-code-ultimate-guide, 6.1k stars) and X Mastery Mentor (alchaincyf/x-mentor-skill, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains X/Twitter Research via Grok?

artwist-polyakov (a GitHub user) maintains it in artwist-polyakov/polyakov-claude-skills, which has 208 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 8, 2026.

Source: artwist-polyakov/polyakov-claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.