# How Ponytail Handles Different Agent Hosts: Claude, Codex, Copilot, and Qoder

> Discover how Ponytail manages Claude, Codex, Copilot, and Qoder with its thin-adapter architecture. Learn how reusable skills map to agent extension points for seamless integration.

- Repository: [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail)
- Tags: deep-dive
- Published: 2026-09-11

---

**Ponytail uses a thin-adapter architecture where core skills live in the `skills/` directory and host-specific adapters map each agent's extension points to those reusable behaviors.**

The open-source Ponytail project provides a consistent "lazy senior developer" experience across multiple AI coding agents. Rather than duplicating logic for every platform, the repository centralizes behavior definitions and wraps them with minimal host-specific glue code. This design ensures that commands like `/ponytail` or `/ponytail-review` work identically whether you are using Claude, GitHub Copilot, or Qoder.

## The Three-Layer Architecture

Ponytail organizes its agent support into three distinct layers, keeping the core logic portable while allowing hosts to integrate natively.

### Core Skills Layer

The actual behavior definitions reside under the `skills/` directory. Each skill is a self-contained markdown file describing capabilities, triggers, and system prompts. For example, [`skills/ponytail/SKILL.md`](https://github.com/DietrichGebert/ponytail/blob/main/skills/ponytail/SKILL.md) defines the lazy senior developer mode, while [`skills/ponytail-review/SKILL.md`](https://github.com/DietrichGebert/ponytail/blob/main/skills/ponytail-review/SKILL.md) handles over-engineering reviews. These files are **host-agnostic** and written in plain text so any agent can theoretically consume them.

### Host Adapters Layer

Host adapters act as translation layers between a specific agent's plugin system and the core skills. These adapters are intentionally thin: when a host supports dynamic skill loading, the adapter simply points to the `skills/` directory; when a host requires static instructions, the adapter copies relevant rules into host-specific files.

### Fallback Instruction Set

For agents that only understand plain text context, Ponytail provides [`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md) at the repository root. This file contains a compact, always-on rule set that enables basic Ponytail commands without requiring plugin installation or hook registration.

## Claude and Codex Integration

Claude and Codex support plugin manifests and JSON-based hooks, allowing deep integration with Ponytail's skill system.

### Plugin Configuration

The adapters for these hosts use [`plugin.json`](https://github.com/DietrichGebert/ponytail/blob/main/plugin.json) files to register capabilities:

```json
// .claude-plugin/plugin.json
{
  "name": "ponytail",
  "hooks": "hooks/claude-codex-hooks.json",
  "skills": "skills/"
}

```

```json
// .codex-plugin/plugin.json
{
  "name": "ponytail",
  "hooks": "hooks/claude-codex-hooks.json", 
  "skills": "skills/"
}

```

### Hook Registration

The shared [`hooks/claude-codex-hooks.json`](https://github.com/DietrichGebert/ponytail/blob/main/hooks/claude-codex-hooks.json) file maps host lifecycle events to Ponytail behaviors:

```json
// hooks/claude-codex-hooks.json
{
  "onActivate": "pre_llm_call",
  "commands": ["/ponytail", "/ponytail-review"]
}

```

When you type `/ponytail` in a Claude or Codex session, the hook triggers the corresponding skill from [`skills/ponytail/SKILL.md`](https://github.com/DietrichGebert/ponytail/blob/main/skills/ponytail/SKILL.md), and the status line updates to reflect the current mode.

## GitHub Copilot Support

GitHub Copilot does not expose a skill system, so Ponytail falls back to **instruction-tier** integration using always-on context files.

### Instruction File Setup

Copilot reads project-level instructions from [`.github/copilot-instructions.md`](https://github.com/DietrichGebert/ponytail/blob/main/.github/copilot-instructions.md):

```markdown
<!-- .github/copilot-instructions.md -->

# ponytail

/ponytail               # invoke the lazy-senior-dev mode

/ponytail-review        # run an over-engineering review

```

Because Copilot automatically injects these rules into every suggestion, typing `/ponytail` in a comment or docstring triggers the corresponding behavior defined in [`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md). For Copilot CLI users, additional plugin manifests live under `.github/plugin/`.

## Qoder Plugin Architecture

Qoder offers the richest extension points, supporting both skill loading and event hooks for dynamic behavior injection.

### Plugin Manifest

The [`.qoder-plugin/plugin.json`](https://github.com/DietrichGebert/ponytail/blob/main/.qoder-plugin/plugin.json) points to the core skills directory:

```json
// .qoder-plugin/plugin.json
{
  "name": "ponytail",
  "skillsPath": "skills/",
  "hooks": "hooks/qoder-hooks.json"
}

```

### Event Hooks

Qoder-specific hooks in [`hooks/qoder-hooks.json`](https://github.com/DietrichGebert/ponytail/blob/main/hooks/qoder-hooks.json) enable automatic mode switching and sub-agent injection:

```json
// hooks/qoder-hooks.json
{
  "UserPromptSubmit": {
    "match": "*/ponytail*",
    "action": "injectRuleset"
  },
  "PreToolUse": {
    "match": "task|Task",
    "action": "subagentInject"
  }
}

```

When you submit a prompt like `/ponytail-audit`, the `UserPromptSubmit` hook injects the full ruleset, while `PreToolUse` ensures the appropriate sub-agent skill executes when task-related tools are invoked.

## The "Thin Adapter" Design Philosophy

All Ponytail adapters follow a strict rule: **keep adapters thin**. When a host supports dynamic skill loading, adapters merely reference the existing `skills/` and `hooks/` directories rather than duplicating content. When a host only understands raw instructions, the adapter syncs relevant rule text into [`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md) or host-specific instruction files. This ensures behavioral consistency across platforms while minimizing maintenance overhead.

## Summary

- **Core skills** are defined once in the `skills/` directory (e.g., [`skills/ponytail/SKILL.md`](https://github.com/DietrichGebert/ponytail/blob/main/skills/ponytail/SKILL.md)) and remain host-agnostic.
- **Claude and Codex** use JSON plugin manifests ([`.claude-plugin/plugin.json`](https://github.com/DietrichGebert/ponytail/blob/main/.claude-plugin/plugin.json), [`.codex-plugin/plugin.json`](https://github.com/DietrichGebert/ponytail/blob/main/.codex-plugin/plugin.json)) and shared hooks ([`hooks/claude-codex-hooks.json`](https://github.com/DietrichGebert/ponytail/blob/main/hooks/claude-codex-hooks.json)) to register commands.
- **GitHub Copilot** relies on instruction-tier integration via [`.github/copilot-instructions.md`](https://github.com/DietrichGebert/ponytail/blob/main/.github/copilot-instructions.md) and [`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md) for always-on context.
- **Qoder** combines plugin manifests ([`.qoder-plugin/plugin.json`](https://github.com/DietrichGebert/ponytail/blob/main/.qoder-plugin/plugin.json)) with sophisticated hooks ([`hooks/qoder-hooks.json`](https://github.com/DietrichGebert/ponytail/blob/main/hooks/qoder-hooks.json)) for dynamic rule injection and sub-agent management.
- The **thin-adapter pattern** ensures that behavior updates propagate to all supported hosts automatically.

## Frequently Asked Questions

### Does Ponytail duplicate code for each agent host?

No. Ponytail keeps all behavioral logic in the `skills/` directory. Host adapters are thin wrappers that either point to these files or copy their contents into host-specific instruction formats. According to the adapter rule documented in [`docs/agent-portability.md`](https://github.com/DietrichGebert/ponytail/blob/main/docs/agent-portability.md), this prevents drift between platforms.

### Which Ponytail commands are available across all hosts?

The primary commands `/ponytail` (lazy senior dev mode) and `/ponytail-review` (over-engineering review) are available on all supported hosts. Claude, Codex, and Qoder expose these as native slash commands, while Copilot interprets them via [`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md) context injection.

### How does Ponytail handle hosts that don't support plugins?

For agents without plugin systems, Ponytail provides [`AGENTS.md`](https://github.com/DietrichGebert/ponytail/blob/main/AGENTS.md) at the repository root. This file contains compact, always-on rules that enable basic Ponytail functionality through plain text instructions. Hosts like generic LLM clients can load this file as system context.

### What happens when I type `/ponytail-audit` in Qoder?

Qoder's `UserPromptSubmit` hook (defined in [`hooks/qoder-hooks.json`](https://github.com/DietrichGebert/ponytail/blob/main/hooks/qoder-hooks.json)) detects the pattern and injects the full Ponytail ruleset. Subsequently, the `PreToolUse` hook ensures that task-related tool calls trigger the `ponytail-audit` skill from the `skills/` directory.