ui-api-decoupling
Skill12k starsChanged yesterdayMITView on GitHub
Use when creating or modifying OpenChamber shared UI data access, OpenCode SDK calls, `RuntimeAPIs`, runtime fetch/auth/URLs, authenticated browser assets, bridges/proxies, runtime switching, or server API routes.
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
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
- Distinctive: line 14
Treat runtime adapters as the imperative shell: they own transport, auth, serialization, and platform mechanics.
- Distinctive: line 29
Before writing code that changes what a user can reach or do, write the surface list: every runtime this behavior exists on, and one line …
- Distinctive: line 52
Resolve runtime state at call time: Do not cache runtime base URLs, resolver output, credentials, or SDK clients across endpoint switches.
- Distinctive: line 54
Never put long-lived client credentials in URLs: Do not manually append URL tokens.
- Distinctive: line 57
Parse at the boundary: Treat external, persisted, bridge, IPC, and network payloads as unknown until a schema, parser, or narrow …
- Very specific: line 58
Model the real contract: Prefer precise result/state unions and required dependencies over loose strings, boolean combinations, optional …
- Very specific: line 72
Do not immediately fetch a URL produced by getRuntimeUrlResolver().
- Distinctive: line 93
Every applicable runtime has implementation or explicit unsupported behavior, and the surface list written before editing has a line for …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
UI API Decoupling
Core Boundary
- Official OpenCode API calls use
@opencode/client(OpenCode 2.x,/api/*routes) throughopencodeClient; onlypackages/ui/src/lib/opencode/sees wire types, everything else uses the domain model inlib/opencode/model.ts. - OpenChamber-owned HTTP capabilities use
RuntimeAPIswhere runtime-specific behavior exists, otherwise explicit OpenChamber routes throughruntimeFetch. - Browser/realtime consumers use shared runtime URL/socket helpers.
- Shared UI never hardcodes localhost, ports, API origins, credentials, or one runtime's transport assumptions.
- Treat runtime adapters as the imperative shell: they own transport, auth, serialization, and platform mechanics. Shared feature code receives trusted contracts and owns domain decisions.
Classify First
| Need | Correct path |
| Official OpenCode endpoint | opencodeClient or its SDK client |
| SDK gap for official OpenCode | Narrow documented wrapper in opencodeClient preserving request fidelity |
| OpenChamber HTTP route | runtimeFetch('/api/...') |
| Runtime-owned capability | Extend RuntimeAPIs and implement each applicable runtime |
| Browser-owned authenticated URL | Runtime URL resolver and scoped URL auth |
| SSE/WebSocket | Owning realtime transport; also load relay-transport |
Name The Surfaces Before Editing
Before writing code that changes what a user can reach or do, write the surface list: every runtime this behavior exists on, and one line per runtime saying what happens there. Runtimes are web, Electron desktop, VS Code, hosted mobile, and Capacitor mobile.
The step is done when no runtime is missing a line. "Not applicable" is a line; silence is not. A stable unsupported response is a valid outcome, an accidental fallthrough is not.
Carry the list into the pull request Affected surfaces table. A runtime you cannot answer for goes in the list as unknown.
This applies to any user-reachable behavior, not only shared UI data access. A sequence that spans native shell, server, and renderer has surfaces too; so does a capability that only one runtime implements today.
Load References By Task
| Task | Required reference |
| Iframes, downloads, raw images, object URLs, URL tokens | references/browser-assets-and-auth.md |
| Adding runtime capabilities, VS Code behavior, Electron privilege/security, unsupported runtime behavior | references/runtime-parity.md |
| Locating implementations, route registration, runtime switching, or focused tests | references/implementation-map.md |
Load every matching reference before editing.
Rules
- Call official OpenCode APIs through the SDK, preserving its method, body, headers, query, auth, and abort signal.
- Keep OpenChamber routes explicit. Register them before the generic OpenCode proxy.
- Use runtime APIs for runtime-owned capabilities. Components consume hooks/providers, not runtime globals.
- Resolve runtime state at call time. Do not cache runtime base URLs, resolver output, credentials, or SDK clients across endpoint switches.
- Let transport own auth. HTTP uses runtime bearer handling; browser/realtime URLs use scoped short-lived URL auth where headers are impossible.
- Never put long-lived client credentials in URLs. Do not manually append URL tokens.
- Authoritative fetches signal failure. Adapters return a distinct failure result (
sync-state-invariants, Failure Is Not Empty). - Keep privileges at the native/runtime boundary. UI visibility and prompts are not authorization.
- Parse at the boundary. Treat external, persisted, bridge, IPC, and network payloads as unknown until a schema, parser, or narrow constructor produces the trusted type consumed by shared code. Do not validate fields and then continue passing the raw payload.
- Model the real contract. Prefer precise result/state unions and required dependencies over loose strings, boolean combinations, optional callback bags,
any, or repeated casts. Make unsupported runtime behavior and failure distinct from valid empty success. - Keep adapters deep and bridges thin. Hide meaningful protocol or platform mechanics behind an intention-revealing runtime operation; do not add pass-through layers that only rename SDK, fetch, or bridge calls.
- Scope every OpenCode read to the directory being worked in. Each such read starts that location with all its MCP servers, so one read per known project is a fan-out (
opencode-v2, Every directory-scoped read starts a location).
HTTP Decision Rules
Pass route paths directly to runtimeFetch:
await runtimeFetch('/health');
await runtimeFetch('/api/config/settings');
await runtimeFetch('/api/fs/raw', { query: { path } });Do not immediately fetch a URL produced by getRuntimeUrlResolver(). Use the resolver only when the browser/realtime API itself consumes the URL:
const imageSrc = getRuntimeUrlResolver().authenticatedAsset('/api/fs/raw?path=diagram.png');
const eventUrl = getRuntimeUrlResolver().sse('/api/event');Plain fetch is reserved for intentional external origins that are not the active OpenChamber/OpenCode runtime.
Runtime Switch Safety
Review runtime base URL, auth, SDK clients, terminal/realtime transports, stores, session memory, and caches. Key caches by runtime identity where IDs, paths, or URLs can collide. Reset or reconnect affected state through the established runtime-switch flow.
Re-parse values obtained after a switch at their owning boundary. A type established for one runtime response does not make cached raw data from another runtime trustworthy.
Verification
- Official calls use SDK paths or documented SDK-gap wrappers.
- OpenChamber routes win before generic proxy fallback.
- Request fidelity, auth, abort, query, and body behavior are tested.
- Browser/realtime auth uses narrow allowlists and scoped tokens.
- Every applicable runtime has implementation or explicit unsupported behavior, and the surface list written before editing has a line for each.
- Runtime switching cannot reuse stale endpoint/auth/cache state.
- Privileged Electron/extension behavior is enforced outside the renderer.
- Focused transport, bridge, proxy, auth, and runtime tests pass.
Trending
More talk lately.about the whole repository
Who's talking about openchamber/openchamber
- HQ NET“OpenCode’u Yeniden Denedim… Bi Daha CLI Kullanmam”YouTube · Oct 9, 2026 · 41k views
- Gianni Chiarello“New Plugin Features + AI Assistant in Reaper (MCP Server Explained)”YouTube · Oct 28, 2026 · 2.4k views
- BACKFIRED X“OpenChamber: Compare Five Agent Runs And Review Them Anywhere”YouTube · Aug 10, 2026 · 777 views
- Dũng“OpenChamber + VPS: Biến Điện Thoại Thành Công Cụ Dev Fix Lỗi Siêu Nhanh”YouTube · Mar 26, 2026 · 393 views
- さつきのOSS研究室“外出先からAIの作業を監督してマージまで|openchamber 入門【AIエージェント開発者向け】”YouTube · Aug 10, 2026 · 93 views
The biggest 5 of 61 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 61
Talked about on GitHub, YouTube, Bluesky, the web and Hacker News (61 times).
On GitHub · 47
- Apr 10, 2026[Feature Request] Support browser — minghinmatthewlam/pi-gui3 reactions · 1 comment
- Sep 24, 2026[Bug]: Cannont connect to OpenCode v2 server — looptroop-ai/LoopTroop1 reaction · 1 comment
- Oct 28, 2026Bump the dev-dependencies group across 1 directory with 2 updates — pedrohendp/openchamber-claude-account-switcher0 reactions
- Oct 27, 2026build(deps-dev): bump @openchamber/sdk from 2.3.2 to 2.5.1 in /extensions/reeve — BD7PIL/reeve0 reactions
- Oct 23, 2026chore(deps)(deps): bump the minor-and-patch group across 1 directory with 3 updates — BD7PIL/ocrc0 reactions · 2 comments
42 more on GitHub
- Oct 23, 2026chore(deps)(deps): bump the minor-and-patch group across 1 directory with 3 updates — BD7PIL/ocrc0 reactions · 1 comment
- Oct 23, 2026[Feature]: make this more openchamber-compatible. — alvinunreal/oh-my-opencode-slim0 reactions · 1 comment
- Oct 21, 2026feat: integrate OpenChamber with sandboxed OpenCode — inoio/agents-sandbox0 reactions
- Oct 21, 2026Bump @openchamber/sdk from 2.3.1 to 2.4.0 in the dev-dependencies group — pedrohendp/openchamber-claude-account-switcher0 reactions · 1 comment
- Oct 20, 2026Feat/ulw finish — dang232/Alcode0 reactions · 2 comments
- Oct 20, 2026build(deps-dev): bump @openchamber/sdk from 2.3.2 to 2.4.0 in /extensions/reeve — BD7PIL/reeve0 reactions · 1 comment
- Oct 19, 2026🚀 Feature Request: Support AI-powered labs with OpenCode and OpenChamber — yodamad/easylab0 reactions
- Oct 19, 2026[Icon request] OpenChamber — PapirusDevelopmentTeam/papirus-icon-theme0 reactions
- Oct 18, 2026Windows: shell runs PowerShell 5.1 with a Store-installed pwsh 7, and a Store update strands the cached path — anomalyco/opencode0 reactions · 4 comments
- Oct 17, 2026deps(canvas): bump @openchamber/sdk from 2.2.0 to 2.3.2 in /extensions/canvas — miloszkolber/oc_build0 reactions
- Oct 15, 2026Add OpenChamber HTTP fingerprint rule — hexbay/finger-rules0 reactions
- Oct 13, 2026[Request]: openchamber — ScoopInstaller/Extras0 reactions
- Oct 12, 2026v2: non-Git file search drops existing files after refreshing its capped index — anomalyco/opencode0 reactions · 2 comments
- Oct 12, 2026[Candidate] openchamber/openchamber/.agents/skills/writing-for-agents - writing-for-agents — ProSkillsMD/proskills0 reactions · 1 comment
- Oct 8, 2026docs: add OpenChamber Cell insight note — Giorno-Giovanna-Dio/AI-Agent-Products-Reviewed0 reactions
- Oct 7, 2026docs(alwork-ide): add Alcore integration map — dang232/Alcode0 reactions · 1 comment
- Oct 5, 2026Proof compatiblity with openchamber 2.x — steffenmaechtel/opencode-permissions-kit0 reactions · 1 comment
- Oct 4, 2026Add grand-tour, an onboarding-style tour of a codebase — rubicon/ai-skills0 reactions · 1 comment
- Oct 4, 2026Add second-look, an intent-first review by a fresh agent — rubicon/ai-skills0 reactions · 1 comment
- Oct 4, 2026Add goalpost, a skill that writes /goal conditions that are checkable and can finish — rubicon/ai-skills0 reactions · 1 comment
- Oct 4, 2026Add showdown, a skill that compares approaches head to head and recommends one — rubicon/ai-skills0 reactions · 1 comment
- Oct 4, 2026Add catch-up to pitstop, a short where-was-I summary of the current branch — rubicon/ai-skills0 reactions · 1 comment
- Oct 1, 2026feat: embed OpenCode 2.0.21 with persistent conversations — newsky123/openchamber0 reactions
- Sep 30, 2026[feat] 希望支持 OpenChamber:它的 opencode 是自带的,magpie 目前还认不到 — yetone/magpie0 reactions · 3 comments
- Sep 27, 2026Add OpenChamber — AppImage/appimage.github.io0 reactions · 1 comment
- Sep 24, 2026IDK — NoxLoveYa/opencode-gui0 reactions
- Sep 20, 2026Terminalintegration verbessern: gemeinsame PTY-Session ud saubere VT-Rendering — martin-stromberg/Softwareschmiede0 reactions
- Sep 19, 2026[New]: OpenChamber — privacyguides/verified-apps0 reactions · 1 comment
- Sep 7, 2026fix: keep active tool messages unfinished — alvins82/omp-openchamber-server0 reactions
- Sep 6, 2026OpenChamber OPENCHAMBER_CHATS_DIR is merged and released — steffenmaechtel/opencode-permissions-kit0 reactions
- Aug 27, 2026Avaliar estabilidade do OpenCode v2, gaps vs v1 e compatibilidade dual (subagentes assíncronos) — verseles/codewalk0 reactions
- Aug 21, 2026OpenChamber - Incorrect context usage — rashidrazak/opencode-cmd-provider0 reactions · 2 comments
- Aug 18, 2026List a custom source's extension, and keep a detail page after uninstall — blamspotdev/j-code-android0 reactions
- Aug 16, 2026feat(sync): topic-isolated notifiers and PiChamber protocol hard rename — RyderAsKing/PiChamber0 reactions · 1 comment
- Aug 15, 2026fix(config): stop wiping opencode.jsonc with partial JSONC parses (#2923) — sdziupin/openchamber0 reactions
- Aug 7, 2026Add CVE-2026-53976: OpenChamber <1.13.0 unauthenticated arbitrary file read — projectdiscovery/nuclei-templates0 reactions
- Aug 7, 2026[Argus] CVE-2026-53976: OpenChamber 1.11.7 Path Traversal File Read via allowOutsideWorkspace Parameter — LEEKIYOON-SEC/Argus-DEV0 reactions
- Aug 7, 2026[Argus] CVE-2026-53975: OpenChamber 1.11.7 Unauthenticated RCE via /api/fs/exec — LEEKIYOON-SEC/Argus-DEV0 reactions
- Jul 25, 2026[Bug] UI Automation activity during Chromium/Electron resize can cause prolonged input stalls — rsaz/keyhop0 reactions
- May 31, 2026Fix openchamber cask URL and add mux cask for Linux — impuls42/homebrew-tap0 reactions
- May 22, 2026fix: expand chat tool details — jkker/openchamber0 reactions
- May 17, 2026fix installed skills discovery and improve editor UX — jkker/openchamber0 reactions
On YouTube · 5
- Oct 9, 2026OpenCode’u Yeniden Denedim… Bi Daha CLI Kullanmam — HQ NET41k views · 57 comments
- Oct 28, 2026New Plugin Features + AI Assistant in Reaper (MCP Server Explained) — Gianni Chiarello2.4k views · 5 comments
- Aug 10, 2026OpenChamber: Compare Five Agent Runs And Review Them Anywhere — BACKFIRED X777 views · 1 comment
- Mar 26, 2026OpenChamber + VPS: Biến Điện Thoại Thành Công Cụ Dev Fix Lỗi Siêu Nhanh — Dũng - Chia Sẻ Công Nghệ 393 views · 8 comments
- Aug 10, 2026外出先からAIの作業を監督してマージまで|openchamber 入門【AIエージェント開発者向け】 — さつきのOSS研究室93 views · 1 comment
On Bluesky · 4
- Aug 29, 2026my Poster's Intuition says this ubiquitous layout is not how things will be for long. low key I think we'll soon move on to Mostly Just… — @davidcrespo.bsky.social17 likes and reposts · 3 replies
- May 10, 2026オープンソースでCLIベースなAIエージェントOpenCodeのリッチクライアント。TUI、macOSアプリ、vscode、ブラウザからアクセス可能と。ブラウザはスマートフォンからもokなPWA仕様と。 — @matsuu.bsky.social5 likes and reposts
- May 17, 2026https://github.com/openchamber/openchamber これ良いな。OpenCode Goと組み合わせて子供のゲーム作り環境に良さそう — @chezo.uno3 likes and reposts
- Sep 11, 2026memo. [openchamber/openchamber: Agentic Development Environment based on OpenCode AI agent](github.com/openchamber/...) — @mikoto2000.bsky.social1 likes and repost · 1 reply
On the web · 4
- Oct 23, 2026openchamber/openchamber v2.5.1 on GitHub — newreleases.io
- Oct 19, 2026openchamber/openchamber v2.5.0 on GitHub — newreleases.io
- Oct 4, 2026openchamber/openchamber v2.1.1 on GitHub — newreleases.io
- Sep 30, 2026openchamber/openchamber v2.1.0 on GitHub — newreleases.io
On Hacker News · 1
- Mar 26, 2026OpenChamber – Desktop and web interface for OpenCode AI agent3 points
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- btriapitsyn/openchamber★ 12k73% same
- jlu-lujing/TaskHunter★ 470% same
Wrote their own version · 0
None found.
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 repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- clack-cli-patternsSkill
- communication-styleSkill
- desktop-shellSkill
- drag-to-reorderSkill
- enterprise-boundarySkill
- isolated-space-boundarySkill
- locale-ui-patternsSkill
- openchamber-change-disciplineSkill
- openchamber-ui-guidanceSkill
- opencode-v2Skill
- performance-engineeringSkill
- pr-reviewSkill
- relay-transportSkill
- rtl-layoutSkill
- serve-simSkill
- settings-ui-patternsSkill
- sync-state-invariantsSkill
- theme-systemSkill
- triage-issuesSkill
- triage-prsSkill
- update-changelogSkill
- writing-for-agentsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

