- Claude Code can now pass some of your coding tasks to Grok (xAI's coding agent) and bring the result back for you to review.
- The work is billed to your Grok subscription, not a pay-per-use API bill.
- It's free, open source, and safe by default — Grok makes changes but never commits them. You always approve.
- Repo: github.com/xzawed/claude-grok-build-plugin ⭐
🤔 First, in one sentence
If you use Claude Code (Anthropic's AI assistant that helps you write and edit code), this little plugin lets Claude bring in a second AI helper — Grok — for certain jobs, and then hands the results back to you to check.
Think of Claude as the project lead and Grok as a specialist it can call in when there's a lot to do. You stay in charge the whole time.
You don't have to be an expert to get the idea. So let's start with the everyday problem it solves.
💸 The problem: two great assistants, two bills
AI coding helpers are genuinely useful. The catch is how you pay for them.
Most tools that plug a second AI into your workflow charge you per use — the technical name is a "metered API." Every request adds a little to the bill. It's like a taxi meter: it keeps ticking the whole ride, and a busy day adds up fast.
But many people already pay a flat monthly subscription for Grok (SuperGrok, or X Premium+). That's more like a transit pass — one price, ride as much as you want.
So the obvious question is:
What if the second helper's work could run on the subscription I already pay for — instead of starting a brand-new meter?
That's exactly what this plugin does.
🔀 How it works (you're always the boss)
There's no complicated setup to understand. It's three steps:
- You ask Claude something, in plain English — "add tests for this file," "clean up this folder."
- Claude hands the task to Grok. The plugin runs Grok for you, quietly, in the background.
- You review and approve. Grok edits the files, but it never saves the change permanently on its own. You look at what changed and decide.
That last point is the important one: nothing ships without your OK.
🧰 What you can actually do
Once it's installed, you get a handful of simple commands you type into Claude Code. Each starts with /grok:.
| Command | What it does (plain English) |
|---|---|
/grok:setup |
Checks that everything is connected and ready |
/grok:delegate "task" |
Hands a task to Grok — it edits, you review |
/grok:plan "task" |
Asks Grok for a plan first, with no changes made |
/grok:verify "task" |
Grok does the task and double-checks its own work |
/grok:usage |
Shows what you delegated and how it was billed |
That's the whole day-to-day. If you can send a chat message, you can use it.
🛡️ The part that matters most: the billing
Here's the one technical detail worth knowing, explained simply.
The Grok tool has a quirk: if an API key happens to be sitting in your environment, it will use that key — and quietly start the pay-per-use meter — even when you meant to use your subscription.
This plugin protects you from that:
- By default, it removes those keys before running Grok, so a leftover key can't secretly switch you to metered billing.
-
Every result tells you which way it was billed — you'll literally see
billing: "subscription"(ormetered_apiif you deliberately chose it). - It never stores, logs, or reads your login or keys. It only checks whether you're signed in.
In short: subscription is the default, metered is opt-in, and you can always see which one ran.
(Prefer pay-per-use with an API key? That's supported too — it's a single opt-in setting. The point is that it's your choice, and it's never a surprise.)
✅ Is this for you?
A good fit if you:
- use Claude Code day to day, and
- already pay for Grok (SuperGrok / X Premium+), and
- want a second helper for the repetitive, high-volume stuff (tests, cleanup, boilerplate) without a second bill.
Honest caveats — no overselling:
- Built for macOS and Linux. On Windows, use WSL (the Linux environment for Windows).
- You need a Grok subscription (or an API key, if you choose metered mode).
- It's open source and still young — expect a few rough edges, and please file issues. That feedback is exactly what helps.
🚀 Set it up in a few minutes
You'll need: Claude Code installed, and a Grok subscription.
1. Install the Grok tool (one time, in your terminal)
- macOS / Linux:
curl -fsSL https://x.ai/cli/install.sh | bash
- Windows (PowerShell):
irm https://x.ai/cli/install.ps1 | iex
2. Sign in (opens your browser once)
grok login
grok --no-auto-update -p "Say ok."
The second line is a quick "is it working?" check — it should reply with a short message.
3. Add the plugin — inside Claude Code
These are typed into Claude Code, not your terminal. They're the same on every computer:
/plugin marketplace add xzawed/claude-grok-build-plugin
/plugin install grok@grok-marketplace
/reload-plugins
/grok:setup
/grok:setup gives you a "you're ready" report. Done.
⏱️ A 60-second first try
In a throwaway folder, type this into Claude Code:
/grok:delegate "create a file hello.txt containing exactly: ok"
You'll get back:
- a short summary of what Grok did,
- the list of files it changed (you should see
hello.txt), and - the billing label — the key thing to check is that it says
subscription, notmetered_api.
Nothing was committed. You look at it and decide what to keep. That's the whole loop.
🔐 A note on safety (worth 20 seconds)
- No surprise commits. Grok changes files; you review and commit. Always.
- No credential leaks. Your keys and login are never stored or logged.
-
Heads up for risky jobs: to make edits without stopping to ask, Grok auto-approves its own actions (including running commands). For anything you're unsure about, run it in an isolated copy of your project — that's a single
--worktreeoption, so mistakes can't touch your real files.
🙌 Try it, and tell me what breaks
It's MIT-licensed and free. If the idea of "use the subscription I already pay for" resonates, I'd love for you to try it:
- Repo & full docs: github.com/xzawed/claude-grok-build-plugin
- ⭐ A star helps other people find it.
- 🐞 Issues and feedback are genuinely welcome — especially "this was confusing" notes. Making it easy for non-experts is the goal.
If you build with Claude Code and pay for Grok, this quietly gives you a second pair of hands — on a bill you're already paying.
Thanks for reading! 🚀



Top comments (0)