Use when adding support for a new agent CLI to Corral (aider, gemini, opencode or similar), either as a built-in provider or as a documented corral.providers example, or when changing provider fields or hook types.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Add Provider?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adamleblanc-add-provider)
---
name: add-provider
description: Use when adding support for a new agent CLI to Corral (aider, gemini, opencode or similar), either as a built-in provider or as a documented corral.providers example, or when changing provider fields or hook types.
---
# Adding a provider
Providers are defined in `src/config/providers.ts` (`Provider`, `BUILTIN_PROVIDERS`, `sanitizeProviders`,
`buildLaunch`). User providers come from the `corral.providers` setting and merge by `id` over the built-ins.
1. Ask the author: built-in (ships in `BUILTIN_PROVIDERS`) or documented only (an example in
`docs/configuration.md`, "Adding a provider")? Most new CLIs start as documented.
2. Gather the CLI facts: `command`, default `args`, `newSessionArgs` and `resumeArgs` (`${corralId}` and
`${sessionName}` are substituted), any `env`, and whether it can run hooks.
3. Choose `hooks.type`: `claude-settings`, `codex-notify` or `none`. A new hook mechanism means a new `HookType`,
a new entry in `HOOK_TYPES`, a branch in `buildLaunch`, and tests in `test/unit/config/providers.test.ts`.
Hooks must be injected per launch; never write to the CLI's global config.
4. Capture real screens for its prompts (and busy line, if any) into `test/unit/fixtures/<id>-prompt.txt`, as in
the `recapture-agent-patterns` skill. Don't guess the text.
5. Write `waitingPatterns` (and `workingPatterns` if it has a stable busy line) and add fixture tests to
`test/unit/config/waitingPatterns.test.ts`, including an idle screen that must not match.
6. Built-in only: add the entry to `BUILTIN_PROVIDERS` and cover its argv in
`test/unit/config/providers.test.ts` (new session, resume, hook flags).
7. Docs: add or update the example in `docs/configuration.md` ("Adding a provider"); for a built-in, mention it
in `README.md` and the hook mechanism in `docs/how-it-works.md`. Western prose, literal JSON.
8. If `package.json` `corral.providers` description or any `contributes` text names the providers, keep it in
sync.
9. Run `npm run typecheck && npm test`, then commit as `feat: <label> provider` (or `docs:` for an example only).