Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

grok-skills

Agent skill for xAI's grok build CLI — web/X search, large-scale research, image & video generation, and green-screen / ffmpeg post-processing, all in one skill.

Image and video generation run through your logged-in grok session (SuperGrok / X Premium+) via the built-in image_gen / image_to_video tools — no xAI API key, no per-image API cost. Search works with either the logged-in session or the xAI API.

Cross-platform (macOS / Linux / Windows). Installable with npx skills, so it works in Claude Code, Cursor, Codex, and other skill-aware agents.

Capabilities

Capability How
🔍 Web / X search with citations grok-search.mjs (xAI API) or grok headless
📚 Large-scale parallel research grok -p headless + subagents
🖼️ Image generation image_gen — logged-in, zero API cost
🎬 Video generation (text/image-to-video) image_to_video — logged-in
🟢 Green-screen / chroma-key removal ffmpeg (adaptive, per-platform)
✂️ Concat / watermark / GIF / frames ffmpeg

Install

# All detected agents (Claude Code, Cursor, Codex, …)
npx skills add Wangnov/grok-skills

# Global install, target Claude Code specifically
npx skills add Wangnov/grok-skills -g -a claude-code

# Preview the skills in this repo without installing
npx skills add Wangnov/grok-skills --list

Installs to .agents/skills/grok and symlinks into each detected agent's directory.

Requirements

  • grok build CLI, logged in (grok login, needs SuperGrok / X Premium+) — required for media generation & research.
    • macOS / Linux: curl -fsSL https://x.ai/cli/install.sh | bash
    • Windows: irm https://x.ai/cli/install.ps1 | iex (or run it inside WSL2)
  • ffmpeg — for post-processing (brew install ffmpeg / apt install ffmpeg / winget install Gyan.FFmpeg).
  • node — runs the skill's scripts.
  • XAI_API_KEY — optional, only for API-based search or paid media fallback.

Check your environment anytime:

node ~/.agents/skills/grok/scripts/preflight.mjs

Quick start

BASE=~/.agents/skills/grok

# Generate an image (logged-in, zero API cost)
node "$BASE/scripts/grok-media.mjs" image --prompt "cyberpunk city at night, neon reflections" --out city.jpg --aspect-ratio 16:9

# Animate it into a video
node "$BASE/scripts/grok-media.mjs" video --prompt "slow push-in, flickering neon" --image city.jpg --out city.mp4 --duration 6 --resolution 720p

# Search with citations (needs XAI_API_KEY)
node "$BASE/scripts/grok-search.mjs" "who won the latest world cup" --mode auto

For green-screen and other ffmpeg work, the skill guides the agent to probe the environment, install what's missing for the current OS, and write commands that fit the footage — see skills/grok/references/post-processing.md.

Design principle

This skill is guidance, not a box of hardcoded scripts. On each use:

① Probe the real environment → ② install missing deps for the current OS → ③ write commands to fit the material.

The only bundled scripts are cross-platform node wrappers around the grok/xAI interaction (reliable file-landing checks, JSON output, citation parsing) — and you can always bypass them with a plain grok -p "…". Environment-specific work like ffmpeg is documented as adaptive guidance, not frozen .sh files.

Structure

skills/grok/
  SKILL.md                          # router + run principle + common commands
  references/
    media-generation.md             # image_gen / image_to_video mechanics & params
    search-and-research.md          # search + parallel research
    post-processing.md              # green-screen + ffmpeg (adaptive guidance)
    xai-search-capabilities.md
  scripts/
    preflight.mjs                   # cross-platform env/capability self-check
    grok-media.mjs                  # image/video generation (logged-in session)
    grok-search.mjs                 # search (xAI Responses API)
    search-selftest.mjs
  examples/video-reel-playbook.md   # batch short-film workflow
  agents/                           # agent interface definitions

License

MIT © Wangnov

About

Agent skill for xAI grok build CLI: search, research, image & video generation, ffmpeg post-processing. Zero API cost via logged-in session. Install with npx skills.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages