grok-ai

grok-ai is a skill for Claude Code from nirholas/XActions. It costs 72 tokens per session (918 once invoked), scanned A, original, Apache-2.0.

Browser scripts that automate conversations with Grok, X/Twitter’s built-in AI assistant, including image requests and tweet analysis.

In plain words
What is it for?
Chat with Grok, send several prompts in sequence, request images, analyze tweets, and export conversation history as JSON.
Why use it?
It removes repetitive copying and pasting when sending prompts, collecting answers, or saving a conversation. It requires X Premium+.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the xactions plugin — 50 skills, 1 command, 8 agents, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nirholas/xactions/grok-ai
Any agent
npx skills add nirholas/XActions --skill grok-ai
Clone the repo
git clone --depth 1 https://github.com/nirholas/XActions

Made for: Claude Code.

Or install xactions, the plugin that ships this one along with the rest of its 50 skills, 1 command, 8 agents, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/nirholas/xactions/grok-ai.svg)](https://agentmods.dev/skills/nirholas/xactions/grok-ai)
Your own site
<a href="https://agentmods.dev/skills/nirholas/xactions/grok-ai"><img src="https://agentmods.dev/badge/skills/nirholas/xactions/grok-ai.svg" alt="Measured on agentmods" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 918 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00072 $0.00918
Opus 5 $0.00036 $0.00459
Sonnet 5 $0.00014 $0.00184
Haiku 4.5 $0.00007 $0.00092

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

Security

Grade A, and why

grok-ai 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 6d 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.

skills/grok-ai/SKILL.md · 107 lines

How it starts

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

Grok AI Integration

Browser console scripts for automating interactions with X's built-in Grok AI assistant.

Script Selection

Goal File Navigate to
Chat with Grok src/grokIntegration.js x.com/i/grok
Generate images src/grokIntegration.js x.com/i/grok
Analyze tweet with Grok src/grokIntegration.js Any tweet

Grok Integration

File: src/grokIntegration.js

Automates Grok AI prompts and response scraping.

How to Use

  1. Navigate to x.com/i/grok
  2. Open DevTools (F12) -> Console
  3. Paste the script -> Enter

Controls

  • XActions.ask(prompt) -- Send a prompt to Grok
  • XActions.scrapeResponse() -- Capture Grok's latest response
  • XActions.generateImage(prompt) -- Request image generation
  • XActions.batchAsk(prompts[]) -- Send multiple prompts sequentially
  • XActions.export() -- Download conversation history as JSON

Features

  • Automated prompt submission with response capture
  • Batch prompting for content generation workflows
  • Image generation prompt automation
  • Conversation history export
  • Rate-limited to avoid triggering restrictions

DOM Selectors

Element Selector
Grok input [data-testid="grokInput"] or textarea[placeholder]
Send button [data-testid="grokSend"]
Response container [data-testid="grokResponse"]
Image output [data-testid="grokImage"]
Grok nav a[href="/i/grok"]

Content Strategy with Grok

Using Grok for content ideation

  1. XActions.ask("What are the top 5 trending topics in {niche} right now?")
  2. XActions.ask("Write 3 tweet variations about {topic}")
  3. XActions.ask("Analyze this tweet for engagement: {tweet_text}")
  4. Capture responses with XActions.scrapeResponse()
  5. Feed into src/threadComposer.js for thread creation

Batch content generation

await XActions.batchAsk([
  "Write a hot take about AI agents",
  "Write a thread hook about productivity",
  "Write a poll question about remote work",
  "Suggest 5 tweet ideas about {niche}",
]);
XActions.export(); // Download all responses

Read the full file on GitHub · 107 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. 6d ago First seen · 107 lines · 72 tokens per session scan A b1a961d4d7f1

Subscribe to this mod's changes

grok-ai is a skill published in the GitHub repository nirholas/XActions (509 stars, last pushed 2d ago), licensed Apache-2.0. It adds 72 tokens to every session and 918 once invoked, about $0.0004 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-30.

Related

Other skills, from other repositories

stripe-projects

Use after E2B sandbox/API access has been provisioned through Stripe Projects and the user needs to use the resulting E2B API key with the E2B CLI, JavaScript SDK, Python SDK, or Code Interpreter SDK.

e2b-dev/E2B · 51 tokens

tape-opens

Stack-unwind review of this conversation - a tree of main tasks done (struck through) and every open left behind at the depth it was abandoned, sized by the thread's measured shape, never by feel. Optional argument - a .jsonl path or session id to review a different session.

enricoros/big-AGI · 60 tokens

powerpoint

Create designed, editable PowerPoint .pptx presentations with PptxGenJS. Use when the user asks to create, generate, update, or inspect a deck, slide deck, presentation, or .pptx file.

the-open-agent/openagent · 48 tokens

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

the-open-agent/openagent · 17 tokens

clawhub

Use the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawhub CLI.

the-open-agent/openagent · 63 tokens

connect-agent

Connect the codebase's AI agent to LangWatch agent simulations, so test suites run against the real agent process. Adds a small connect function beside the service startup that calls the agent already in the codebase, which opens an outbound connection and registers the agent with its environment and its run…

langwatch/langwatch · 102 tokens