agentleFS
nirholasnirholas/XActions/skills/grok-ai/SKILL.md

grok-ai

Skill648 starsChanged 9 months agoApache-2.0View on GitHub

Integrates with X/Twitter's Grok AI for chat, image generation, tweet analysis, and content creation. Automates Grok prompts, scrapes Grok responses, and uses Grok for content strategy. Requires X Premium+. Use when users want to use Grok AI for content generation, analysis, or chat automation on X.

  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Wait for generation (10-30 seconds)

    line 79
  2. Distinctive:

    Use as profile picture, header, or tweet media

    line 81

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Grok AI Integration

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

Script Selection

GoalFileNavigate to
Chat with Groksrc/grokIntegration.jsx.com/i/grok
Generate imagessrc/grokIntegration.jsx.com/i/grok
Analyze tweet with Groksrc/grokIntegration.jsAny 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

ElementSelector
Grok input[data-testid="grokInput"] or textarea[placeholder]
Send button[data-testid="grokSend"]
Response container[data-testid="grokResponse"]
Image output[data-testid="grokImage"]
Grok nava[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

Image generation workflow

  1. XActions.generateImage("Professional headshot, tech founder, minimalist")
  2. Wait for generation (10-30 seconds)
  3. Right-click generated image to save
  4. Use as profile picture, header, or tweet media

Requirements

  • X Premium or Premium+ subscription
  • Grok access varies by region and account tier
  • Image generation requires Premium+ in most regions
  • Rate limits: ~20 prompts/hour for chat, ~5 images/hour

MCP Alternative

For programmatic AI content without Grok, the XActions MCP server includes AI tools powered by OpenRouter:

MCP ToolPurpose
x_analyze_voiceAnalyze account's writing style
x_generate_tweetGenerate tweet in user's voice
x_rewrite_tweetRewrite tweet for better engagement
x_summarize_threadSummarize a thread

These require an OPENROUTER_API_KEY env var but work without Premium.

Notes

  • Grok responses are AI-generated and should be reviewed before posting
  • Grok has real-time X data access -- can reference current trends
  • Image generation creates original images (not screenshots/existing images)
  • Conversation context is maintained within a chat session

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.