export-agent
npx machina-cli add skill open-gitagent/gitagent/export-agent --openclawExport & Import Agents
When to Use
When a user wants to convert their agent to another framework format, or import an existing agent into gitagent.
Export
Convert a gitagent definition to another framework:
gitagent export -f <format> -d ./my-agent [-o output-file]
Formats
| Format | Output | Use Case |
|---|---|---|
system-prompt | Markdown | Universal — paste into any LLM |
claude-code | CLAUDE.md | Drop into a Claude Code project |
openai | Python | Run with OpenAI Agents SDK |
crewai | YAML | Run with CrewAI |
openclaw | JSON + MD | Run with OpenClaw |
nanobot | JSON + MD | Run with Nanobot |
lyzr | JSON | Create agent on Lyzr Studio |
github | JSON | Call GitHub Models API |
Examples
# Get a system prompt for any LLM
gitagent export -f system-prompt -d ./my-agent
# Generate a CLAUDE.md
gitagent export -f claude-code -d ./my-agent -o CLAUDE.md
# Generate Python code for OpenAI
gitagent export -f openai -d ./my-agent -o agent.py
# Preview what Lyzr API will receive
gitagent export -f lyzr -d ./my-agent
# Preview GitHub Models payload
gitagent export -f github -d ./my-agent
Import
Convert existing agent frameworks into gitagent:
gitagent import --from <format> <path> [-d target-dir]
Sources
| Source | Input | What It Creates |
|---|---|---|
claude | CLAUDE.md, .claude/skills/ | agent.yaml, SOUL.md, RULES.md, skills |
cursor | .cursorrules | agent.yaml, SOUL.md, AGENTS.md |
crewai | crew.yaml | agent.yaml, SOUL.md, agents/ |
Examples
# Import a Claude Code project
gitagent import --from claude ./my-project
# Import from Cursor
gitagent import --from cursor ./.cursorrules
# Import CrewAI config
gitagent import --from crewai ./crew.yaml -d ./imported
Source
git clone https://github.com/open-gitagent/gitagent/blob/main/examples/gitagent-helper/skills/export-agent/SKILL.mdView on GitHub Overview
Export gitagent definitions to other frameworks and import from existing tools. This enables interoperability across formats like Claude Code, OpenAI Agents SDK, CrewAI, OpenClaw, and more. Use the export and import commands to migrate agents with their definitions, prompts, and skills.
How This Skill Works
Use gitagent export with the -f flag to select the target format and -d to specify the agent directory, optionally -o to write to a file. Supported formats include system-prompt, claude-code, openai, crewai, openclaw, nanobot, lyzr, and github. Import works with gitagent import --from <format> to convert external agent definitions into gitagent's schema.
When to Use It
- You need to convert a gitagent into another framework format for deployment.
- You want to import an existing agent from Claude Code, Cursor, CrewAI, or another source into gitagent.
- You are preparing artifacts like CLAUDE.md or agent.py for a specific platform.
- You want to preview or validate payloads for Lyzr Studio or GitHub Models API.
- You are migrating an agent during a project modernization or framework switch.
Quick Start
- Step 1: Run export for your target format: gitagent export -f <format> -d ./my-agent [-o output-file]
- Step 2: If exporting to a file, inspect the generated artifact (for example agent.py, CLAUDE.md, or JSON).
- Step 3: If needed, import from another framework: gitagent import --from <format> <path> [-d target-dir]
Best Practices
- Specify -d to clearly target your agent directory.
- Use -o to produce a stable, named output file for versioning.
- Test the exported artifact in the target framework before production use.
- Verify that the converted agent.yaml, SOUL.md, and skills remain consistent after export/import.
- Document the chosen export format and any custom mappings in your repository.
Example Use Cases
- Export an OpenAI Python agent: gitagent export -f openai -d ./my-agent -o agent.py
- Generate a CLAUDE.md for Claude Code: gitagent export -f claude-code -d ./my-agent -o CLAUDE.md
- Preview the Lyzr Studio JSON payload: gitagent export -f lyzr -d ./my-agent
- Preview the GitHub Models payload: gitagent export -f github -d ./my-agent
- Import a Claude Code project into gitagent: gitagent import --from claude ./my-project