Univer Plugin Dev logo

Univer Plugin Dev

Organization
dream-num
univer-plugin-dev

Develop custom plugins for Univer sheets, docs, slides, bases, boards, and PDFs. Use when implementing a Plugin lifecycle, dependency injection, commands/mutations/operations, undo/redo, Facade extensions or custom events, toolbar/context-menu items, shortcuts, icons, popups, or when diagnosing plugin API and registration errors.

Overview

Publisherdream-num
Repositoryskills
Skill nameuniver-plugin-dev
Stars
79
Forks
7
Bundled files
7
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by dream-num on GitHub. Read the source before you install it.

Installation

Install the Univer Plugin Dev AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dream-num/skills/tree/main/skills/univer-plugin-dev
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dream-num/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/univer-plugin-dev .claude/skills/univer-plugin-dev
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Univer Plugin Dev in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Univer Plugin Dev on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Univer Plugin Dev is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Univer Plugin Development

Build plugins against the APIs exported by the target application's installed Univer packages.

Compatibility: The checked source baseline is Univer and Univer Pro 1.0.0-beta.0. Keep release-train packages such as @univerjs/core, @univerjs/sheets, @univerjs/ui, and @univerjs-pro/* on that same exact version. Independently versioned packages such as @univerjs/icons must follow the target manifest instead. If the target project differs, inspect its manifests and source exports before copying an example.

Scaffold a Sheet UI plugin

Run the bundled generator:

bash
npx tsx <skills-repo>/skills/univer-plugin-dev/scripts/scaffold-plugin.ts my-plugin --path ./packages

It creates a buildable Sheet UI plugin package. For docs, slides, bases, boards, or PDFs, first choose the product type and official core/UI plugin family in plugin-architecture.md, then adapt the generated dependencies and UniverInstanceType.

text
my-plugin/
├── src/
│   ├── commands/my-command.ts
│   ├── controllers/menu.controller.ts
│   ├── facade/f-univer.ts
│   ├── index.ts
│   └── plugin.ts
├── package.json
└── tsconfig.json

Register the plugin and explicitly load its Facade extension:

ts
import { UniverMyPlugin } from './packages/my-plugin/src';
import './packages/my-plugin/src/facade/f-univer';

univer.registerPlugin(UniverMyPlugin);

When consuming a built package, import its public subpath instead:

ts
import { UniverMyPlugin } from 'my-plugin';
import 'my-plugin/facade';

The scaffold has no stylesheet. Product/preset styles belong to the host; if the plugin adds CSS, publish a CSS entry with a CSS-aware build and require the host to import it. See ui-customization.md for the 1.0 preset/plugin-mode CSS boundary.

Core rules

Plugin lifecycle

Extend Plugin, provide a unique pluginName, choose a UniverInstanceType, and inject Injector as the protected _injector required by the base class. The 1.0 product matrix is sheets, docs, slides, bases, boards, and PDFs; do not copy the Sheet scaffold unchanged for another product.

HookUse it for
onStarting()Register DI dependencies, commands, menus, shortcuts, icons, and components. Do not read a workbook or the DOM.
onReady()Initialize logic that requires a created unit of the plugin's product type.
onRendered()Register render modules or other renderer/DOM-dependent logic.
onSteady()Start non-critical work after all plugins have rendered.

Own every disposable subscription, listener, shortcut, command, component, icon, render module, timer, and worker with disposeWithMe(). IMenuManagerService.mergeMenu() is the notable exception: it currently returns void.

Read plugin-architecture.md when adding lifecycle logic, DI services, configuration, dependencies, or controllers.

Command model

  • COMMAND orchestrates validation and business flow.
  • MUTATION deterministically changes persisted model state and is the collaboration changeset unit.
  • OPERATION changes transient UI state.

A mutation is not automatically undoable. Capture undo parameters before executing redo mutations, then push symmetric undoMutations and redoMutations through IUndoRedoService from the command.

Use executeCommand() for async execution and syncExecuteCommand() only when the full handler chain is synchronous. Both return the handler result directly; there is no .result wrapper.

Read command-system.md before changing persisted data, implementing undo/redo, invoking built-in commands, or listening to command execution.

Facade extensions

When the target Facade class explicitly exposes static extend(), subclass it, call extend(), and augment the module that owns the class. Not every public Facade class is a mixin target; check facade-extension.md first.

ts
import { FWorksheet } from '@univerjs/sheets/facade';

export interface IFWorksheetMyMixin {
    markHeader(color: string): this;
}

export class FWorksheetMyMixin extends FWorksheet implements IFWorksheetMyMixin {
    override markHeader(color: string): this {
        this.getRange(0, 0, 1, this.getMaxColumns()).setBackground(color).setFontWeight('bold');
        return this;
    }
}

FWorksheet.extend(FWorksheetMyMixin);

declare module '@univerjs/sheets/facade' {
    interface FWorksheet extends IFWorksheetMyMixin {}
}

Consumers must side-effect import the extension module. Read facade-extension.md when extending FUniver, FWorkbook, FWorksheet, FRange, FDocument, Pro product Facades such as FPresentation, or Facade events.

UI extensions

Register toolbar and context-menu items by merging a menu schema. A menu item's id (or commandId) selects the registered command. A shortcut also executes the command whose ID it carries; IShortcutItem has no custom handler.

ts
this._menuManagerService.mergeMenu({
    [RibbonOthersGroup.OTHERS]: {
        [MyCommand.id]: {
            order: 10,
            menuItemFactory: () => ({
                id: MyCommand.id,
                title: 'my-plugin.menu.run',
                type: MenuItemType.BUTTON,
            }),
        },
    },
});

Use IconManager for icons and ComponentManager for React/Vue/custom components. Keep their returned disposables. Read ui-customization.md for current menu nesting, context-menu positions, shortcuts, components, and range popups.

Events

Prefer typed Facade events through univerAPI.addEvent(). Load the owning Facade side-effect module so its event names and parameter types are installed. Filter ICommandService listeners by exported command constants when no semantic Facade event exists.

Read event-system.md for current event names, cancellation, custom events, and cleanup.

Validation

After generating or editing a plugin:

  1. Build or typecheck it against the target project's exact Univer versions.
  2. Register it in a minimal app and exercise the command, menu/shortcut, Facade side-effect import, and disposal path.
  3. Verify persisted changes round-trip and undo/redo when applicable.
  4. Run the skill validator after editing this skill:
bash
python3 ~/.codex/skills/.system/skill-creator/scripts/quick_validate.py skills/univer-plugin-dev

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Univer Plugin Dev AI skill do?

Develop custom plugins for Univer sheets, docs, slides, bases, boards, and PDFs. Use when implementing a Plugin lifecycle, dependency injection, commands/mutations/operations, undo/redo, Facade extensions or custom events, toolbar/context-menu items, shortcuts, icons, popups, or when diagnosing plugin API and registration errors.

Why use Univer Plugin Dev on TypingMind?

Because you install it once and use it with any model. Univer Plugin Dev is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Univer Plugin Dev in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dream-num/skills/tree/main/skills/univer-plugin-dev. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Univer Plugin Dev?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Univer Plugin Dev?

As many as you like. As long as a model supports skills, you can use Univer Plugin Dev with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Univer Plugin Dev AI skill free?

Yes. It is published on GitHub by dream-num under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇