Skip to content
Back to skills

Xai Grok

ASecurity

Use xAI Grok API with Agent Tools for real-time web and X (Twitter) search and synthesis. Requires XAI_API_KEY.

  • 666 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 2, 2026
ai-agentspythonbashgitapi

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 2, 2026

npx -y skills add majiayu000/claude-skill-registry --skill xai-grok --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Xai Grok?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Xai Grok
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-xai-grok-claude-skill-registry/badge)](https://www.skillsdirectory.com/skills/majiayu000-xai-grok-claude-skill-registry)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: xai-grok
description: Use xAI Grok API with Agent Tools for real-time web and X (Twitter) search and synthesis. Requires XAI_API_KEY.
---

# xAI Grok Research Skill

This skill utilizes the xAI Grok API and its Agent Tools for autonomous research, including real-time web and X platform search.

## Setup

1.  **Dependencies:** Requires the `xai-sdk`.
    ```bash
    pip install xai-sdk python-dotenv
    ```

2.  **API Key Configuration:** The skill requires the `XAI_API_KEY`.

    ```bash
    # If the script fails due to a missing key, run the following:
    echo "It seems the xAI API key is not set up."
    read -p "Enter your xAI API key: " GROK_KEY
    echo "XAI_API_KEY=$GROK_KEY" >> .env
    if [ -f .gitignore ] && ! grep -q ".env" .gitignore; then echo ".env" >> .gitignore; fi
    echo "API key saved to .env."
    ```

## Usage

Use the `scripts/grok_research.py` script. Grok will autonomously use the enabled tools.

### Command

```bash
python3 scripts/grok_research.py --query "<query>" [--model <model_name>] [--web-search] [--x-search]
```

### Parameters

* `--query` (Required): The research query.
* `--model` (Optional): Defaults to `grok-4.1-fast-reasoning` (optimized for tools).
* `--web-search` (Optional): Enable web search tool.
* `--x-search` (Optional): Enable X (Twitter) search tool.

### Example

```bash
python3 scripts/grok_research.py --query "What is the current public sentiment and news coverage on the latest AI regulations?" --web-search --x-search
```

## Output

The script streams the agent's thought process (to stderr) for visibility and outputs the final synthesized answer (to stdout) with citations.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.