# Plugins Plugins package reusable Kimi Code CLI capabilities into installable units — they can add [Agent Skills](./skills.md), automatically load a specified Skill at session start, and declare MCP servers to provide real tool capabilities. They are ideal for sharing workflows with a team, connecting to external services, or installing extensions from the official marketplace. Kimi Code CLI applies a conservative loading strategy for plugins: installing a plugin does not execute any Python, Node.js, shell, hook, or command scripts it contains. ## Installation and Management Run `/plugins` in the TUI to open the plugin manager. It is a single panel with four tabs — **Installed** (manage what you have), **Official** (Kimi-maintained marketplace plugins), **Third-party** (marketplace plugins from other publishers), and **Custom** (install from a URL) — switched with `Tab` / `Shift-Tab`. Common keys: | Key | Action | | --- | --- | | `Tab` / `Shift-Tab` | Switch between the Installed / Official / Third-party / Custom tabs | | `Space` | Enable or disable the selected installed plugin (Installed tab) | | `D` | Remove the selected installed plugin (Installed tab) | | `M` | Manage MCP servers for the selected plugin (Installed tab) | | `R` | Reload `installed.json` and all manifests (Installed tab) | | `Enter` | Installed tab: view plugin details · Official/Third-party tab: install or update · Custom tab: install | | `Esc` | Go back or cancel | You can also use slash commands directly: | Command | Description | | --- | --- | | `/plugins` | Open the interactive plugin manager | | `/plugins list` | List installed plugins | | `/plugins install ` | Install from a local directory, zip URL, or GitHub repository URL | | `/plugins marketplace [source]` | Browse the official marketplace, or pass a custom marketplace JSON path or URL | | `/plugins info ` | View plugin details and diagnostics | | `/plugins enable ` | Enable a plugin | | `/plugins disable ` | Disable a plugin | | `/plugins remove ` | Remove a plugin (requires confirmation) | | `/plugins reload` | Reload `installed.json` and all plugin manifests | | `/plugins mcp enable ` | Enable an MCP server declared by a plugin | | `/plugins mcp disable ` | Disable an MCP server declared by a plugin | The **Official** and **Third-party** tabs list marketplace plugins by tier; the **Custom** tab installs from a URL. Marketplace catalogs load when you switch to those tabs. Each install shows a trust badge: `kimi-official` (from an official address), `curated` (from a curated address), or `third-party` (everything else). ### Installing from GitHub Use `/plugins install ` to install directly from a GitHub repository. Four URL forms are supported: - `https://github.com//`: Install the latest release; falls back to the default branch if no release exists - `https://github.com///tree/`: Install a specific branch, tag, or short commit SHA - `https://github.com///releases/tag/`: Pin to a specific tag - `https://github.com///commit/`: Pin to a specific commit Network requests only go through `github.com` redirects and `codeload.github.com` downloads; `api.github.com` is not called. ### Notes - Plugin changes apply after `/reload` or in new sessions. After installing, enabling/disabling, or removing a plugin, run `/reload` or `/new`; the current session will not update. - Local installations are copied to `$KIMI_CODE_HOME/plugins/managed//`, and the CLI always runs from this managed copy. Editing the original source directory after installation has no effect; you must reinstall. - Removing a plugin only deletes the installation record; the managed copy and original source files remain on disk. - Plugins are currently installed per-user and apply to all projects; project-level installation scope is not yet supported. ### Custom marketplace JSON Pass a custom marketplace JSON path or URL to `/plugins marketplace `, or set [`KIMI_CODE_PLUGIN_MARKETPLACE_URL`](../configuration/env-vars.md) to override the default catalog. Each entry in the `plugins` array needs an `id` and a `source` (local path, zip URL, or GitHub URL): ```json { "version": "2", "plugins": [ { "id": "my-plugin", "displayName": "My Plugin", "source": "./my-plugin" } ] } ``` ## Kimi Datasource Kimi Datasource is the official Kimi Code data plugin. It lets you query financial market data, macroeconomic indicators, corporate registration records, academic literature, and Chinese laws and regulations in natural language — no manual API calls or data account registration required. ### Installation You must first complete OAuth login with a Kimi Code account via `/login`. The plugin relies on local credentials to access data services. 1. Run `/plugins` and select **Official** 2. Find **Kimi Datasource** and press `Enter` to install 3. After installation completes, run `/reload` or `/new` to activate the plugin The current latest version is v3.2.0. The plugin does not update automatically — to upgrade to a newer version, repeat the installation steps above. ### How to use Once installed, describe your need in natural language and Kimi Code will automatically invoke the data capabilities. You can also explicitly trigger the data query skill with `/skill:kimi-datasource`. ### What you can do **Live market research**: Want to run a quantitative analysis on a stock? Pull three years of daily closing prices, MACD, and KDJ signals in a single query — no third-party data platforms needed. **Cross-country macro comparison**: Studying supply-chain shifts across China, India, and Vietnam? Get complete GDP growth, trade volume, and demographic time-series from World Bank data spanning 50+ years, all in one go. **Pre-contract risk check**: Need to vet a counterparty fast? Type the company name and instantly get business registration, equity structure, litigation disputes, and credit blacklist status — right when you need it. **Literature review acceleration**: Tracing the research arc of RLHF? Get the most-cited papers, key authors, and core findings in seconds, so your literature review outline takes shape in half the time. **On-the-spot legal lookup**: Stuck on which statute governs a residence-right contract dispute? Pinpoint the relevant Civil Code articles — full text, authority level, and validity — then pull a few comparable precedents to back them up, without digging through statute databases. ### Coverage | Category | Scope | |---|---| | Stock market data | A-shares, HK, US, and major global markets — real-time/historical prices, technical indicators, financial statements, stock screening | | Macroeconomic data | World Bank data for 189 countries, 50+ years of time series (GDP, trade, population, climate, and more) | | Corporate data | Business registration, equity chain, legal risk, and related-entity graph for mainland Chinese companies | | Academic literature | Millions of papers across physics, mathematics, CS, quantitative finance, economics — including preprints | | Legal | Chinese laws, regulations, and judicial cases — semantic/keyword search and detail lookup for statutes across all authority levels (constitution, laws, judicial interpretations, departmental rules), plus ordinary and authoritative case search | ### Billing and limitations - Data queries are billed per call and consume Kimi Code account credits - The plugin provides read-only queries; no write or trading functionality is available - Technical indicators and real-time prices are only available during active trading hours - AI-generated output is for reference only and does not constitute investment or business advice ## Plugin Manifest A plugin is a directory or zip file containing a manifest. The manifest can be placed at either of the following locations: ```text /kimi.plugin.json /.kimi-plugin/plugin.json ``` When both files exist, `kimi.plugin.json` takes precedence. Example: ```json { "name": "kimi-finance", "version": "1.0.0", "description": "Finance data and analysis workflows for Kimi Code CLI", "skills": "./skills/", "sessionStart": { "skill": "using-finance" }, "interface": { "displayName": "Kimi Finance", "shortDescription": "Market data and financial analysis workflows" } } ``` Supported fields: | Field | Description | | --- | --- | | `name` | Required; serves as the plugin id. Must match `[a-z0-9][a-z0-9_-]{0,63}` | | `version`, `description`, `keywords`, `author`, `homepage`, `license` | Display metadata | | `interface` | Fields shown in `/plugins`: `displayName`, `shortDescription`, `longDescription`, `developerName`, `websiteURL` | | `skills` | One or more `./` paths; must be within the plugin root directory. When omitted, the `SKILL.md` in the root directory is treated as a single Skill root | | `sessionStart.skill` | Loads the specified plugin Skill into the main Agent when a new or resumed session starts | | `skillInstructions` | Additional instructions appended whenever a Skill from this plugin is loaded | | `mcpServers` | MCP server declarations; enabled by default, can be disabled from `/plugins` | Unsupported runtime fields such as `tools`, `commands`, `hooks`, `apps`, `inject`, and `configFile` appear as diagnostics and are ignored. ## Skills and Session Start Plugin Skills use the same `SKILL.md` format as ordinary [Agent Skills](./skills.md). A typical directory structure: ```text my-plugin/ kimi.plugin.json skills/ using-my-plugin/ SKILL.md another-workflow/ SKILL.md ``` `sessionStart.skill` loads a plugin Skill into the main Agent at session start, making it suitable for initialization instructions, workflow rules, or mapping terminology from other tools to Kimi Code CLI. It only injects text; it does not execute code. Regardless of how a Skill is loaded (`sessionStart.skill`, `/skill:`, or automatic model invocation), `skillInstructions` appears alongside that plugin's Skill. ## MCP Servers in Plugins When a plugin needs real tool capabilities, it can declare `mcpServers` in its manifest, reusing the [MCP](./mcp.md) schema. Stdio server (local command): ```json { "mcpServers": { "finance": { "command": "uvx", "args": ["kimi-finance-mcp"] } } } ``` HTTP server (remote service): ```json { "mcpServers": { "docs": { "url": "https://example.com/mcp" } } } ``` For stdio servers, `command` can be a command on `PATH` or a path starting with `./` within the plugin root directory. `cwd` likewise must start with `./` and be within the plugin root directory; otherwise the server is ignored. Plugin MCP servers start after `/reload` or in new sessions. To enable or disable a server: ```sh /plugins mcp disable kimi-finance finance /reload /plugins mcp enable kimi-finance finance /reload ``` ## Security Model Plugins have a limited loading scope. The following operations do not occur during installation or session startup: - Command-type plugin tools, hooks, and legacy tool runtimes are not executed - All paths must remain within the plugin root directory after symbolic link resolution - MCP servers of enabled plugins start after `/reload` or in new sessions and can be disabled at any time from `/plugins` - Broken manifests or unsafe paths appear in `/plugins info ` diagnostics and do not affect other sessions