add-provider
Skill76 starsChanged 8 months agoMITView on GitHub
Add a new AI tool (provider) to OpenTokenUsage, or move an existing provider to a new API, touching every place a provider lives (plugin, manifest, tests, error strings, 11 locales, log redaction, Rust tables, docs, README, site). Use for "add X support", a provider request issue, or a provider whose endpoint changed (e.g. a 405 or a wrong number).
23 other projects use a version of this.
Adopted by
Most recently taken up by
- Akurganow/model-routertheir own version, first seen Nov 29, 2026
- asafofer/perchtheir own version, first seen Nov 29, 2026
- allswebtech/trouteaitheir own version, first seen Nov 29, 2026
- bolna-ai/skillstheir own version, first seen Nov 22, 2026
- ThinkInAIXYZ/deepchattheir own version, first seen Nov 21, 2026
- tddworks/ClaudeBartheir own version, first seen Nov 20, 2026
Used with
Projects with it also use add-migration, add-tool and 3 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.
PipelexSkilladd-migration
Write a migration ledger entry for a configuration schema change in pipelex, so that a user's existing file can be repaired instead of thrown away. Use when `make check-migration-schemas` (alias `cmig`) or `make check-ledger` (alias `cl`) refuses a change, when the user says "add a migration", "write the ledger entry", "the coverage gate is failing", "bump the schema version", "migration entry", "the migration gate won't let me", "account for this schema change", or after any edit to a configuration model that removed a key, renamed one, moved one, retired an enum member, or tightened what a value may be. This is the only skill that writes a ledger.
Also in 3 projects that use this
MicrosoftSkilladd-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 AzureSkillrelease-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
Microsoft AzureSkillverify
End-to-end app testing pipeline for browser-based web apps on cloud browsers via Azure Playwright Workspaces: verify the live app, author tests for working flows, heal failing tests, then re-run with video and produce one consolidated report. Three phases (app verification, test authoring, test healing) plus a scoped final sanity run; each phase emits a sub-report. Use when asked to "verify my app", "make sure my app works and has good test coverage", "do a full QA pass", "add tests where I'm missing coverage", "fix failing tests and add new ones", "smoke test before deploy", "QA my deployment", or any combined verify-and-test ask. Requires Azure CLI (`az login`) and a Playwright Workspace resource ID — bootstraps configs on first invocation. Browser-based web apps with Playwright only — not for unit/API tests, native mobile/desktop, load/perf, or full accessibility audits.
Also in 3 projects that use this
SentrySkillcommit
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
Other versions23 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 23
- ThinkInAIXYZ/deepchat★ 6.4ksame name
- tddworks/ClaudeBar★ 1.6ksame name
- pydantic/genai-prices★ 421same name
- Porabuild/Poracode★ 125same name
- SDSLeon/lightcode★ 125same name
- asafofer/perch★ 39same name
- allswebtech/trouteai★ 36same name
- agent-cli-framework/aclif★ 20same name
- hyhmrright/StockAI★ 14same name
- VincentShipsIt/meterbar.dev★ 11same name
13 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- release-tagSkill
- tauri-developmentSkill
- tauri-v2Skill
- carry-over-fork-prSkill
- close-resolved-issuesSkill
- releaseSkill
- run-opentokenusageSkill
- tauri-developmentSkill
- tauri-v2Skill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 20 edited versions we read keep these.
1
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
- Very specific: line 15
Look for it in reference projects: CodexBar (docs/<x>.md), ai-usagebar, quota-axi, and upstream's Swift provider (git show …
- Distinctive: line 21
When probing live yourself, log host, status and key names only, never bodies or headers.
- Very specific: line 33
Nothing set up: must throw a message isNotSetUpError (src/lib/plugin-errors.ts) knows, without any request (plugins/not-set-up.test.js).
“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.
Files
Add or update a provider
A provider is a plugin in plugins/<id>/ plus a few tables around it. A missed table rarely fails a test:
it shows up as a blank card, a log that leaks an email, or a "Sign in" button that does nothing. Work through
every step below and tick off the ones that don't apply. Model on a recent one: plugins/muse/ (PR #92) or
plugins/factory/ (PR #110).
0. Learn the API without guessing
- Look for it in reference projects: CodexBar (
docs/<x>.md), ai-usagebar, quota-axi, and upstream's Swift provider (git show upstream/main:Sources/OpenUsage/Providers/<X>/, CLAUDE.md "What this is"). - Without a way to test, ask the reporter on the issue for: where the login lives (path and key names only), the request (host, path, method), and the response shape with values removed. Never ask for or accept tokens, keys or full responses. If calling the endpoint writes anything (mints a key, refreshes a token), stop and raise it with the owner first.
- When probing live yourself, log host, status and key names only, never bodies or headers.
1. The plugin
| File | What |
plugins/<id>/plugin.json | schemaVersion: 1, id, name, version: "0.0.1", entry, icon, brandColor, links (dashboard), lines. Every label the card can show is declared with scope: "overview" (and primaryOrder), or that account gets a blank card. Weekly windows get "period": "weekly". A CLI that also runs in WSL gets "wsl": { "login": [<login paths>] }. |
plugins/<id>/icon.svg | The brand mark in one color: fill="currentColor" (the app tints it). |
plugins/<id>/plugin.js | IIFE ending in globalThis.__openusage_plugin = { id, probe } (plus accountKey from local files when it has WSL). A fresh QuickJS runtime per probe: nothing survives in module variables; keep state under ctx.app.pluginDataDir. Don't re-implement 429 backoff or timeouts (the host does). |
plugins/<id>/plugin.test.js | makeCtx from ../test-helpers.js, loadPlugin via globalThis.__openusage_plugin. Cover: not set up, rejected login, each line, missing fields, any date or period math (month ends, leap years). |
Rules the shared tests enforce:
- Nothing set up must throw a message
isNotSetUpError(src/lib/plugin-errors.ts) knows, without any request (plugins/not-set-up.test.js); otherwise first-start detection turns the card on for everyone. - A rejected login throws "Session expired …", never a not-set-up message.
- A probe with side effects (writes, key minting): add the id to
MANUAL_ONLYinsrc/hooks/app/use-provider-detection.tsso first-start detection skips it and only the user turns it on. That is all it does: once on, Smart refresh probes it every few minutes, so the plugin itself must limit its calls (keep the last answer inpluginDataDirand return it until the next call is due, asplugins/muse/does) plus a floor insmartFloorMinutes(src/lib/smart-refresh.ts). A tight rate budget gets the same.
2. Text and translations
- Error strings: reuse the shapes in
src/lib/plugin-errors.ts("Not logged in. Runx loginto authenticate.", "Session expired. …", "Rate limited by X, retry in ~10m") so they get translated. Add each string toFIXTURESinsrc/lib/plugin-errors.test.ts. A new shape needs a pattern inPLUGIN_ERROR_PATTERNS(src/lib/plugin-errors.ts), a key in all 11src/locales/plugin-errors/*.ts, and, when it means "nothing set up" or "sign in", its key inNOT_SET_UPorACTION_NEEDEDin the same file (otherwise first start turns the card on, or a signed-out card shows red instead of grey). - Line labels: reuse existing
label.*keys insrc/locales/en.ts(Session, Weekly, Monthly, Credits …). A new label needslabel.<Label>in all 11src/locales/*.ts, thenbun run locales:lockto refreshsrc/locales/en.lock.json, only after all 11 are translated.
3. Rust tables (only those that apply)
src-tauri/src/plugin_engine/host_api.rsredact_body: every identity field the new endpoint returns (email, name, ids, card, checkout links) goes into the list, with a test next to the others.src-tauri/src/setup_actions.rsALLOWED_COMMANDS: the exact login command the error text tells users to run (bump the array length).src-tauri/src/foreground.rs:APPS(desktop exe),CLIS(CLI exe) orMARKERS(a node/bun CLI) so "Follow the active app" and "Only while an AI tool runs" know it.src-tauri/src/tokscale.rsCLIENTS: only if tokscale's pinned version lists that client id (an unknown id fails the whole run). When that id differs from the plugin id, map it inLOCAL_CARDS(src/lib/spend.ts), asdroid → factory, or its spend is set against the wrong card.
4. Docs and listings
docs/providers/<id>.md: Overview, Endpoints (headers, response asjsonc), Lines table, Authentication (where the login lives, refresh), WSL. Note it is reverse-engineered when it is.README.md: a line in "Supported Providers" (- [**Name**](docs/providers/<id>.md) / what it shows) and the count in the header ("Copilot and N more AI coding tools").CLAUDE.md: only a fact that is easy to get wrong (a manual-only probe, a rate floor).- Site (
../opentokenusage.github.io, ships after the release that carries the provider): the list, every count (N more,N other AI,Works with N providers, the same in meta tags, JSON-LD and the visible FAQ), the provider list inllms.txt,assets/providers/<id>.svg(copy of the icon) with a.p-<id>color class insite.css(and a light-theme override when the brand color is dark), then bumpsite.css?v=in bothindex.htmland404.html.
5. Verify
bunx tsc --noEmit; bun run test
cd src-tauri; cargo check; cargo test --lib # whenever Rust changedWith the account on this PC, the run-opentokenusage skill can try the build, but tell the owner first:
launch restarts the app they may be using. Read the result with driver.ps1 usage, not ss (it copies screen
pixels and has caught other windows); ask the owner for a screenshot instead. Without the account, say plainly
that it is untested against the real service and ask the reporter to try the next build. A reviewer subagent
reads the diff before the push.
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
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.

