From claude4ops
Convert Claude Code artifacts (CLAUDE.md, hooks, Anthropic SDK) to equivalent configs for other AI tools — Gemini CLI, GitHub Copilot, Cursor, or OpenAI Codex. Always fetches current docs via context7 before generating any output.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude4ops:convertThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Convert Claude Code artifacts — `CLAUDE.md`, hooks, Anthropic SDK code — to equivalent configs for Gemini CLI, GitHub Copilot, Cursor, or OpenAI Codex.
Convert Claude Code artifacts — CLAUDE.md, hooks, Anthropic SDK code — to equivalent configs for Gemini CLI, GitHub Copilot, Cursor, or OpenAI Codex.
Trigger when the user:
Scan the project for Claude-specific artifacts:
# Config files
ls CLAUDE.md .claude/CLAUDE.md .claude/settings.json .claude/settings.local.json 2>/dev/null
# Hooks
ls .claude/hooks/ 2>/dev/null
# Anthropic SDK usage
grep -r "from anthropic\|import anthropic\|@anthropic-ai/sdk\|Anthropic()" \
--include="*.py" --include="*.ts" --include="*.js" . 2>/dev/null | head -20
Report what was found before proceeding.
If not specified, ask:
Which tool would you like to convert to?
- Google Gemini CLI
- GitHub Copilot
- Cursor
- OpenAI Codex
REQUIRED — never skip, never use training-data guesses.
Fetch current documentation using context7 before generating any config or SDK translation:
Gemini CLI:
mcp__plugin_context7_context7__resolve-library-id: "gemini cli"
mcp__plugin_context7_context7__query-docs: config format, GEMINI.md, system prompts, settings.json
GitHub Copilot:
mcp__plugin_context7_context7__resolve-library-id: "github copilot"
mcp__plugin_context7_context7__query-docs: copilot-instructions.md format, custom instructions
Cursor:
mcp__plugin_context7_context7__resolve-library-id: "cursor"
mcp__plugin_context7_context7__query-docs: .cursorrules format, cursor rules, .cursor/rules
OpenAI Codex / AGENTS.md:
mcp__plugin_context7_context7__resolve-library-id: "openai"
mcp__plugin_context7_context7__query-docs: AGENTS.md format, openai SDK chat completions
Cite the resolved library ID and doc version in every generated file header.
Read CLAUDE.md fully (expanding any @file imports). Then write:
| Claude artifact | Gemini CLI | GitHub Copilot | Cursor | OpenAI Codex |
|---|---|---|---|---|
CLAUDE.md | GEMINI.md | .github/copilot-instructions.md | .cursorrules | AGENTS.md |
.claude/settings.json hooks | .gemini/settings.json | ⚠️ No equivalent | .cursor/rules/ | ⚠️ No equivalent |
Add a header comment to every generated file:
# Generated by /claude4ops:convert
# Source: CLAUDE.md
# Target: [Tool Name]
# Docs: context7 [library-id] — fetched [date]
# Review before committing. Claude-specific sections marked ⚠️.
Keep the original CLAUDE.md intact — generate new files alongside, never overwrite.
For each file with Anthropic SDK imports, output a side-by-side migration:
Python — Anthropic → Google Generative AI (Gemini):
# BEFORE (Anthropic)
import anthropic
client = anthropic.Anthropic()
message = client.messages.create(
model="claude-opus-4-8",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}]
)
print(message.content[0].text)
# AFTER (google-generativeai)
import google.generativeai as genai
import os
genai.configure(api_key=os.environ["GEMINI_API_KEY"])
model = genai.GenerativeModel("gemini-2.0-flash") # adjust model as needed
response = model.generate_content("Hello")
print(response.text)
Python — Anthropic → OpenAI (Copilot / Codex):
# BEFORE (Anthropic)
import anthropic
client = anthropic.Anthropic()
message = client.messages.create(
model="claude-opus-4-8",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}]
)
print(message.content[0].text)
# AFTER (openai)
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4o", # adjust model as needed
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)
TypeScript — Anthropic → OpenAI:
// BEFORE
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const msg = await client.messages.create({
model: "claude-opus-4-8",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello" }],
});
console.log(msg.content[0].text);
// AFTER
import OpenAI from "openai";
const client = new OpenAI();
const response = await client.chat.completions.create({
model: "gpt-4o",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0].message.content);
Model name mapping (approximate):
| Anthropic | Gemini | OpenAI |
|---|---|---|
| claude-opus-4-x (most capable) | gemini-2.0-pro | gpt-4o |
| claude-sonnet-4-x (balanced) | gemini-2.0-flash | gpt-4o-mini |
| claude-haiku-4-x (fastest) | gemini-2.0-flash-lite | gpt-4o-mini |
Always verify model availability against current docs fetched from context7.
| Claude Code hook | Gemini CLI | Copilot | Cursor | Codex |
|---|---|---|---|---|
PreToolUse (block commands) | .gemini/settings.json extensions | ⚠️ No equivalent | Cursor Rules | ⚠️ No equivalent |
Stop (auto-lint) | ⚠️ No equivalent | ⚠️ No equivalent | ⚠️ No equivalent | ⚠️ No equivalent |
PostToolUse (audit log) | ⚠️ No equivalent | ⚠️ No equivalent | ⚠️ No equivalent | ⚠️ No equivalent |
| Notification hooks (Slack) | ⚠️ No equivalent | ⚠️ No equivalent | ⚠️ No equivalent | ⚠️ No equivalent |
For every Claude feature with no equivalent, include a warning block in the generated output:
⚠️ UNSUPPORTED: Claude Code hooks (PreToolUse / Stop / PostToolUse)
These run shell scripts at tool-call boundaries. [Target] has no equivalent.
Workaround: Use git hooks (pre-commit) or CI pipeline steps instead.
⚠️ UNSUPPORTED: Tool-use permissions (allowedTools / blockedTools)
Claude Code's fine-grained tool permission system has no direct equivalent.
Workaround: Document rules in the target config file as natural-language instructions.
⚠️ UNSUPPORTED: MCP server configuration
MCP is Claude Code-specific. Some tools support OpenAPI/function calling instead.
Workaround: Expose your MCP server via OpenAPI spec and register as a tool/function.
⚠️ UNSUPPORTED: claude4ops plugin skills and commands
These are Claude Code-only. No equivalent exists in other tools.
After generating all files, print:
Conversion complete: Claude Code → [Target Tool]
Docs fetched: context7 [library-id] (fetched [date])
Generated:
✓ [target config file] ← from CLAUDE.md
✓ [sdk-migration.md] ← Anthropic SDK migration notes
Warnings ([N] features with no equivalent):
⚠️ hooks → no equivalent in [target tool]
⚠️ MCP servers → no equivalent (see workaround above)
⚠️ tool permissions → no equivalent
Review all generated files before committing.
Source files were not modified.
@file imports in CLAUDE.md before mapping content to target formatCLAUDE.md, SDK files) are read-only — generate new files alongsideGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub ops4life/claude4ops --plugin claude4ops