agentleFS
allswebtechallswebtech/trouteai/.claude/skills/add-provider/SKILL.md

add-provider

Skill36 starsChanged 20 days agoMITView on GitHub

Add a new AI provider to TRouteAI (catalog entry, routing entry, models, icon, connection test). Use when asked to add, support or integrate a provider, a gateway or an OpenAI-compatible or Anthropic-compatible service.

23 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-tool, release-notes and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    add-tool

    Add a new tool to PilotSwarm. Covers defining the tool with defineTool(), registering it on the worker (worker-level or per-session), referencing it from the client via toolNames, and adding an integration test.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    release-notes

    Author and update release notes for Azure App Configuration libraries and providers. USE FOR: write release notes, add release note entry, update release notes, draft release notes, new version release notes, format release notes. DO NOT USE FOR: generating changelogs from git history, writing internal engineering notes.

    Also in 3 projects that use this

  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 4 projects that use this

  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 20 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Icon: Put public/providers/<id>.svg (or .png) in place and add the id to KNOWN_SVGS (or KNOWN_PNGS) in …

    line 34
  2. Very specific:

    Executor: Not needed for OpenAI-format providers: open-sse/executors/default.ts handles them.

    line 41
  3. Distinctive:

    Never put a real API key in code, a test or a fixture.

    line 50
  4. Distinctive:

    Do not add a runtime dependency for one provider.

    line 53

“Common” is measured: kept by at least 6 in 10 of the 20 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add a provider

Provider to add: $ARGUMENTS

First read the provider's own API documentation and write down: the base URL, how the key is sent (Bearer header, x-api-key, something else), the request format (OpenAI chat completions, OpenAI responses, Anthropic messages, or its own), the model ids, and whether it has a models endpoint. Do not guess any of these; if the documentation is not reachable, ask.

Copy a small existing provider at every step. For an OpenAI-format API-key provider that is cerebras.

  1. Catalog entry (what the dashboard shows). Add it to the matching family file in src/shared/constants/providers/apikey/ (gateways.ts, frontier-labs.ts, inference-hosts.ts, enterprise-cloud.ts, regional.ts, specialty-media.ts). Required: id, name, icon (a Material icon name), color (#RRGGBB). Useful: alias, website, textIcon, hasFree, freeNote. The catalog is validated with Zod when the app starts (src/shared/validation/providerSchema.ts); a wrong entry stops the start with a [PROVIDER VALIDATION] message.
  2. Routing entry (how requests are sent). Create open-sse/config/providers/registry/<id>/index.ts exporting a RegistryEntry (open-sse/config/providers/shared.ts): id, alias, format, executor: "default", baseUrl, authType, authHeader, models: [{ id, name }]. Nothing is discovered automatically: import it and add it to REGISTRY in open-sse/config/providers/index.ts.
  3. Models. The static list is the models array of the routing entry. For live discovery add the provider to src/app/api/providers/[id]/models/discovery/providerModelsConfig.ts.
  4. Icon. Put public/providers/<id>.svg (or .png) in place and add the id to KNOWN_SVGS (or KNOWN_PNGS) in src/shared/components/ProviderIcon.tsx. Use the provider's own mark only when its licence allows it; otherwise leave the generic icon.
  5. Connection test. OpenAI-format entries are tested automatically (src/lib/providers/validation/openaiFormat.ts, using the first model). Only a provider with its own check needs an entry in SPECIALTY_VALIDATORS in src/lib/providers/validation.ts.
  6. Executor. Not needed for OpenAI-format providers: open-sse/executors/default.ts handles them. Write open-sse/executors/<id>.ts and register it in open-sse/executors/index.ts only when the provider needs its own request or response shape.
  7. Optional. A short onboarding text under providers.onboardingProviderDescriptions.<id> in src/i18n/messages/en.json; free-tier and pricing data only when you have the provider's published numbers.

Rules:

  • Never put a real API key in code, a test or a fixture.
  • Public client identifiers of a provider's CLI are stored through open-sse/utils/publicCreds.ts and read with resolvePublicCred(), never as literals.
  • Do not add a runtime dependency for one provider.

Finish with the verify skill. Then start the app with a throwaway data folder, open Providers, and confirm the new provider appears with its icon and that "Test connection" gives a clear result for a wrong key. Say plainly that a real request was not tested unless the person gave you a key for it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.