agent-converter
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Converts agent definitions between Markdown (with YAML frontmatter) and TOML formats. Use when transforming agent configurations for different agent systems — MD format for rich tool restrictions, TOML format for Codex-style agents with sandbox modes.
12installs
Sourceqredence/skills
Added on
NPX Install
npx skill4agent add qredence/skills agent-converterTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Agent Converter
Objective
Convert agent definitions between two formats:
- Markdown format (with YAML frontmatter) — Rich format with explicit tool restrictions
.md - TOML format () — Simple format for Codex agents with sandbox modes
.toml
Inputs
- Source file: Path to an agent file (or directory of agents)
.md - Output format: (default) or
tomlmd - Output directory: Where to write converted files (default: same as source)
Commands
Convert single agent MD → TOML
bash
python3 skills/agent-converter/scripts/convert_agent.py <input.md> [--output <dir>]Convert all agents in directory
bash
python3 skills/agent-converter/scripts/convert_agent.py --batch <input_dir> [--output <dir>]Convert TOML → MD
bash
python3 skills/agent-converter/scripts/convert_agent.py <input.toml> --to-md [--output <dir>]Format Mapping
| MD Frontmatter | TOML Field |
|---|---|
| (derived from filename) |
| Included in |
| Mapped to |
| Markdown body | |
Tool → Sandbox Mode Mapping
| Tools | Sandbox Mode |
|---|---|
| |
| Any Write/Edit tools | |
| No tools specified | |
Sandbox Mode → Tool Mapping (reverse)
| Sandbox Mode | Tools |
|---|---|
| |
| |
Example Conversion
Input: explorer.md
explorer.mdmarkdown
---
name: explorer
description: >
Read-only codebase explorer.
tools:
- Read
- Grep
- Glob
---
# Explorer — Read-Only Codebase Navigator
You are a read-only explorer agent...Output: explorer.toml
explorer.tomltoml
sandbox_mode = "read-only"
developer_instructions = """
Role: Read-only codebase explorer.
Tools: Read, Grep, Glob
---
# Explorer — Read-Only Codebase Navigator
You are a read-only explorer agent...
"""Workflow
- Parse source file (MD or TOML)
- Extract metadata and instructions
- Map format-specific fields
- Write output in target format
- Report conversion summary
Error Handling
| Error | Resolution |
|---|---|
| Missing frontmatter | Treat as plain markdown, use defaults |
| Invalid TOML | Report parse error with line number |
| Unknown tools | Warn and include in output as-is |
| File exists | Prompt user or use |
References
- Format specification:
skills/agent-converter/references/format-spec.md - Example agents:
.agents/sub-agents/