Add provider

From hoangsonww/Forge-Agentic-Coding-CLI · View interactive version

Add provider is an AI agent skill from the GitHub repository hoangsonww/Forge-Agentic-Coding-CLI. Scaffold a new model provider for Forge — class implementation, registry wiring, providerEnum entry, local-catalog classification, and unit test with mocked transport. Use for anything under src/models/.

How to use this skill

Skill file

/add-provider — add a new model provider

Providers in Forge follow a uniform shape (see src/models/ollama.ts,

src/models/openai.ts, src/models/anthropic.ts). Copy the shape, don't

invent a new one.

Provider name: $ARGUMENTS.

1. Provider class — `src/models/$ARGUMENTS.ts`

(availability probe, chat/complete, token counting, streaming).

cold-start budget.

node-fetch, or similar.

retryable flag and a recoveryHint where possible.

2. Registry — `src/models/registry.ts`

add it to isLocalProvider.

3. Catalog — `src/models/local-catalog.ts`

capabilities. The catalog is the single source of truth.

4. Router — `src/models/router.ts`

rules. If routing needs a change, update the router and add a test

in test/unit/adapter.test.ts.

5. Unit test

429 retry logic, auth failure surfaces a non-retryable structured

error.

6. Docs

Run /verify to close the loop.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.