claude-code-compatibility
Overview
Factory.ai Droid provides built-in import functionality for Claude Code configurations. This document details the compatibility between the two platforms for slash commands, custom agents, skills, and MCP servers.
Bottom Line: High compatibility with explicit import support. Most Claude Code configurations transfer with minimal adjustments.
Compatibility Summary
| Feature | Compatibility | Import Method |
|---|---|---|
| Slash Commands | High | /commands → I |
| Custom Agents | High | /droids → I |
| Skills | Manual | Same format |
| MCP Servers | Full | Native support |
| Project Context | Full | CLAUDE.md → AGENTS.md |
1. Custom Slash Commands
File Location Mapping
| Claude Code | Factory Droid |
|---|---|
.claude/commands/*.md | .factory/commands/*.md |
~/.claude/commands/*.md | ~/.factory/commands/*.md |
YAML Frontmatter Comparison
| Field | Claude Code | Factory Droid | Notes |
|---|---|---|---|
description | Supported | Supported | Same behavior |
argument-hint | Supported | Supported | Same syntax |
model | Supported | Not in commands | Use droids for model override |
allowed-tools | Supported | Reserved | Future feature |
disable-model-invocation | Supported | Not available | - |
Argument Handling Differences
| Feature | Claude Code | Factory Droid |
|---|---|---|
$ARGUMENTS (all args) | Supported | Supported |
$1, $2, etc. | Supported in MD | Scripts only (not MD) |
Bash ! prefix | Supported | Use shebang scripts |
Example - Claude Code:
---description: Review a PRargument-hint: <pr-number>allowed-tools: Bash(git:*)---Review PR #$1 focusing on:!git diff origin/main...HEADEquivalent - Factory Droid:
---description: Review a PRargument-hint: <pr-number>---Review PR #$ARGUMENTS focusing on code quality.For Bash integration in Factory, create an executable script:
#!/bin/bashgit diff origin/main...HEADecho "Review PR #$1"Import Process
- Open Factory CLI
- Type
/commands - Press
Ito launch import flow - Select Claude commands from
.claude/commands/or~/.claude/commands/ - Commands copy to
~/.factory/commands/
Press R in /commands to reload without restarting.
2. Custom Agents → Custom Droids
File Location Mapping
| Claude Code | Factory Droid |
|---|---|
.claude/agents/*.md | .factory/droids/*.md |
~/.claude/agents/*.md | ~/.factory/droids/*.md |
YAML Frontmatter Comparison
| Field | Claude Code | Factory Droid | Notes |
|---|---|---|---|
name | Required | Required | Same |
description | Optional | Optional (recommended) | Under 500 chars |
| Model references | sonnet, haiku, opus | inherit or specific ID | Auto-mapped |
tools | Array of tool names | Array of tool IDs | Mapped with warnings |
Tool Mapping
When importing Claude Code agents, Factory maps tools:
| Claude Code Tool | Factory Equivalent | Status |
|---|---|---|
Read | Read | Direct |
Edit | Edit | Direct |
Write | Edit, Create | Split |
Bash | Execute | Renamed |
Glob | Glob | Direct |
Grep | Grep | Direct |
NotebookEdit | None | Not supported |
BrowseURL | WebSearch, FetchUrl | Split |
Task | Native subagent | Different mechanism |
Valid Factory Tools:
- Read-only:
Read,LS,Grep,Glob - Edit:
Create,Edit,MultiEdit,ApplyPatch - Execute:
Execute - Web:
WebSearch,FetchUrl - MCP: Dynamically populated from servers
Import Process
- Open Factory CLI
- Type
/droids - Press
Ito launch import flow - CLI scans:
<repo>/.claude/agents/(project)~/.claude/agents/(personal)
- Select agents to import
- Factory maps metadata:
- Agent name → Droid name
- Description + instructions → Droid description + prompt
- Model references → Factory equivalents
- Files written to
~/.factory/droids/
Validation Warnings
The DroidValidator surfaces:
- Errors: Invalid names, unknown models, invalid tools
- Warnings: Missing descriptions, duplicate names, unmapped tools
Agents marked “(already exists)” are pre-deselected.
Example Conversion
Claude Code Agent (.claude/agents/security-reviewer.md):
---name: security-reviewerdescription: Reviews code for security vulnerabilitiesmodel: sonnettools: - Read - Grep - Write---You are a security expert. Review code for:1. OWASP Top 10 vulnerabilities2. Injection attacks3. Authentication issuesFactory Droid (.factory/droids/security-reviewer.md):
---name: security-reviewerdescription: Reviews code for security vulnerabilitiesmodel: claude-sonnet-4-5-20250929tools: - Read - Grep - Edit - Create---You are a security expert. Review code for:1. OWASP Top 10 vulnerabilities2. Injection attacks3. Authentication issuesNote: Write → Edit + Create, model specified explicitly.
3. Skills
Conceptual Alignment
Both platforms use skills as auto-discovered, reusable capabilities:
| Aspect | Claude Code | Factory Droid |
|---|---|---|
| Discovery | Automatic | Automatic |
| Purpose | Encode workflows & expertise | Same |
| Invocation | Model decides | Model decides |
| Format | SKILL.md + frontmatter | Same |
File Structure
| Claude Code | Factory Droid |
|---|---|
| Varies | .factory/skills/<name>/SKILL.md |
~/.factory/skills/<name>/SKILL.md |
Migration
No automatic import. Manual migration:
- Copy skill directory structure
- Ensure
SKILL.mdhasnameanddescriptionfrontmatter - Update any tool references
Factory Skill Structure:
.factory/skills/└── code-review/ ├── SKILL.md └── checklist.md # Optional supporting filesSKILL.md Format:
---name: code-reviewdescription: Comprehensive code review following team standards---# Code Review Workflow
1. Check for security vulnerabilities2. Verify test coverage3. Review naming conventions...4. Project Context Files
AGENTS.md Standard
Factory has joined the AGENTS.md collaboration with OpenAI to standardize AI agent project context.
| File | Purpose | Status |
|---|---|---|
CLAUDE.md | Claude Code project instructions | Backward compatible |
AGENTS.md | Industry standard | Preferred |
.cursorrules | Cursor rules | Migrateable |
AGENT.md | Generic agent context | Migrateable |
Recommendation: Use AGENTS.md going forward. Factory supports CLAUDE.md for backward compatibility.
Content Compatibility
Both files serve the same purpose:
- Project-specific instructions
- Build/test commands
- Style guidelines
- Security considerations
Content from CLAUDE.md transfers directly to AGENTS.md.
5. MCP Server Compatibility
Factory Droid has native MCP support identical to Claude Code:
| Feature | Claude Code | Factory Droid |
|---|---|---|
| MCP Protocol | Full support | Full support |
| Server config | ~/.claude/mcp.json | Similar config |
| Tool discovery | Automatic | Automatic |
MCP servers configured for Claude Code work with Factory Droid.
6. Authentication & Subscription Options
Key Question: Can you use your Claude Code subscription (Pro/Max) with Factory Droid?
Direct Answer
Not directly, but there are workarounds:
| Method | Claude Subscription | API Key | Notes |
|---|---|---|---|
| Factory Free + BYOK | No | Yes | Use Anthropic API key |
| Factory Paid Plans | N/A | Included | Factory provides tokens |
| CLIProxyAPI Workaround | Yes | No | Proxy converts OAuth to API |
Option 1: BYOK with Anthropic API Key (Recommended)
Factory’s free tier supports “Bring Your Own Key” (BYOK) - use your Anthropic API key directly:
Configuration (~/.factory/config.json):
{ "custom_models": [ { "model_display_name": "Claude Sonnet 4.5", "model": "claude-sonnet-4-5-20250929", "base_url": "https://api.anthropic.com", "api_key": "sk-ant-api03-YOUR_KEY_HERE", "provider": "anthropic" }, { "model_display_name": "Claude Opus 4", "model": "claude-opus-4-20250514", "base_url": "https://api.anthropic.com", "api_key": "sk-ant-api03-YOUR_KEY_HERE", "provider": "anthropic" } ]}Required Fields:
model: Model identifier (e.g.,claude-sonnet-4-5-20250929)base_url: API endpoint (https://api.anthropic.com)api_key: Your Anthropic API key (cannot be empty)provider: Must beanthropic,openai, orgeneric-chat-completion-api
Optional Fields:
model_display_name: Human-readable name in/modelselectormax_tokens: Maximum output tokenssupports_images: Boolean for image input supportextra_args: Provider-specific parameters (temperature, top_p)extra_headers: Custom HTTP headers
Usage:
# Switch models in Factory CLI/model# Select your custom Claude model from the listKey Benefits:
- API keys remain local (never uploaded to Factory)
- Factory automatically uses prompt caching when available
- Full benchmarked performance with official Anthropic API
Option 2: CLIProxyAPI for Subscription Users
If you have Claude Code Max subscription and want to avoid API costs, use CLIProxyAPI:
How it works:
Factory CLI → CLIProxyAPI (localhost:8317) → Anthropic APIThe proxy intercepts requests, strips dummy API keys, and substitutes valid OAuth tokens from your Claude subscription.
Setup:
# 1. Install CLIProxyAPI (requires Go 1.24+)git clone <cli-proxy-api-repo>cd cli-proxy-api && go build
# 2. Authenticate with Claude subscription./cli-proxy-api --claude-login# Opens browser for OAuth authentication
# 3. Start proxy./cli-proxy-api# Listens on localhost:8317Factory Configuration:
{ "custom_models": [ { "model_display_name": "Claude Sonnet (Subscription)", "model": "claude-sonnet-4-20250514", "base_url": "http://localhost:8317", "api_key": "dummy-key-ignored-by-proxy", "provider": "anthropic" } ]}Known Limitations:
/compresscommand may not work with custom models- Requires local proxy running during sessions
- Subject to Claude subscription rate limits
Option 3: Factory Paid Plans
Factory’s paid plans include their own token allocations:
| Plan | Price | Tokens | Notes |
|---|---|---|---|
| Free | $0 | BYOK only | Bring your own API keys |
| Pro | $20/mo | 20M tokens | Desktop/web/mobile apps |
| Max | $200/mo | 200M tokens | Early access features |
| Ultra | $2000/mo | 2B tokens | Dedicated support |
Paid plans include access to Claude, GPT-5, and other models without separate API keys.
Cost Comparison
| Approach | Monthly Cost | Best For |
|---|---|---|
| Factory Free + Anthropic API | Pay-per-token | High control, variable usage |
| Factory Pro | $20 fixed | Moderate usage, multiple models |
| CLIProxyAPI + Claude Max | $100 (Claude Max) | Existing Claude subscribers |
| Factory Max | $200 fixed | Heavy usage, early access |
Migration Checklist
Quick Migration (5 minutes)
- Import slash commands:
/commands→I - Import agents:
/droids→I - Review tool mapping warnings
- Test imported configurations
Full Migration
- Import slash commands
- Import custom agents
- Review and fix tool mapping issues
- Manually migrate skills
- Convert
CLAUDE.mdtoAGENTS.md(optional) - Verify MCP server configurations
- Test all workflows
Known Limitations
Not Transferable
- Positional arguments in Markdown commands - Factory only supports
$ARGUMENTSin Markdown; use scripts for$1,$2 allowed-toolsfrontmatter - Reserved for future use in FactoryNotebookEdittool - No Factory equivalentdisable-model-invocation- Not available in Factory
Requires Manual Adjustment
- Bash integration - Convert
!commandto shebang scripts Writetool - Split toEdit+CreateTasksubagents - Different mechanism (native droids)- Model references - May need explicit model IDs
Performance Comparison
From Terminal-Bench (2025):
| Agent Configuration | Score |
|---|---|
| Droid + Opus | 58.8% |
| Droid + Sonnet | 50.5% |
| Droid + GPT-5 | 52.5% |
| Claude Code + Opus | 43.2% |
| Codex CLI | 42.8% |
Factory Droid extracts more capability from the same models.
Resources
Factory Documentation:
Claude Code Documentation:
Comparison Articles:
Authentication & BYOK:
Last updated: 2025-11-28