# Adapters

> agent-adapters

- Skill: `kok-o/adapters-3` (Agent Skill)
- Install (CLI): `npx skillmds@latest add kok-o/adapters-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kok-o/adapters-3/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: kok-o (https://skillmd.com/u/kok-o)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kok-o/adapters-3

---

# 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:

1. Project overview from `docs/PRD.md` (summary only)
2. Architecture summary from `docs/ARCHITECTURE.md`
3. Coding rules from loaded skills
4. Active Decision Records
5. Current tasks from `docs/TASKS.md`

### For Gemini (`.agents/AGENTS.md`)

Already native format. Just ensure:

1. `AGENTS.md` references the skill directory
2. Skills have proper SKILL.md with frontmatter
3. Context Manager rules are in AGENTS.md

### For Cursor (`.cursorrules`)

Compile into a flat text file:

1. Project context (condensed)
2. Coding style rules
3. Framework-specific instructions
4. Anti-patterns to avoid

### For Aider (`.aider.conf.yml`)

```yaml
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 adapt` after 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.


# adapters Examples — Anti-patterns vs ContextOS Standard

## Example 1: Multi-Agent Configuration

### Anti-pattern: Manually Syncing 6 Different Rule Files

```text
Editing .cursorrules, then forgetting to update CLAUDE.md, then editing copilot-instructions.md.
Rules diverge across teammates using different IDEs.
```

### Best practice: ContextOS Standard (Single Source of Truth)

```bash
# Edit skills once in .agents/core/skills/
# Compile to all agents with one command:
node .agents/ctx.js export all
# Automatically updates .cursorrules, CLAUDE.md, copilot-instructions.md, .aider, .zed
```

# adapters Troubleshooting & Common Mistakes

## 1. Overwriting Custom Configs

- **Symptom**: Custom non-ContextOS rules wiped out during export.
- **Root Cause**: Running export with force flags over unmanaged files.
- **Fix**: Keep custom project overrides in dedicated config files or use plugin skills.
