add-provider-mobile
Skill4 starsChanged 2 days agoMITView on GitHub
Add a new agent CLI start provider in threadbase-mobile (browse chips, health parser, badges, filters, i18n). Use when adding Cursor, Codex, Gemini, Amp, Aider, OpenCode, Goose, ClawCode, Hermes, cursor, start chips, provider badges, or when the user says add a provider. Live PTY and history indexing are other repos — see Companions. The shared workflow is `threadbase-skills:add-provider`.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-providerSkill
- expo-local-shipSkill
- integration-by-batchesSkill
- setup-cloudflaredSkill
- ship-expo-cloudSkill
- ship-fastlaneSkill
- expo-local-shipSkill
- integration-by-batches-mobileSkill
- setup-cloudflaredSkill
- ship-expo-cloudSkill
- ship-fastlaneSkill
- threadbase-designSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
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 40
Never default unknown names to Claude: Use providerLabelKey (extend its return union).
- Very specific: line 42
Send
providerfor any non-Claude: start. Do not special-case one extra name. - Distinctive: line 56
Only if live start is in scope:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add a provider (mobile)
The cross-repo workflow (wire-name convention, intake rules, iron rules, land order) lives in the shared skill threadbase-skills:add-provider. Read it first; this file holds only this repo's file-level steps and verify commands.
This repo is the phone chips half. Without it, a streamer that accepts the new provider is unused: browse will not send that name.
Scanner, streamer, and mobile each declare ProviderName. They are not linked. Use the same kebab wire name as the streamer (aider, opencode, goose, cursor, …). Product label is separate (Aider, OpenCode). cursor-cli is a legacy alias for cursor.
Companions
| Half | Repo | Skill |
| Live PTY | threadbase-streamer | .claude/skills/add-provider/SKILL.md |
| Phone chips | threadbase-mobile (this repo) | .claude/skills/add-provider-mobile/ |
| History index | threadbase-scanner | .claude/skills/add-provider/SKILL.md |
Keep companions in sync. Changing this repo's steps alongside the shared skill's intake rules, wire-name convention or land order means updating the streamer and scanner skills in the same change set. Do not leave a companion on stale steps or a moved path.
Mobile-only against an old streamer fail-opens the chip and then 501s on start. Merge the streamer PR first unless this is a badge-only name that history already returns.
Work on a sibling worktree from origin/main (git worktree add ../tb-mobile-worktrees/<slug> -b feat/<slug> origin/main). Never nest under the repo root. After worktree add, move_agent_to_root. No node_modules in a fresh worktree: symlink from the main checkout when lockfiles match, else npm ci.
0. Vendor intake
| Ask | This repo |
Streamer already has the wire name in PROVIDER_NAMES? | If live start is in scope, wait or land streamer first. |
| History-only (no CLI, SQLite store, editor chat)? | Still add the name to badges/filters/health if the scanner will emit it. No browse start chip until a runner exists. |
| Fourth+ start chip? | Keep the chip. Wrap the selector (flexWrap) rather than hiding providers. Do not collapse into a menu unless the user asked. |
Grep the current two-way unions, not only codex-cli. After Cursor, leftovers look like 'claude-code' \| 'codex-cli' \| 'cursor' and === 'cursor' ? … : Claude. Also accept the legacy alias cursor-cli.
Iron rules
- Never default unknown names to Claude. Use
providerLabelKey(extend its return union). Not=== 'codex-cli' ? Codex : Claude. - Parser allowlists drop unknown names.
types/provider-health.tsNAMESmust include the id or/api/providersis ignored. - Send
providerfor any non-Claude start. Do not special-case one extra name. - Do not invent terminal chrome filters until the TUI is captured.
- Semantic state;
t('sessions:provider.<label>')at the presentation boundary. NolabelKeyin data.
1. Name + label helper
constants/providers.ts: constant, PROVIDER_NAMES, isProviderName, providerLabelKey.
2. Health parser
types/provider-health.ts NAMES. Unknown names are dropped, not shown as unavailable.
3. Start path
Only if live start is in scope:
app/browse.tsx: skeletonPROVIDER_NAMES; nth chip;params.set('provider', …)for any non-Claude.app/session/new.tsx: POSTproviderwhenisProviderNameand not Claude.
A start chip for a history-only agent is a lie — omit it.
4. Chrome
Replace remaining hardcoded provider unions with ProviderName / providerLabelKey:
app/index.tsx,app/session/[id].tsx,app/conversation/[id].tsxcomponents/servers/FilterSortSheet.tsx(filter chips wrap; do not cap at three)components/sessions/shared/ConversationListItem.tsxcomponents/sessions/tree/types.ts,hooks/useConversations.ts,types/projectChat.tsservices/api-client.tsConversationBusyError—isProviderNameapp/server-health.tsxprovider:<wire-name>lib/modelEffortSupport.ts— effort is Claude-only unless the streamer emitseffortfor this CLI
constants/theme.ts brand.<key>: distinct from Claude #E8622A, Codex #7B5EA7, Cursor #3D8BFF.
Story coverage warns on modified components/**/*.tsx; skip new stories for a small badge/filter edit.
5. i18n
locales/{en,he,ar,ru}/sessions.json→provider.<label>locales/{en,he,ar,ru}/servers.json→health.checks.provider<Product>locales/.identical-ok.jsonfor product names that stay Englishnpm run i18n:bless
6. Mock + tests
e2e/mock-server.js GET /api/providers: honest capabilities (copy streamer). History-only names can be absent from that stub.
Extend browse-provider-flow, BrowseRecents, BrowseDisabledOnError, provider-health, modelEffortSupport, constants/providers.
Empty-list copy can stay unless the user wants the new product named.
7. Verify
npx tsc --noEmit
npx jest --ci --runInBand --testPathPattern 'browse-provider-flow|BrowseRecents|BrowseDisabledOnError|provider-health|modelEffortSupport|constants/providers'Out of scope here
Live PTY — streamer skill. History — scanner skill. Installing the host CLI.
Worked example: cursor chips in PR #1055 (shipped as cursor-cli; wire name is now cursor). History indexing is scanner + streamer (cursorRoots); this repo does not parse transcripts. List items carry isImportedFromClaude / isImportedFromCodex / isImportedFromCursor; ConversationFilter can send include and those flags on list/count.
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.

