Enterprise-grade AI coding assistant powered by xAI's Grok 4. Terminal-based development with extended reasoning, vision, live web search, and MCP integration.
An enterprise-grade AI coding assistant powered by xAI's Grok 4, providing terminal-based development with extended reasoning, vision capabilities, live web search, and Model Context Protocol (MCP) integration.
This skill guides you through using AX-Grok, a command-line AI coding assistant that leverages xAI's most capable models. It supports interactive coding sessions, headless automation, image analysis, real-time web search, and integration with 20+ specialized AI agents through the AutomatosX framework.
Follow these steps to install and configure AX-Grok:
1. **Install globally via npm:**
```bash
npm install -g @defai.digital/ax-grok
```
2. **Run initial setup:**
```bash
ax-grok setup
```
This will prompt you to enter your xAI API key, which will be stored encrypted in `~/.ax-grok/config.json`.
3. **Verify installation:**
```bash
ax-grok --version
ax-grok doctor
```
AX-Grok supports multiple Grok models optimized for different use cases:
Start an interactive coding session with full context and conversational interface:
```bash
ax-grok
ax-grok --continue
ax-grok --model grok-4.1-fast
```
Execute single commands without interactive prompts:
```bash
ax-grok -p "analyze this codebase structure and suggest improvements"
ax-grok -p "fix all TypeScript errors" -d /path/to/project
ax-grok -p "generate API documentation for all endpoints"
```
Use these commands within interactive mode:
| Command | Description |
|---------|-------------|
| `/init` | Initialize project context (analyzes directory structure) |
| `/help` | Display all available commands |
| `/models` | Switch between available AI models |
| `/doctor` | Run diagnostics to check configuration and connectivity |
| `/search <query>` | Perform live web search |
| `/vision <path>` | Analyze image or screenshot |
| `/tools` | List all 17 built-in tools |
| `/mcp` | Manage Model Context Protocol integrations |
| `/agent <name>` | Launch specialized AutomatosX agent |
| `/todo` | View and manage task list |
| `/clear` | Clear conversation history |
| `/exit` | Exit the session |
Alternatively, set API key via environment:
```bash
export XAI_API_KEY=your_xai_api_key_here
```
Create `.ax-grok/settings.json` in your project root:
```json
{
"model": "grok-4-0709",
"temperature": 0.7,
"reasoning_effort": "high",
"customInstructions": "Always write tests for new functions"
}
```
Enable deep reasoning mode for complex problems:
```bash
ax-grok -p "design a scalable microservices architecture" --reasoning-effort high
```
Analyze images, diagrams, or screenshots:
```bash
/vision screenshot.png
```
Access real-time information during coding:
```bash
/search "latest xAI Grok API features 2026"
```
Connect to 12+ production-ready MCP templates for extended capabilities. Templates include GitHub, PostgreSQL, Slack, filesystem access, and more.
Launch specialized agents for complex tasks:
```bash
ax-grok
> /init
> "Analyze this codebase and suggest performance improvements"
> /todo
> "Implement the top 3 recommendations"
```
```bash
ax-grok
> /vision error-screenshot.png
> "This error appears in production. Find and fix the root cause"
```
```bash
ax-grok
> /search "best practices for React Server Components 2026"
> "Refactor this component using the latest best practices"
```
AX-Grok is part of a family of AI coding assistants:
All share the same command structure and tool ecosystem.
```bash
ax-grok doctor
```
This checks:
1. **API Key Not Found**: Run `ax-grok setup` to configure your xAI API key
2. **Connection Errors**: Check your internet connection and API key validity
3. **Model Access Denied**: Verify your xAI account has access to the requested model
4. **MCP Server Failures**: Use `/mcp status` to check server health
1. **Initialize projects**: Always run `/init` at the start of a session for better context
2. **Use custom instructions**: Create `.ax-grok/CUSTOM.md` for project-specific AI behavior
3. **Leverage reasoning mode**: Use high reasoning effort for architecture decisions
4. **Combine tools**: Mix web search, vision, and coding tools for comprehensive solutions
5. **Save context**: Use `--continue` to resume long-running projects
6. **Version control**: Add `.ax-grok/` to `.gitignore` except for `settings.json` if sharing config
MIT License - Open source and free to use.
---
**Made by DEFAI Digital** - Enterprise AI solutions for developers.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/ax-grok-cli/raw