kobar-project/kobar/kobar-plugin-developer
Claude Code and agent skill by kobar-project/kobar
- community
Checking that the SKILL.md file is still in the repository.
Build, fix or review KoBar plugins (plugin API v1, KoBar 1.4.0 and later). Covers the trust model, the window globals, registering sidebar buttons, panels, settings panels and bar widgets, the rules the host enforces, a complete working example, and pointers to the full API reference, host behaviour, manifest/publishing and platform notes in references/.
Install
npx vskill@latest install kobar-project/kobar/kobar-plugin-developerSKILL.md
KoBar Plugin Developer
KoBar is a frameless, transparent, always-on-top Electron sidebar. A plugin is a manifest.json plus one JavaScript file that the host injects into the bar's renderer, where it registers buttons, panels and widgets through window.KoBarExtensions.
This guide describes plugin API v1 as shipped in KoBar 1.4.0 and later. KoBar 1.4.0 (the "remaster") changed how the host loads, places, themes, installs and updates plugins; code written from older notes often still runs but breaks in the places listed in section 6. Version notes below name the first public release that has a behaviour (1.2 and 1.3 were never released).
| File | Read it when you | |
|---|---|---|
SKILL.md (this file) | start a plugin, or need the rules and the working example | |
| `references/api.md` | call window.api, read useAppStore, use a registry member or a host DOM event | |
| `references/host-behaviour.md` | place or style a panel, store data, handle workspaces, hit a permission or security limit | |
| `references/manifest-and-publishing.md` | write the manifest, build, package, publish, update, or test locally | |
| `references/platforms.md` | target macOS as well as Windows |
1. Trust model (read first)
Plugins run with full privileges. A plugin is not sandboxed: it runs in the same renderer realm as KoBar itself, so it can read and write all of localStorage (including the app's stores and other plugins' data), call every window.api method, change the DOM and the app store, and read other workspaces' and other plugins' data. Installing a plugin means trusting its code completely. The host adds friction (confirmation dialogs, rate limits, path checks, allow-lists; see references/host-behaviour.md section 9), but it cannot prove that a call came from a real user action, so none of this is isolation. Write plugins that never touch data that is not theirs.
2. Rules the host enforces or relies on
- One classic script, bundled. The host wraps your entry file in
(() => { … })()and runs it as a blob
<script data-extension-id="<id>">. import/export statements are syntax errors there. Multi-file or JSX sources must be bundled to a single IIFE file with react / react-dom as externals mapped to window.React / window.ReactDOM.
- No Node.js.
require,fs,child_processand@electron/remotedo not exist. Host services come only through the
globals in section 3.
- Register synchronously, at the top level of your script. The registry records which plugin registered what by looking
at document.currentScript, which is only set while your script's first, synchronous run is executing. A registration made later (after await, in a timer or a promise) has no known owner; then the host cannot unload your plugin alone and reloads every plugin whenever any plugin is disabled.
- Know your own id. Read it once at the top level:
const PLUGIN_ID = document.currentScript?.dataset.extensionId ?? 'your.manifest.id';.
It is your manifest id, or dev-<id> when the plugin runs from the local playground.
- Register your settings panel under your plugin id (
registerSettingsPanel(PLUGIN_ID, …)). The host looks it up by that
id; any other key is never shown.
- Use the same id for your sidebar button and its panel. KoBar 1.4.0 to 1.4.3 mark the button active only then; later
releases also match a button and a panel registered by the same plugin, but the shared id works everywhere.
- One root element per panel, readable on dark. The host wraps v1 plugin UI in a dark colour scheme, moves your panel's
root element with the CSS translate property when the user drags it, and never restyles your content. Do not set translate on that root.
- Make interactive UI hit-testable. The window is a click-through overlay. Your panel inherits hit-testing from the bar,
but anything you portal elsewhere (for example ReactDOM.createPortal(…, document.body)) needs the pointer-events-auto no-drag-region classes.
- Clean up after yourself. Disabling or unloading a plugin removes its script and registrations, but timers,
window
listeners and window.api.on* subscriptions started outside React keep running until the window reloads, and a re-enable runs your script again next to them. Start such work inside components and stop it in the useEffect cleanup (every on* method returns an unsubscribe function), or guard it with a flag on window.
- Own your storage names. Prefix
localStoragekeys with your plugin id. Ids and keys starting withkobarorkobox
are reserved for KoBar and its official plugins.
- Expect refusals. Many
window.apicalls can be refused or limited (user confirmation, rate limit, a path the user did
not pick, an unsupported platform). Check every result and feature-check host additions with typeof window.api.x === 'function'.
3. Globals
| Global | What it is | |
|---|---|---|
window.React | The host's React 19. Use createElement and the hooks. Never bundle your own React. | |
window.ReactDOM | The host's react-dom module (createPortal, flushSync). It is not react-dom/client: there is no createRoot. | |
window.useAppStore | The host's Zustand store: call it as a hook (window.useAppStore((s) => s.edgePosition)) or use getState(), setState(), subscribe(). Fields: references/api.md section 3. | |
window.api | The IPC bridge to the main process. Full list with status: references/api.md section 1. | |
window.KoBarExtensions | The extension registry: registerSidebarButton, registerPanel, registerSettingsPanel, registerInlineWidget, getData, setData (newer hosts also setBarItemState, onBarItemChange). See references/api.md section 2. |
4. A complete plugin
manifest.json:
index.js (no build step needed; KoBar wraps it in a function, so top-level const is private to the plugin):
Where things appear:
- The button sits in the bar in the user's order (
featureOrder); itslabelis the tooltip. - The panel opens next to the bar while
activeExtensionPanelIdequals its id. The host passesonCloseand
anchorRect. anchorRect is the bar's rectangle in window coordinates, not the button's; the button's own rectangle is event.currentTarget.getBoundingClientRect(). The user can drag the panel along the bar (Alt+Arrow keys, double-click to reset); see references/host-behaviour.md section 2.
- The settings panel is reached from Settings > Plugins > Installed (the "tune" icon). The Settings window has no plugin
runtime, so your settings panel is rendered in the main window's note panel, inside a dark wrapper.
- An inline widget (
registerInlineWidget(id, { id, render })) is rendered directly in the bar instead of a button; it is
the right choice for a small toggle or status control. Give its root pointer-events-auto if it is interactive.
5. Localisation
useAppStore.getState().language is one of en, tr, de, es, fr, ja, ru, ar, hi, zh (ar is right-to-left). Ship your own strings with an English fallback, as above. store.t(key) translates host keys only; do not rely on it for your plugin's text. Re-read the language in components (the hook form re-renders on change); a button label is read once at registration.
6. What changed in KoBar 1.4.0 (check old plugins against this)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingfor-agents/kobar-plugin-developer/SKILL.md
Popularity
- Repository stars
- 68
- Repository forks
- 7
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kobar-project/kobar/kobar-plugin-developer)