add-provider
Assists developers in building new AI providers by structuring architecture and test-driven implementation logic.
Install
mkdir -p .claude/skills/add-provider && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7648" && unzip -o skill.zip -d .claude/skills/add-provider && rm skill.zipInstalls to .claude/skills/add-provider
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Guide for adding new AI providers to ClaudeBar using TDD patterns. Use this skill when:
(1) Adding a new AI assistant provider (like Antigravity, Cursor, etc.)
(2) Creating a usage probe for a CLI tool or local API
(3) Following TDD to implement provider integration
(4) User asks "how do I add a new provider" or "create a provider for X"Key capabilities
- →Implements new AI provider integrations using TDD
- →Creates usage probes for CLI tools and local APIs
- →Registers providers in the ClaudeBar application
- →Defines visual identity for new providers
How it works
The skill guides the developer through a five-phase TDD process, from parsing tests to registration and visual identity setup.
Inputs & outputs
When to use add-provider
- →Integrate new AI service providers
- →Create usage probes for CLI tools
- →Implement provider integration using TDD
About this skill
Add a Provider to ClaudeBar
A provider is data: one file, Modules/Providers/Resources/Providers/<id>.json.
The app finds it — ProviderCatalog.detect() reads every definition in the
bundle (and in ~/.claudebar/providers, ~/.claudebar/extensions) and makes
each on one shared Engine (TARGET_ARCHITECTURE §10).
There is no registration step and no Swift line that names it.
It is an abstraction layer that answers three questions, each once: who the
provider is (profile), how an account is signed in (settings, and
accounts when the vendor keeps a login in a folder), and how to get its
usage (dataSources: where the key is, how to fetch, how to read the
answer). One
Provider class and one DataSource type run every definition. You write
no Swift for a vendor: no XxxProvider, no XxxUsageProbe, no
XxxCredentialLoader.
Read first: TARGET_ARCHITECTURE.md (how a definition runs), MODULAR_DESIGN.md (which module a file goes in), and CANONICAL_MODEL.md (the words). Every built-in provider is a definition, so there is a worked example for most shapes: an API key with a region (
minimax.json), a CLI's login file renewed by OAuth (grok.json) or by the CLI itself (gemini.json), a TUI (kimi.json), a browser session over several requests (alibaba.json), an app's local server (antigravity.json), cloud metrics priced into money (bedrock.json). Their tests are inModules/Providers/Tests/.
The docs are the source of truth (AGENTS.md). A provider that fits the definition language needs no design change. One that needs the language to grow — a new case and worker, a new capability (CANONICAL §2.1), a new setting kind — is a design change: write it into TARGET_ARCHITECTURE / CANONICAL_MODEL first and ask the user to confirm before writing code.
The pieces
| Piece | Where | You touch it when |
|---|---|---|
<id>.json | Modules/Providers/Resources/Providers/ | always |
<id>-*.js mapping script | beside the JSON | only when no mapping rule can read the format (a TUI screen) |
| golden tests | Modules/Providers/Tests/<Name>DefinitionTests.swift | always |
| a generic rule or worker | Modules/DataSources/ (+ DataSourcesTests) | when the definition language can't say what the provider needs |
| look (name, symbol, colour, icon) | profile.look in <id>.json; the icon image in the asset catalog | always |
| research | docs/providers/<id>/README.md (users), design.md (contributors) | always |
The rules (MODULAR_DESIGN §3–4):
- No vendor's name in a module's Swift. A worker is named for its protocol, format or place (
JSONRPCFetcher,OAuth2Refresher), never a vendor. - No
Probenames. The words are DataSource, Fetch, Mapping, Usage, Quota, Plan and Cost. Modules/*never import the App. The usage model isQuotas; providers, settings and accounts areProviders.
The definition: three closed sums per data source
{
"profile": { // WHO IT IS
"id": "acme", // stable forever: settings and the menu bar key on it
"name": "Acme",
"links": { "dashboard": "https://…", "status": "https://…" },
"look": { "symbol": "bolt.fill", "icon": "AcmeIcon", // SF Symbol, asset name
"color": { "light": [0.2, 0.5, 0.9], "dark": [0.3, 0.6, 1.0] },
"gradientEnd": { "light": [0.1, 0.3, 0.7], "dark": [0.2, 0.4, 0.8] } }
},
"cli": "acme", // optional
"enabledByDefault": true,
"order": 280, // its default place in the lineup; none → after the rest, by name
"guestPasses": { "plans": ["claudeMax"] }, // optional: a capability the engine runs (Claude's), for the plans named
"defaultDataSource": "api",
"dataSources": [
{
"kind": "api", // what Settings' Data source picker saves as <id>.probeMode
"label": "API", "summary": "Calls Acme API directly",
"credential": { … }, // CredentialLookup — where the key is
"fetch": { … }, // Fetch — how to ask
"mapping": { … }, // Mapping — how to read the answer
"fallback": "cli" // optional: try this kind when this one fails
}
]
}
| Sum | Cases |
|---|---|
credential | environment ("loginShell": true also asks the person's login shell) · browserStorage (a site's local storage, one browser profile) · setting (a key pasted into ClaudeBar, in the Keychain) · jsonFile (paths $.a.b, or a list — the first that answers; ~ and ${VAR:-default}; record, defaults) · keychain (account, encoding: "goKeyringBase64") · browserCookies (format: "value"|"header") · sqlite · firstOf — any of them refined with match (a value must fit a pattern, or no key), with (values added) and cookies (named cookies read out of a Cookie header); plus "refresh": { "oauth2": … } or "refresh": { "cli": … } (the CLI renews its own file) |
fetch | http ({{token}}, {{x#host}}, {{x#jwt.claim}}, {{system.timeZone}}) or "http": { "steps": [ … ] } (keep, optional, unless, attempts, dropEmpty) · jsonRpc · cli — a terminal, for a TUI (input, inputDelay, autoResponses, readyWhen, screen: "rendered"; Mac, Linux and Windows) · command — pipes, exit code reported (Mac and Windows, like jsonRpc and script) · file · directory · sqlite (rows of an app's own database, read-only) · localServer (an app's server on 127.0.0.1, found through its process, on every platform; a test hands the stubbed make its running: programs) · cloudWatch (cloud metrics through a port, priced from a PriceCatalog) |
mapping | json (below) · text (error phrases, then label + regex for % left/used) · script (a .js file in QuickJS, no I/O, no Intl; host humanDate(), jsonDecimal(), decimalCents(), decimalAdd(), decimalMultiply(); Date's local time is the person's zone on every platform; context.values from "values"; returns quotas (with group), notes, plan, cost (with lines), account, or error) |
Per data source, also: errors (http.<status>, http.default,
cli.missing, cli.nonzero, cli.failed → a reason; a 429 is always a rate
limit), fallbackOn (hand-off by failure tag), fallback, cache.ttl (also
the background-refresh floor), context (other JSON files the mapping may read),
recover.patchJSONFile, requiresFiles, verifyBeforeBackground. Per
provider: links.dashboardByPlan and accounts (below). Who is signed in is
never written per data source: it is accounts.folder.signedInAs, said once.
Settings and added accounts
"settings": [
{ "id": "apiKey", "label": "API Key", "kind": "secret", "scope": "account", "for": ["api"] },
{ "id": "region", "label": "Region", "scope": "account", "default": "china",
"kind": { "choice": [ { "id": "china", "label": "China", "host": "api.acme.cn" },
{ "id": "intl", "label": "International", "host": "api.acme.com" } ] } },
{ "id": "home", "label": "Signed-in Folder", "scope": "account", "for": ["cli"], "kind": { "path": { "mustExist": true } } },
{ "id": "authEnvVar", "label": "Environment variable", "default": "ACME_API_KEY" }
]
- A kind owns its rule:
secret(to the Keychain, fills nothing),choice(its options carry values),path(mustExist),text(pattern). {{setting.region.host}}fills any string of the definition; a blank setting leaves its template unfilled (a script'svaluesdrop it).scope: "account"is what Add Account asks for;"for": [kind]asks only while that data source is active, and a login without such a value runs only the sources that don't need it.
Added accounts: what an account's sign-in reaches
An account shows only what its own sign-in reaches (multi-account design). The default account is signed in on this Mac. An added account is signed in through what the person gave it: a key, a folder, or both. Write every read once, for any account:
- A read that names the account is each account's own:
{{account.<id>}}(a folder setting,{{account.folder}}) or a{ "setting": … }lookup. - Any other read (an environment variable, a fixed path or Keychain name,
browser cookies, an app's own database, a log at a fixed place) is this
Mac's: the default account makes it, and an added account leaves it out by
itself. There is no
accounts.patch; forgetting a read can't leak. - A folder an account was given, and a read uses, must still be there, or that account is not signed in.
| The vendor keeps a login… | You write |
|---|---|
| as a key the person can paste (API key, session token, cookie) | an account-scope secret setting, and { "setting": "<id>" } somewhere in the lookup chain (append it; keep the default account's order). No accounts block |
| in a folder the person names on the form | an account-scope path setting with the vendor's default folder ("default": "~/.grok"), reads under {{account.<id>}}; accounts.cli only if a CLI must be pointed at it |
| in a folder ClaudeBar checks (Choose Signed-in Folder, Sign in with browser) | accounts.folder and accounts.signIn, reads under {{account.folder}}, and accounts.cli |
| as a key the CLI takes | two data sources: one with the account's key handed to the CLI ({{token}} in its environment), |
Content truncated.
When not to use it
- →When not following the established TDD architecture
Limitations
- →Requires adherence to specific repository patterns
- →Requires manual creation of icon assets
How it compares
It enforces a strict TDD workflow and architectural pattern, ensuring new providers are testable and consistent with existing ones.
Compared to similar skills
add-provider side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| add-provider (this skill) | 1 | 8mo | No flags | Advanced |
| implement-feature | 1 | 10mo | Review | Advanced |
| new-api-support | 1 | 9mo | Review | Intermediate |
| api-test-generator | 1 | 1y | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by tddworks
View all by tddworks →You might also like
implement-feature
tddworks
Guide for implementing features in ClaudeBar following architecture-first design, TDD, rich domain models, and Swift 6.2 patterns. Use this skill when: (1) Adding new functionality to the app (2) Creating domain models that follow user's mental model (3) Building SwiftUI views that consume domain models directly (4) User asks "how do I implement X" or "add feature Y" (5) Implementing any feature that spans Domain, Infrastructure, and App layers
new-api-support
nalexn
Add introspection support for a SwiftUI API (view type, modifier, or View extension function). Use when the user wants to add support for a new SwiftUI entity to ViewInspector.
api-test-generator
mikopbx
Генерация полных Python pytest тестов для REST API эндпоинтов с валидацией схемы. Использовать при создании тестов для новых эндпоинтов, добавлении покрытия для CRUD операций или валидации соответствия API с OpenAPI схемами.
ios-simulator-skill
conorluddy
21 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for AI agents with minimal token output.
build-iphone-apps
glittercowboy
Build professional native iPhone apps in Swift with SwiftUI and UIKit. Full lifecycle - build, debug, test, optimize, ship. CLI-only, no Xcode. Targets iOS 26 with iOS 18 compatibility.
xcodebuildmcp
cameroncooke
Official skill for XcodeBuildMCP. Use when doing iOS/macOS/watchOS/tvOS/visionOS work (build, test, run, debug, log, UI automation).