create-plugin
Create Plugin
Build an oh-my-claude statusline plugin — from idea to working output in one pass.
Workflow
-
Clarify the plugin's purpose — ask what it should display, when to hide, and any config the user wants. See PATTERNS.md for data fields and common patterns.
-
Choose plugin type — JS plugin (default, in-process, fast) or script plugin (any language, runs as subprocess). Use JS unless the user specifies a language or the task needs external tools. See PATTERNS.md.
-
Scaffold the plugin — run
omc create <name>(oromc create <name> --script --lang=python|bash). This creates the directory structure at~/.claude/oh-my-claude/plugins/<name>/. -
Implement render logic — edit the generated
plugin.js(orpluginscript). Follow the contract in PATTERNS.md. Always use optional chaining. Always return null when data is missing. -
Set default config — add any configurable values to
meta.defaultConfig(JS) orplugin.json(script). Use concrete defaults, not empty strings. -
Test the plugin — run
omc test <name>. Verify it returns{ text, style }with mock data and returnsnullwith empty data. -
Wire it up — run
omc add <name>(with--line Nand--leftif needed). Runomc showto verify placement.