opentabs / plugins
CLAUDE.md967 starsChanged 8 months agoMITView on GitHub
Plugins in plugins/ are fully standalone projects — exactly as if created by an external developer using npx @opentabs-dev/create-plugin. They are NOT part of the root npm workspace. Each plugin: The root tooling (npm run build, npm run lint, etc.) does NOT cover plugins. When changing platform packages that plugins depend on (shared, plugin-sdk, plugin-tools), publish new versions to npm and update plugin dependencies. All plugins must use ^x.y.z semver ranges for @opentabs-dev/* dependencies — never file: or workspace: links.…
- Installs packages
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/build-plugin/CLAUDE.mdCLAUDE.md
- .agents/skills/bump-version/CLAUDE.mdCLAUDE.md
- .agents/skills/ralph/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .claude/skills/build-plugin/CLAUDE.mdCLAUDE.md
- .claude/skills/bump-version/CLAUDE.mdCLAUDE.md
- .claude/skills/ralph/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- e2e/CLAUDE.mdCLAUDE.md
- .ralph/CLAUDE.mdCLAUDE.md
- build-pluginSkill
- bump-versionSkill
- ralphSkill
- build-pluginSkill
- bump-versionSkill
- ralphSkill
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Must build and type-check independently: cd plugins/<name> && npm run build
- Very specific: line 26
Configure
package.json: Add an opentabs field with displayName, description, and urlPatterns. - Very specific: line 32
Place an icon.svg file in the plugin root directory.
- Very specific: line 93
When configSchema has at least one required field of type 'url', urlPatterns may be an empty array — the platform derives match patterns at …
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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
Plugins Instructions
Overview
Plugins in plugins/ are fully standalone projects — exactly as if created by an external developer using npx @opentabs-dev/create-plugin. They are NOT part of the root npm workspace.
Plugin Isolation
Each plugin:
- Has its own
package.json,tsconfig.json,biome.json, and.gitignore - Depends on published
@opentabs-dev/*npm packages (notfile:orworkspace:links) - Has its own
node_modules/andpackage-lock.json - Is excluded from root
biome,knip, andtsc --build - Must build and type-check independently:
cd plugins/<name> && npm run build
The root tooling (npm run build, npm run lint, etc.) does NOT cover plugins. When changing platform packages that plugins depend on (shared, plugin-sdk, plugin-tools), publish new versions to npm and update plugin dependencies.
All plugins must use ^x.y.z semver ranges for @opentabs-dev/* dependencies — never file: or workspace: links. During version bumps, verify that no plugin package.json contains file: references. Plugins depend on published npm packages, not local filesystem paths.
Adding a New Plugin
Each plugin follows the same pattern:
- Create the plugin (
plugins/<name>/): ExtendOpenTabsPluginfrom@opentabs-dev/plugin-sdk - Configure
package.json: Add anopentabsfield withdisplayName,description, andurlPatterns; setmaintodist/adapter.iife.js - Define tools (
plugins/<name>/src/tools/): One file per tool usingdefineTool()with Zod schemas. Thehandle(params, context?)function receives an optionalToolHandlerContextas its second argument for reporting progress during long-running operations - Build:
cd plugins/<name> && npm install && npm run build(runstscthenopentabs-plugin build, which producesdist/adapter.iife.jsanddist/tools.json, auto-registers the plugin inlocalPlugins, and callsPOST /reloadto notify the MCP server)
Plugin Icons
Place an icon.svg file in the plugin root directory. The build tool auto-generates inactive, dark, and dark-inactive variants. Follow these rules:
- No explicit
width/heightattributes on<svg>. The side panel renders icons in a small container (19x19px) withoverflow: hidden. An SVG with hardcoded dimensions (e.g.,width="74" height="74") renders at that fixed size and gets clipped — the icon appears blank because the visible content is outside the tiny viewport. UseviewBoxonly — the SVG scales to fit the container automatically. - Use hardcoded colors, not
currentColor. The build tool's dark/inactive variant generator skipscurrentColor(it's a passthrough value). Usefill="black"for monochrome icons — the generator detects low contrast against the dark background (#1c1c1c) and auto-inverts to white. Plugins like GitHub and Notion use this pattern. - The
viewBoxmust be square. The build tool validates this. If the source logo has a non-square aspect ratio (e.g.,0 0 74 64), pad the viewBox to square and center the path coordinates.
Example of a correct monochrome icon:
<svg viewBox="0 0 74 74" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M37 5L74 69H0L37 5Z" fill="black"/>
</svg>For multi-color icons or when automatic dark generation produces poor results, provide an explicit icon-dark.svg alongside icon.svg.
Building Plugins
cd plugins/<name> && npm install && npm run buildopentabs-plugin build auto-registers the plugin in localPlugins (first build only) and calls POST /reload to trigger server rediscovery. In dev mode, the file watcher also detects changes to dist/tools.json and dist/adapter.iife.js.
Plugin Settings (configSchema)
Plugins can declare a configSchema to let users provide instance-specific configuration (e.g., the URL of their self-hosted instance). Declare it on the plugin class and in package.json:
// src/index.ts
import type { ConfigSchema } from '@opentabs-dev/plugin-sdk';
class MyPlugin extends OpenTabsPlugin {
configSchema: ConfigSchema = {
instanceUrl: {
type: 'url',
label: 'Instance URL',
description: 'The URL of your instance',
required: true,
},
};
}// package.json opentabs field
{
"opentabs": {
"displayName": "My Plugin",
"urlPatterns": [],
"configSchema": {
"instanceUrl": {
"type": "url",
"label": "Instance URL",
"required": true
}
}
}
}When configSchema has at least one required field of type 'url', urlPatterns may be an empty array — the platform derives match patterns at runtime from the configured URL. Read configured values in tool handlers with getConfig('instanceUrl') from @opentabs-dev/plugin-sdk.
Users configure settings via opentabs plugin configure <name> (interactive), opentabs config set setting.<plugin>.<key> <value> (scripted), or the side panel ConfigDialog.
Quality Checks
Each plugin has a check script that runs all quality checks:
cd plugins/<name>
npm run check # build + type-check + lint + format:checkFrom the repo root, you can build or check all plugins at once:
npm run build:plugins # Build all plugins (install + build each)
npm run check:plugins # Type-check + lint + format:check all pluginsDoes 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.

