grok-x-insights-mcp: Skill for Claude Code

.claude/skills/grok-insights/SKILL.md

grok-insights is a skill for Claude Code from mzkrasner/grok-x-insights-mcp. It costs 30 tokens per session (1,032 once invoked), scanned A, original, MIT.

A skill that searches and analyzes posts on X, formerly known as Twitter, using a locally installed Grok command-line tool.

In plain words
What is it for?
Use it to search a topic on X, analyze social sentiment, identify themes, or study trends over a selected time window.
Why use it?
It gathers recent posts and summarizes sentiment, themes, influencers, or other requested aspects without manually reviewing posts one by one.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is mzkrasner/grok-x-insights-mcp's own configuration. It tells Claude Code how to work on grok-x-insights-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything grok-x-insights-mcp configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node dist/cli.js search "test query" -f text.

Reuse

Borrowing it

Nothing to install: this file belongs to mzkrasner/grok-x-insights-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mzkrasner/grok-x-insights-mcp/main/.claude/skills/grok-insights/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/mzkrasner/grok-x-insights-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for grok-insights

README.md
[![agentmods](https://agentmods.dev/badge/skills/mzkrasner/grok-x-insights-mcp/grok-insights/github.svg)](https://agentmods.dev/skills/mzkrasner/grok-x-insights-mcp/grok-insights)
Your own site
<a href="https://agentmods.dev/skills/mzkrasner/grok-x-insights-mcp/grok-insights"><img src="https://agentmods.dev/badge/skills/mzkrasner/grok-x-insights-mcp/grok-insights/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for grok-insights

Your own site · 80×15
<a href="https://agentmods.dev/skills/mzkrasner/grok-x-insights-mcp/grok-insights"><img src="https://agentmods.dev/badge/skills/mzkrasner/grok-x-insights-mcp/grok-insights.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,032 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00030 $0.01032
Opus 5 $0.00015 $0.00516
Sonnet 5 $0.00006 $0.00206
Haiku 4.5 $0.00003 $0.00103

Measured 12d ago against content hash ce0028765946, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

grok-insights scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/grok-insights/SKILL.md · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Grok X Insights (Local CLI)

Get real-time social intelligence from X/Twitter using the locally installed Grok CLI. This skill uses the CLI built from this repository.

Arguments

$ARGUMENTS

  • A search query or topic to analyze (e.g., "artificial intelligence", "climate change")
  • If blank, will prompt for a topic

Prerequisites

The CLI is installed globally when you run npm install in this repo. Verify it's available:

grok --version

Ensure GROK_API_KEY is set in your environment or .env file.

Available Commands

1. Search Posts

Analyze X/Twitter posts about a topic with sentiment and themes.

grok search "QUERY" --time-window 4hr --limit 30 --analysis both -f text

Options:

  • --time-window or -t: 15min, 1hr, 4hr, 24hr, 7d (default: 4hr)
  • --limit or -l: Max posts to analyze, 1-50 (default: 50)
  • --analysis or -a: sentiment, themes, both (default: both)
  • -f or --format: Output format, json or text (default: json)

2. Analyze Topic

Deep analysis with custom aspects.

grok analyze "TOPIC" --aspects "sentiment,influencers,controversy" --time-window 24hr -f text

Options:

  • --aspects or -a: Comma-separated aspects to analyze
  • --time-window or -t: Time window for analysis
  • --limit or -l: Max posts to analyze

3. Get Trends

Identify trending topics and discussions.

grok trends --category technology --limit 30 -f text

Options:

  • --category or -c: technology, politics, sports, entertainment
  • --limit or -l: Max posts to analyze for trends

4. Chat with Grok

General chat, optionally grounded in X/Twitter data.

grok chat "What are people saying about AI?" --search -f text

Options:

  • --search or -s: Enable X/Twitter search
  • --search-limit or -l: Max posts to search if search enabled
  • --temperature: Response creativity 0.0-1.0 (default: 0.7)

Process

Step 1: Understand the request

Determine what kind of analysis the user wants:

  • Search: Specific topic analysis with sentiment/themes
  • Analyze: Deep dive with custom aspects
  • Trends: What's trending right now
  • Chat: General question, optionally with X data

Read the full file on GitHub · 159 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 159 lines · 30 tokens per session scan A ce0028765946

Subscribe to this mod's changes

grok-insights is a skill published in the GitHub repository mzkrasner/grok-x-insights-mcp (3 stars, last pushed 6mo ago), licensed MIT. It adds 30 tokens to every session and 1,032 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens