frankieli123/grok-skill
Codex skill: aggressive web research via OpenAI-compatible Grok endpoint (2api)
23 stars3 forksUpdated Jan 21, 2026
npx skills add frankieli123/grok-skillREADME
grok-search
🌐 English
A Codex/Claude skill that enables aggressive web research via your OpenAI-compatible Grok endpoint (2api). Perfect for real-time information queries, version checking, and documentation lookup.
✨ Features
- 🔍 Real-time web search through Grok API
- 📋 Structured JSON output with
content+sources - 🔐 Secure config with local override support
- 🌍 Environment variable configuration
- ⚡ Easy one-click installation
📦 Installation
Method 1: Git Clone (Recommended)
# Clone the repository
git clone https://github.com/Frankieli123/grok-skill.git
# Enter the directory
cd grok-skill
# Run the install script (Windows PowerShell)
powershell -ExecutionPolicy Bypass -File .\install.ps1
Method 2: Manual Download
- Download ZIP from: https://github.com/Frankieli123/grok-skill/archive/refs/heads/main.zip
- Extract to any folder
- Run
install.ps1in PowerShell
Installation Path
After installation, the skill will be located at:
C:\Users\<YourUsername>\.codex\skills\grok-search\
⚙️ Configuration
Option A: Interactive Configuration (Recommended)
powershell -ExecutionPolicy Bypass -File "$env:USERPROFILE\.codex\skills\grok-search\configure.ps1"
Option B: Manual Edit
Edit the config file at:
C:\Users\<YourUsername>\.codex\skills\grok-search\config.json
{
"base_url": "https://your-grok-endpoint.example",
"api_key": "YOUR_API_KEY",
"model": "grok-2-latest",
"timeout_seconds": 60,
"extra_body": {},
"extra_headers": {}
}
| Field | Description |
|---|---|
base_url | Your Grok API endpoint URL |
api_key | Your API key (DO NOT commit to Git) |
model | Model name (e.g., grok-2-latest) |
timeout_seconds | Request timeout in seconds |
extra_body | Additional request body parameters |
extra_headers | Additional HTTP headers |
Option C: Environment Variables
$env:GROK_BASE_URL="https://your-grok-endpoint.example"
$env:GROK_API_KEY="YOUR_API_KEY"
$env:GROK_MODEL="grok-2-latest"
🔒 Secure API Key Storage
For security, create config.local.json in the same directory (gitignored):
{
"api_key": "your-real-api-key-here"
}
🚀 Usage
Direct Command Line
python scripts/grok_search.py --query "What is the latest version of Node.js?"
Output Format
{
"content": "The synthesized answer...",
"sources": [
{"url": "https://example.com", "title": "Source Title"}
]
}
🤖 Enable Auto-Invocation in Codex/Claude
Add the following prompt to your global agent configuration:
File: C:\Users\<YourUsername>\.codex\AGENTS.md or ~/.claude/CLAUDE.md
## Web Search Rule
When encountering any of the following situations, ALWAYS use the `grok-search` skill first before providing an answer:
1. Version numbers, release dates, or changelog information
2. API documentation or SDK usage
3. Error messages or troubleshooting
4. Current status of any project, service, or technology
5. Any information that might be time-sensitive or outdated
6. Package installation commands or dependencies
7. Official documentation links
Usage example:
```bash
python ~/.codex/skills/grok-search/scripts/grok_search.py --query "Your search query here"
```
After receiving search results, cite the sources in your response.
📁 Project Structure
grok-search/
├── SKILL.md # Skill definition for Codex/Claude
├── README.md # This file
├── config.json # Configuration template
├── install.ps1 # Installation script
├── configure.ps1 # Interactive configuration script
└── scripts/
└── grok_search.py # Main search script
🌐 中文
一个 Codex/Claude 技能插件,通过你的 OpenAI 兼容 Grok 接口(2api)实现激进的联网检索。适用于实时信息查询、版本检查和文档查找。
✨ 功能特性
- 🔍 通过 Grok API 进行实时网络搜索
- 📋 结构化 JSON 输出,包含
content+sources - 🔐 安全配置,支持本地覆盖
- 🌍 支持环境变量配置
- ⚡ 一键安装
📦 安装方法
方法一:Git 克隆(推荐)
# 克隆仓库
git clone https://github.com/Frankieli123/grok-skill.git
# 进入目录
cd grok-skill
# 运行安装脚本(Windows PowerShell)
powershell -ExecutionPolicy Bypass -File .\install.ps1
方法二:手动下载
- 从这里下载 ZIP:https://github.com/Frankieli123/grok-skill/archive/refs/heads/main.zip
- 解压到任意文件夹
- 在 PowerShell 中运行
install.ps1
安装路径
安装完成后,技能将位于:
C:\Users\<你的用户名>\.codex\skills\grok-search\
⚙️ 配置说明
方式 A:交互式配置(推荐)
powershell -ExecutionPolicy Bypass -File "$env:USERPROFILE\.codex\skills\grok-search\configure.ps1"
方式 B:手动编辑
编辑配置文件:
C:\Users\<你的用户名>\.codex\skills\grok-search\config.json
{
"base_url": "https://your-grok-endpoint.example",
"api_key": "YOUR_API_KEY",
"model": "grok-2-latest",
"timeout_seconds": 60,
"extra_body": {},
"extra_headers": {}
}
| 字段 | 说明 |
|---|---|
| `base_url |
...
Publisher
Statistics
Stars23
Forks3
Open Issues0
CreatedJan 12, 2026