agentleFS
WispAgentsWispAgents/wisp/.claude/skills/add-plugin/SKILL.md

add-plugin

Skill17 starsChanged 17 days agoMITView on GitHub

Use when adding a new feature area to wisp v2 or moving one into its own plugin: scaffolds plugins/<name>/{api,host,ui}, writes the manifest, registers it in a plugin group, and verifies it with monoflow.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 0

    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
  1. Very specific:

    Add it to the plugin groups in apps/server/src/groups.ts that should ship it.

    line 26
  2. Very specific:

    Add a CHANGELOG entry if users see it, and an ADR if it adds a new kind of thing (record-decision).

    line 29

“Common” is measured: kept by at least 6 in 10 of the 7 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add a plugin

  1. Is this a new plugin (owns a domain: tables, commands, topics) or a module (extends exactly one plugin through its extension point, e.g. a harness for wisp.runtime, a transport for wisp.channels)? Modules set "kind": "module", "extends": "<plugin>".
  2. node tools/new-plugin.ts <name> scaffolds plugins/<name>/api, host (with wisp-plugin.json) and ui.
  3. Write api/ first. Commands (id, args, result types), events, topics, row types, extension points (each with a version), and services (defineService with a permission for every method). Other plugins may import only this package. Before changing an existing api, run .agents/bin/monoflow graph impact plugins/<name>/api/src/index.ts.
  4. Manifest (host/wisp-plugin.json): permissions for every kernel service and other plugins' commands you call, activation events (avoid onStartup; justify it in review), settings with types, and contributions. npm run check validates it.
  5. Host: export default definePlugin({ id, setup(ctx) { … } }). Register everything through ctx, so it belongs to the plugin's scope. Write through store.tx. Never import another plugin's host.
  6. UI: extensions attach to shell inputs (shell.task:head, shell.composer:left, …), built from @wisp/ui only. No CSS. Strings go through t(). ui/src/index.ts registers the UI with a default export, export default definePluginUi({ id, catalogue, views, extensions, … }) from @wisp/shell (as plugins/stuff/ui/src/index.ts does); the scaffold writes one. Without it npm run check fails with "… is registered nowhere".
  7. Add it to the plugin groups in apps/server/src/groups.ts that should ship it.
  8. Tests: host/test/ with @wisp/testkit (the free tests: "deactivate leaks nothing" and "a missing permission is refused"), plus the plugin's own behaviour. Then .agents/bin/monoflow verify --affected.
  9. Add a CHANGELOG entry if users see it, and an ADR if it adds a new kind of thing (record-decision).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.