grok-ai

grok-ai is a skill for Claude Code, Codex from nirholas/XActions. It costs 72 tokens per session (914 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 CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Chat with Grok, send several prompts in sequence, request images, analyze tweets, and export conversation history as JSON.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nirholas/xactions/grok-ai
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.

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, Codex.

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/github.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/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-ai

Your own site · 80×15
<a href="https://agentmods.dev/skills/nirholas/xactions/grok-ai"><img src="https://agentmods.dev/badge/skills/nirholas/xactions/grok-ai.svg" alt="Reviewed on agentmods" width="80" 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 914 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00914
Opus 5.5 $0.00029 $0.00366
Sonnet 5.5 $0.00014 $0.00183
Haiku 4.5 $0.00007 $0.00091

Measured 9d ago against content hash 2f458f7ef503, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 9d 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 browser/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. 9d ago Changed 2f458f7ef503
  2. 10d ago Changed ef13f3a7b7a6
  3. 3mo 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 (671 stars, last pushed 3d ago), licensed Apache-2.0. It adds 72 tokens to every session and 914 once invoked, about $0.0003 per session on Opus 5.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

grok-ai compared with skills from other repositories

grok-ai next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
grok-ainirholas/XActionsSkill6713d agoApache-2.0A72Claude Code, Codex
social-x-post-cardnexu-io/open-designSkill110ktodayApache-2.0A31Claude Code, Codex
card-twitternexu-io/open-designSkill110ktodayApache-2.0A15Claude Code, Codex
social-x-post-cardnexu-io/html-anythingSkill17kyesterdayApache-2.0A33Claude Code, Codex
twitter-clipublic-clis/twitter-cliSkill3.0k2d agoApache-2.0A43Claude Code, Codex
card-twitternexu-io/html-anythingSkill17kyesterdayApache-2.0A17Claude Code, Codex
x_intelmateaix/mateclawSkill1.2k2d agoApache-2.0A24Claude Code, Codex