Build This Now
Build This Now
Qu'est-ce que le code Claude ?Installer Claude CodeL'installateur natif de Claude CodeTon premier projet Claude Code
Subscription BillingMulti-Tenant SaaSAI Chat FeatureRate LimitingStripe WebhooksSemantic SearchRealtime UpdatesDrip Email Sequencesv2.1.122 Release NotesClaude Code Dynamic Workflows : comment orchestrer 1 000 sous-agents sur une vraie codebaseBonnes pratiques Claude CodeMeilleures pratiques pour Claude Opus 4.7Claude Code sur un VPSIntégration GitRevue de code avec Claude CodeLes Worktrees avec Claude CodeClaude Code à distanceClaude Code ChannelsChannels, Routines, Teleport, DispatchTâches planifiées avec Claude CodePermissions Claude CodeLe mode auto de Claude CodeAjouter les paiements Stripe avec Claude CodeFeedback LoopsWorkflows TodoGestion des tâches dans Claude CodeTemplates de projetTarification et utilisation des tokens Claude CodeTarifs de Claude Code : ce que tu vas vraiment payerClaude Code Ultra ReviewConstruire une app Next.js avec Claude CodeSupabase DatabaseVercel DeepsecTest-Driven DevelopmentConstruire un MVP SaaS avec Claude CodeAjouter l'authentification avec Claude Code (Supabase Auth)Ajouter les emails transactionnels avec Claude Code (Resend + React Email)Construire une API type-safe avec Claude Code (oRPC + Zod)File UploadsBackground Jobs (Inngest)Admin DashboardFull-Text SearchClaude Agent SDKKiro Migration GuideClaude Research AgentLeave Grok BuildRoute Subagent ModelsClaude Monorepo SetupCI Repair AgentVisual Regression TestsAgent Cost DashboardCursor Migration GuideCommerce agentique : comment construire une app que les agents IA peuvent payer1M ContextUser API KeysAudit LogsCSV Import PipelineDatabase MigrationsProduction Error TrackingFeature FlagsGitHub ActionsHeadless ModeMax Plan vs APICaching and RevalidationIn-App NotificationsOutbound WebhooksPrompt CachingRoles & PermissionsMarketplace PaymentsUsage-Based BillingCombien coûte la création d'un SaaS avec Claude Code en 2026Parallel AI AgentsCoding Agent Injection
speedy_devvkoen_salo
Blog/Handbook/Workflow/Leave Grok Build

Grok Build Migration

Move from Grok Build to Claude Code without losing instructions, skills, agents, MCP servers, hooks, or project safety rules.

Arrête de tout configurer. Place à la construction.

Des templates SaaS avec orchestration IA.

Découvrez ce que nous construisons pour les entreprises →
speedy_devvWritten by speedy_devvPublished Jul 26, 2026Updated Jul 26, 202612 min readHandbook hubWorkflow index

A Grok Build to Claude Code migration is mostly a configuration translation, not a rewrite of your repository. Keep AGENTS.md, import it from CLAUDE.md, move portable skills and agent prompts deliberately, rebuild MCP and hook configuration in Claude's formats, then compare both agents on the same small task before deleting anything.

The code stays put. Git history stays put. Your tests remain the judge. The work is making sure Claude sees the same instructions and has only the tools you intended to grant.

What actually moves

xAI describes Grok Build as a terminal coding agent with interactive and headless modes, Agent Client Protocol support, custom models, skills, plugins, hooks, MCP servers, and subagents. Its user settings live in ~/.grok/config.toml, while project configuration can live under .grok/ (Grok Build overview, Grok Build settings).

Claude Code has equivalents for most of those concepts, but the file formats are not interchangeable. Anthropic separates persistent instructions, settings, MCP servers, skills, subagents, hooks, and plugins into different files and directories (Claude Code extension overview).

Grok Build itemClaude Code destinationSafe to copy unchanged?
AGENTS.mdImport from CLAUDE.mdYes, through an import
.grok/skills/<name>/SKILL.md.claude/skills/<name>/SKILL.mdUsually, then test
Grok agent prompt.claude/agents/<name>.mdPrompt text, yes; frontmatter, review
.grok/config.toml.claude/settings.json or .claude/settings.local.jsonNo
Grok MCP config.mcp.json or plugin .mcp.jsonNo
Grok hooks.claude/settings.json or plugin hooksNo
Grok pluginClaude Code pluginNo
Session historyStart a new Claude sessionNo

That last row matters. Do not spend an afternoon trying to transplant a conversation transcript. Put durable decisions in repository files, commit them, and let Claude read the source of truth.

Inventory before touching configuration

Start in the repository root. Ask Grok what it currently discovers, then save a plain inventory for yourself:

grok inspect

find . -maxdepth 4 \
  \( -path './.grok/*' -o -name 'AGENTS.md' -o -name 'Agents.md' -o -name 'AGENT.md' \) \
  -type f \
  -print \
  | sort

grok inspect is the official verification command for config sources, instructions, skills, plugins, hooks, and MCP servers (xAI settings documentation). The find command gives you a repository-local list. It does not expose the values inside ~/.grok/config.toml, where API keys or private endpoints may live.

Make a temporary branch before changing shared instructions:

git switch -c chore/migrate-grok-to-claude
git status --short

If the working tree is already dirty, stop and understand those changes first. Migration work is much easier when every diff belongs to the migration.

Keep AGENTS.md as the shared source

Grok Build walks the AGENTS.md file family from the working directory to the repository root (xAI skills and plugins documentation). Claude Code reads CLAUDE.md, not AGENTS.md.

Anthropic documents the bridge directly: create CLAUDE.md and import the existing file (Claude Code memory documentation).

@AGENTS.md

## Claude Code

- Run the existing test command before reporting a code change complete.
- Ask before changing deployment, billing, or production data.
- Keep generated files out of commits unless the task explicitly requires them.

This is better than maintaining two copies. Shared rules remain in AGENTS.md. Claude-only behavior sits below the import.

Run Claude and verify the file is loaded:

claude

Then run /context inside the session. CLAUDE.md should appear under memory files. If it does not, check that you launched Claude from the repository or one of its subdirectories.

Run the safe migration helper

The script below does three conservative things:

  1. Creates a CLAUDE.md import when one does not exist.
  2. Copies project skills into .claude/skills/ without overwriting existing files.
  3. Writes a report of Grok components that still need manual translation.

It does not touch user configuration, copy secrets, convert hooks, or delete .grok.

Save it as scripts/prepare-claude-migration.sh:

#!/usr/bin/env bash
set -euo pipefail

repo_root="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
cd "$repo_root"

if [[ -e "CLAUDE.md" ]]; then
  printf 'Keeping existing CLAUDE.md\n'
elif [[ -f "AGENTS.md" ]]; then
  printf '@AGENTS.md\n\n## Claude Code\n\n- Run tests before reporting completion.\n' > CLAUDE.md
  printf 'Created CLAUDE.md with an AGENTS.md import\n'
else
  printf 'No AGENTS.md found. Run /init in Claude Code after installation.\n'
fi

mkdir -p .claude/skills

if [[ -d ".grok/skills" ]]; then
  while IFS= read -r -d '' skill_dir; do
    skill_name="$(basename "$skill_dir")"
    destination=".claude/skills/$skill_name"

    if [[ -e "$destination" ]]; then
      printf 'Skipped existing skill: %s\n' "$destination"
      continue
    fi

    cp -R "$skill_dir" "$destination"
    printf 'Copied skill for review: %s\n' "$destination"
  done < <(find .grok/skills -mindepth 1 -maxdepth 1 -type d -print0)
fi

report=".claude/grok-migration-review.md"
{
  printf '# Grok Build migration review\n\n'
  printf 'Generated from repository-local files only.\n\n'
  printf '## Files still requiring manual review\n\n'

  for candidate in \
    .grok/config.toml \
    .grok/agents \
    .grok/hooks \
    .grok/plugins \
    .grok/mcp.json
  do
    if [[ -e "$candidate" ]]; then
      printf -- '- `%s`\n' "$candidate"
    fi
  done

  printf '\n## Checks\n\n'
  printf -- '- [ ] CLAUDE.md loads in `/context`\n'
  printf -- '- [ ] Every copied skill has valid frontmatter\n'
  printf -- '- [ ] MCP servers reconnect without copied secrets\n'
  printf -- '- [ ] Permission rules deny sensitive files\n'
  printf -- '- [ ] The normal test and build commands pass\n'
} > "$report"

printf 'Wrote %s\n' "$report"
printf 'Review the diff before committing. Nothing under .grok was deleted.\n'

Make it executable and run it:

chmod +x scripts/prepare-claude-migration.sh
./scripts/prepare-claude-migration.sh
git diff -- CLAUDE.md .claude scripts/prepare-claude-migration.sh

Copying a skill is only the start. Grok and Claude both use skill folders with Markdown instructions and resources, but a skill may mention Grok-only commands or tools. Read every copied SKILL.md, replace those references, and invoke the skill on a disposable task.

Translate settings by purpose

Grok stores user defaults in TOML. Claude Code settings are JSON. Renaming config.toml to settings.json gives you invalid configuration and a false sense of completion.

Split the translation into four buckets:

  • Behavioral instructions belong in CLAUDE.md or .claude/rules/.
  • Tool permissions and environment settings belong in .claude/settings.json or the uncommitted .claude/settings.local.json.
  • MCP server definitions belong in .mcp.json.
  • Repeatable workflows belong in skills, subagents, hooks, or plugins.

A minimal project settings file can deny common secret files and allow safe inspection commands:

{
  "permissions": {
    "allow": [
      "Bash(git status *)",
      "Bash(git diff *)",
      "Bash(npm test *)"
    ],
    "deny": [
      "Read(./.env)",
      "Read(./.env.*)",
      "Read(./secrets/**)",
      "Bash(rm -rf *)"
    ]
  }
}

Claude Code permissions and its operating-system sandbox are separate layers. Permissions decide which tools and paths Claude may request; sandboxing limits what shell processes can reach even if a bad instruction gets through (Anthropic permissions documentation).

Do not commit credentials in either system. Reference environment variable names in shared configuration and keep values in your secret manager or local environment.

Reconnect MCP servers one at a time

Grok Build can discover MCP servers from its configuration. Claude Code uses .mcp.json, settings, managed configuration, or plugin-provided .mcp.json files (Claude Code MCP documentation).

Do not translate five servers and debug them as a group. Add one, restart or reload as required, authenticate it, call one read-only tool, then move to the next.

A project-level stdio server has this shape:

{
  "mcpServers": {
    "docs": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "./docs"]
    }
  }
}

Treat that as a shape, not a universal server recipe. Use the server publisher's current package name and arguments. In Claude, run /mcp to inspect connections and complete OAuth when a remote server requires it.

Port agents, hooks, and plugins deliberately

Grok Build's open-source release includes its extension system, including skills, plugins, hooks, MCP servers, and subagents (xAI open-source announcement). That makes the concepts familiar. It does not make manifests portable.

For each agent:

  1. Copy the plain-language role and completion criteria.
  2. Rebuild its YAML frontmatter using Claude's supported fields.
  3. Restrict its tools.
  4. Pick a Claude model alias.
  5. Test it with an explicit mention before relying on automatic delegation.

Claude custom subagents live in .claude/agents/ and require name and description. They can also define tools, model, permission mode, skills, hooks, memory, effort, and worktree isolation (Anthropic subagent documentation).

Hooks need more suspicion. A hook is executable automation. Recreate it from its intended event and safety rule, not from copied syntax. A formatter after Edit is straightforward. A hook that auto-approves shell commands deserves a line-by-line review.

Plugins bundle several moving pieces. Claude plugins have their own manifest and component locations, so reinstall an official equivalent when one exists. Port custom plugins only after the basic repository works without them.

Compare behavior before removing Grok

Pick a small task with a crisp answer, such as adding one validation rule and one unit test. Run it in separate branches or reset between attempts. Give both tools the same repository state and the same prompt.

Score the result on evidence:

CheckPass condition
InstructionsThe agent follows the imported repository rules
ScopeOnly expected files changed
TestsThe focused test and full test command pass
SafetySecrets and denied paths were untouched
ReviewThe diff explains itself without hidden generated files
RecoveryReverting the change is a normal Git operation

Claude Code has its own planning, subagent, and headless workflows. Do not force every Grok habit into a one-for-one replacement. Once the baseline works, read the Claude Code headless guide and custom agent guide for the native patterns.

Keep .grok for at least one normal work cycle. Delete it only after Claude has completed real tasks, your team has reviewed the new configuration, and the old tool is no longer part of CI or onboarding.

Where the $29 Code Kit fits

Switching agents does not create a delivery process by itself. You still need a plan, tests, review, and a clean build. The $29 Code Kit is a one-time harness around Claude Code that runs a plan, build, evaluate, and test loop with repeatable quality gates. It has no subscription, but Claude Code itself still needs your own paid Anthropic plan. The Kit does not migrate Grok configuration for you. It gives the new Claude setup a consistent way to ship once the migration is sound.

Posted by @speedy_devv

Continue in Workflow

  • Commerce agentique : comment construire une app que les agents IA peuvent payer
    Un guide en français simple du commerce agentique en 2026 : ce que font x402, ACP et le Machine Payments Protocol, plus un pas-à-pas d'un week-end pour livrer une API payante que les agents IA peuvent acheter.
  • Bonnes pratiques Claude Code
    Cinq habitudes séparent les ingénieurs qui livrent avec Claude Code : les PRDs, les règles CLAUDE.md modulaires, les slash commands personnalisés, les resets /clear, et un état d'esprit d'évolution du système.
  • Le mode auto de Claude Code
    Un second modèle Sonnet examine chaque appel d'outil Claude Code avant qu'il s'exécute. Ce que le mode auto bloque, ce qu'il autorise, et les règles d'autorisation qu'il place dans tes paramètres.
  • Channels, Routines, Teleport, Dispatch
    Les quatre fonctionnalités Claude Code livrées par Anthropic en mars et avril 2026 qui transforment le CLI en une couche de coordination orientée événements, entre téléphone, web et desktop.
  • Claude Code 1M Context in Practice: When Bigger Isn't Better
    The 1M-token context window is GA at flat pricing, but bigger isn't always better. A decision framework, token-cost math, and when to use /compact, subagents, and dynamic workflows instead.
  • How to Build an Admin Dashboard With Claude Code
    Ship an internal admin panel with Claude Code: role-gated routes, a searchable users and orders table with pagination, impersonation-safe RLS, and metrics tiles pulled through a type-safe API.

More from Handbook

  • Principes de base de l'agent
    Cinq façons de construire des agents spécialisés dans le code Claude : Sous-agents de tâches, .claude/agents YAML, commandes slash personnalisées, personas CLAUDE.md, et invites de perspective.
  • L'ingénierie du harness agent
    Le harness, c'est toutes les couches autour de ton agent IA sauf le modèle lui-même. Découvre les cinq leviers de contrôle, le paradoxe des contraintes, et pourquoi le design du harness détermine les performances de l'agent bien plus que le modèle.
  • Patterns d'agents
    Orchestrateur, fan-out, chaîne de validation, routage par spécialiste, raffinement progressif, et watchdog. Six formes d'orchestration pour câbler des sub-agents Claude Code.
  • Meilleures pratiques des équipes d'agents
    Patterns éprouvés pour les équipes d'agents Claude Code. Prompts de création riches en contexte, tâches bien calibrées, propriété des fichiers, mode délégué, et correctifs v2.1.33-v2.1.45.

Arrête de tout configurer. Place à la construction.

Des templates SaaS avec orchestration IA.

Découvrez ce que nous construisons pour les entreprises →

Claude Research Agent

Build a Claude Code research agent that searches primary sources, keeps an evidence ledger, writes a cited report, and fails its quality gate when claims lack support.

Route Subagent Models

Route Claude Code subagents to Haiku, Sonnet, or Opus by task, with complete agent files, safe tools, and a testable workflow.

On this page

What actually moves
Inventory before touching configuration
Keep AGENTS.md as the shared source
Run the safe migration helper
Translate settings by purpose
Reconnect MCP servers one at a time
Port agents, hooks, and plugins deliberately
Compare behavior before removing Grok
Where the $29 Code Kit fits

Arrête de tout configurer. Place à la construction.

Des templates SaaS avec orchestration IA.

Découvrez ce que nous construisons pour les entreprises →