Get the FREE Ultimate OpenClaw Setup Guide →

export-agent

npx machina-cli add skill open-gitagent/gitagent/export-agent --openclaw
Files (1)
SKILL.md
2.0 KB

Export & 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

FormatOutputUse Case
system-promptMarkdownUniversal — paste into any LLM
claude-codeCLAUDE.mdDrop into a Claude Code project
openaiPythonRun with OpenAI Agents SDK
crewaiYAMLRun with CrewAI
openclawJSON + MDRun with OpenClaw
nanobotJSON + MDRun with Nanobot
lyzrJSONCreate agent on Lyzr Studio
githubJSONCall 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

SourceInputWhat It Creates
claudeCLAUDE.md, .claude/skills/agent.yaml, SOUL.md, RULES.md, skills
cursor.cursorrulesagent.yaml, SOUL.md, AGENTS.md
crewaicrew.yamlagent.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

  1. Step 1: Run export for your target format: gitagent export -f <format> -d ./my-agent [-o output-file]
  2. Step 2: If exporting to a file, inspect the generated artifact (for example agent.py, CLAUDE.md, or JSON).
  3. 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

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers