# Hello World Plugin A minimal example showing how to build a plugin for Claude Code UI. ## How plugins work A plugin's UI runs client-side inside a sandboxed iframe. The backend handles plugin lifecycle (install, update, uninstall) and serves the plugin's files as static assets. ``` ┌─────────────────────────────────────────────────┐ │ Backend (server) │ │ │ │ Lifecycle (spawns child processes): │ │ git clone / git pull Install & update │ │ npm install Dependency setup │ │ │ │ Runtime: │ │ GET /api/plugins List plugins │ │ GET /api/plugins/:name/assets/* Serve files │ │ PUT /api/plugins/:name/enable Toggle on/off │ │ DELETE /api/plugins/:name Uninstall │ └──────────────────────┬──────────────────────────┘ │ serves static files ┌──────────────────────▼──────────────────────────┐ │ Frontend (browser) │ │ │ │ Plugin iframe ◄──postMessage──► Host app │ │ (sandboxed) ccui:context │ │ ccui:request-context │ └─────────────────────────────────────────────────┘ ``` ## Plugin structure A plugin is a directory with at minimum two files: ``` my-plugin/ manifest.json # Required — plugin metadata index.html # Entry point (referenced by manifest.entry) styles.css # Optional — any static assets alongside entry app.js # Optional — JS loaded by your HTML ``` All files in the plugin directory are accessible via `/api/plugins/:name/assets/`. Use relative paths in your HTML to reference them (e.g., ``, `