agent-adapters
Overview
Unified cross-agent configuration engine. Translates single ContextOS source rules into optimized native formats for Claude Code (CLAUDE.md), Gemini (.agents/skills), Cursor (.cursorrules, .cursor/rules/*.mdc), GitHub Copilot, Zed, Aider, and Continue.
When to Use
Activate when configuring, synchronizing, or exporting agent rules and skills across multiple IDEs and AI programming assistants.
Rules & Patterns
ContextOS is agent-agnostic. This skill generates the right config format for any AI agent.
Supported Agents
| Agent | Config File | Format |
|---|---|---|
| Gemini | .agents/AGENTS.md + .agents/skills/ |
Markdown + YAML skills |
| Claude Code | CLAUDE.md |
Single markdown file |
| GitHub Copilot / Codex | AGENTS.md (root) |
Markdown |
| Cursor | .cursorrules |
Plain text rules |
| Aider | .aider.conf.yml |
YAML config |
| Continue | .continuerules |
Markdown rules |
| OpenHands | openhands.json |
JSON config |
| Roo Code | .roo/ |
Directory with rules |
| Windsurf | .windsurfrules |
Plain text rules |
Generation Command
ctx adapt [agent] — Generate config for a specific agent.
ctx adapt all — Generate configs for all supported agents.
Adapter Logic
For Claude Code (CLAUDE.md)
Compile into a single markdown file:
- Project overview from
docs/PRD.md(summary only) - Architecture summary from
docs/ARCHITECTURE.md - Coding rules from loaded skills
- Active Decision Records
- Current tasks from
docs/TASKS.md
For Gemini (.agents/AGENTS.md)
Already native format. Just ensure:
AGENTS.mdreferences the skill directory- Skills have proper SKILL.md with frontmatter
- Context Manager rules are in AGENTS.md
For Cursor (.cursorrules)
Compile into a flat text file:
- Project context (condensed)
- Coding style rules
- Framework-specific instructions
- Anti-patterns to avoid
For Aider (.aider.conf.yml)
read:
- docs/ARCHITECTURE.md
- docs/API.md
- docs/PROJECT_GRAPH.md
conventions:
- {{coding rules from skills}}
Sync Rules
- Adapters read from the canonical ContextOS documents
- Never edit adapter output files directly
- Re-run
ctx adaptafter any document change - Each adapter file includes a header:
# Generated by ContextOS — do not edit directly
Code Examples
See EXAMPLES.md for detailed code examples.
Validation Checklist
What to verify during the review phase before completing the task.
Common Mistakes
Anti-patterns and things to explicitly avoid. See TROUBLESHOOTING.md.
Integration Notes
How this skill interacts with other skills.