Skip to content
Floating KeysDocs

Guide

Make a plugin

A plugin is one JSON file. This page shows a small one that works, then lists every field and limit so you can build your own.

A minimal plugin#

This plugin adds one prompt, one command and an accent color. Save it as my-helpers.json, then follow Add, turn off, remove to add it. It is checked by the same rules Floating Keys uses when you add it.

my-helpers.json
{
  "contract": "floatingkeys.composer-plugin.v1",
  "id": "my-helpers",
  "name": "My helpers",
  "version": 1,
  "presets": [
    {
      "id": "plain-english",
      "name": "Plain English",
      "instruction": "Rewrite the text in plain English. Keep every fact.",
      "result": "inline"
    }
  ],
  "commands": [
    {
      "id": "shorten",
      "command": "shorten",
      "name": "Shorten",
      "instruction": "Rewrite the text so it is about half as long. Keep every fact.",
      "result": "inline"
    }
  ],
  "theme": {
    "accent": "#2f6fed"
  }
}

If something is wrong, Add tells you in plain words, for example "Colors must look like #1a2b3c." or "Two things in this plugin share a name."

Fields#

Top level
FieldRequiredRules
contractYesExactly floatingkeys.composer-plugin.v1.
idYesStarts with a lowercase letter, then lowercase letters, numbers and dashes, up to 60 characters. Cannot start with fk-.
nameYesUp to 80 characters. This is what people see.
versionYesA whole number, 1 or more. Adding a different version of the same plugin is refused.
presetsNoUp to 24 prompts.
commandsNoUp to 24 commands.
themeNoOne or more of background, foreground, accent, muted, border, each written like #1a2b3c.
panelsNoUp to 8. Each has id, name and an Artifact renderer.
viewersNoUp to 24. Each has id, name, extensions and an Artifact renderer.
Inside prompts and commands
FieldRules
idSame rules as the plugin id. Unique within its list.
nameUp to 80 characters.
instructionWhat to tell the model. 1 to 8,000 characters.
resultinline (default), open-chat or review-change.
command (commands only)Lowercase letter first, then lowercase letters, numbers and dashes, up to 40 characters. Unique in the plugin. Written without the slash.
Inside panels and viewers
FieldRules
renderer{ "kind": "artifact", "artifactId": "ar_" followed by 24 lowercase hex characters, "version": a whole number }. Points at a published Artifact version that draws the panel or file.
extensions (viewers only)1 to 80 file endings without the dot, lowercase, such as log. Each starts with a letter or number, up to 20 characters.

Rules that get a plugin refused#

  • It must add at least one prompt, command, panel, viewer or theme. An empty plugin is refused.
  • Any field not in the tables above is refused. That includes extra theme fields: a theme can only set the five colors.
  • Ids must be unique within each list, and command names must be unique.
  • The file can be up to 100,000 characters and must be a single JSON object.
  • A theme whose text is hard to read on its background is accepted but not applied.

Status reflects November 2026. Planned items are design targets, not commitments to a date.