agentsmesh import
Import an existing tool’s native config into the canonical .agentsmesh/ directory. The import is lossless — internal file references, cross-skill links, and tool-specific metadata are all preserved.
Usage
agentsmesh import --from <target>agentsmesh import --global --from claude-codeFlags
| Flag | Description |
|---|---|
--from <target> | Source tool ID to import from. Required. |
--global | Import from user-level tool paths into ~/.agentsmesh/. See the global-mode sections below for target-specific paths and current importer caveats. |
Supported targets
The table below lists every builtin target’s project-scope import root. With --global, AgentsMesh uses the user-level paths documented in the global-mode sections below. This table is generated from the target catalog — see the support matrix for full feature coverage per tool.
| Target ID | Tool | Reads from |
|---|---|---|
aider | Aider | CONVENTIONS.md |
amazon-q | Amazon Q Developer | .amazonq/rules |
amp | Amp | AGENTS.md |
antigravity | Antigravity | .agents/rules |
augment-code | Augment Code | .augment/rules |
claude-code | Claude Code | .claude/CLAUDE.md |
cline | Cline | AGENTS.md |
codex-cli | Codex CLI | AGENTS.md |
continue | Continue | .continue/rules |
copilot | GitHub Copilot | .github/copilot-instructions.md |
crush | Crush | CRUSH.md |
cursor | Cursor | .cursor/rules/general.mdc |
deepagents-cli | Deep Agents CLI | .deepagents/AGENTS.md |
factory-droid | Factory Droid | AGENTS.md |
gemini-cli | Gemini CLI | .gemini/rules |
goose | Goose | .goosehints |
jules | Jules | AGENTS.md |
junie | Junie | .junie/rules |
kilo-code | Kilo Code | AGENTS.md |
kiro | Kiro | AGENTS.md |
opencode | OpenCode | AGENTS.md |
pi-agent | Pi Agent | AGENTS.md |
qwen-code | Qwen Code | QWEN.md |
replit-agent | Replit Agent | replit.md |
roo-code | Roo Code | .roo/rules/00-root.md |
rovodev | Rovo Dev | AGENTS.md |
trae | Trae | .trae/rules/project_rules.md |
warp | Warp | WARP.md |
windsurf | Windsurf | AGENTS.md |
zed | Zed | .rules |
Examples
# Import Claude Code configurationagentsmesh import --from claude-code
# Import Claude Code global configuration from ~/.claude/ into ~/.agentsmesh/agentsmesh import --global --from claude-code
# Import Cursor rules and settingsagentsmesh import --from cursorAny target ID from the table above is valid for --from. Run agentsmesh init first if you’re unsure which tools have configs in the current project — it auto-detects every builtin target.
What import maps
The same canonical structure under .agentsmesh/ is produced regardless of which target you import from:
| Source feature | Canonical destination |
|---|---|
| Root rule + per-file rules | .agentsmesh/rules/_root.md, .agentsmesh/rules/*.md |
| Commands / prompts / workflows | .agentsmesh/commands/*.md |
| Agents / subagents / droids | .agentsmesh/agents/*.md |
| Skills / SKILL bundles | .agentsmesh/skills/<name>/SKILL.md (+ supporting files) |
| MCP servers | .agentsmesh/mcp.json |
| Hooks | .agentsmesh/hooks.yaml |
| Permissions | .agentsmesh/permissions.yaml |
| Ignore patterns | .agentsmesh/ignore |
Each target’s native file paths and feature support are listed in the supported tools matrix. Embedded features (e.g., Codex CLI commands projected as skills) are restored to their original canonical format on import — not the projected wrapper.
Global-mode caveats
A handful of targets have global-mode importer behavior worth noting. For every target not listed here, --global simply reads from the documented user-level paths and writes to ~/.agentsmesh/.
Antigravity
Project-only paths such as .agents/workflows/ are not scanned in global mode.
Cline
agentsmesh generate --global --targets cline writes rules and workflows to ~/Documents/Cline/, but the current importer reads Cline’s project-style paths under $HOME (~/.clinerules, ~/.cline/skills/, ~/.cline/cline_mcp_settings.json, ~/.clineignore). Generated hook scripts under ~/Documents/Cline/Hooks/ are not imported back into hooks.yaml yet.
Windsurf
agentsmesh generate --global --targets windsurf writes native user-level files under ~/.codeium/windsurf/, but the current importer reads Windsurf’s project-style paths under $HOME (~/.windsurfrules or ~/AGENTS.md, ~/.windsurf/, ~/.windsurfignore or ~/.codeiumignore).
Codex CLI
~/.codex/AGENTS.override.md is preferred over ~/.codex/AGENTS.md when both exist. Global import does not recurse nested AGENTS.md files under $HOME.
Cursor
Global import reads ~/.cursor/rules/*.mdc first, then falls back to legacy ~/.agentsmesh-exports/cursor/user-rules.md or ~/.cursor/AGENTS.md, and reads MCP, hooks, ignore, skills, agents, and commands from ~/.cursor/.
Reference rewriting
During import, AgentsMesh rewrites internal file references:
.claude/skills/api-gen/template.hbs→.agentsmesh/skills/api-gen/template.hbs- Tool-relative paths → canonical paths
This keeps cross-references valid after import.
Import idempotency
Running import twice on the same source is safe. Existing canonical files are merged — no duplicates are created.
Post-import: MCP server entry
After importing from a tool that manages MCP servers (e.g. claude-code, cursor, gemini-cli), the AgentsMesh self-serve MCP server entry is seeded into .agentsmesh/mcp.json if it is not already present. This ensures the MCP Server entry survives import round-trips and is always available after generation.