How to Set Up the Plugin Marketplace and Install Skills from GitHub in Kimi Code

Kimi Code discovers plugins through a Marketplace JSON file controlled by the KIMI_CODE_PLUGIN_MARKETPLACE_URL environment variable, and you can install skills directly from GitHub repositories using the installPlugin method with a github source type.

The MoonshotAI/kimi-code platform extends its capabilities through a modular plugin system that supports both curated marketplace listings and direct installations from version control. Learning how to set up the plugin marketplace and install skills from GitHub allows you to customize your development environment with community-contributed tools and proprietary internal automations. This guide covers the architecture, configuration options, and implementation details based on the actual source code.

Understanding the Kimi Code Plugin Architecture

The Marketplace JSON Configuration

Kimi Code fetches plugin listings from a Marketplace JSON file that populates the /plugins UI endpoint. The location of this catalog is determined by the KIMI_CODE_PLUGIN_MARKETPLACE_URL environment variable, which defaults to https://code.kimi.com/kimi-code/plugins/marketplace.json as documented in docs/en/configuration/env-vars.md.

When the UI renders the Plugins pane, it organizes available plugins into three tabs:

  • Official / Third-party – Listings sourced from the marketplace JSON
  • Custom – Direct installation from arbitrary URLs, including raw GitHub archives

Plugin Source Types

According to the type schema pluginSourceSchema defined in packages/klient/src/contract/global/plugins.ts (lines 66-71), a plugin manifest declares its origin through the source field with three possible values:

  • local-path – Filesystem path for development or air-gapped environments
  • zip-url – Direct download link to a compressed archive
  • github – Reference to a GitHub repository (owner/repo format or full URL)

Configuring the Plugin Marketplace

To override the default marketplace with a custom catalog or local file for testing, export the environment variable before starting the Kimi Code server:

export KIMI_CODE_PLUGIN_MARKETPLACE_URL=file:///path/to/my-marketplace.json

The marketplace JSON structure follows the schema used in plugins/marketplace.json, containing an array of plugin manifests that appear in the Official and Third-party tabs of the Plugins UI. You can manually edit this JSON to pre-list GitHub-based plugins, allowing users to install them with a single click rather than using the Custom tab.

Installing Skills from GitHub

The platform provides two primary methods for installing skills from GitHub: through the user interface or programmatically via the Klient SDK.

Installation via the UI

To install a skill from a public GitHub repository using the interface:

  1. Open the Plugins pane (/plugins in the TUI or the corresponding web UI command)
  2. Select the Custom tab and paste the GitHub repository URL (e.g., https://github.com/example/awesome-skill)
  3. Review the trust badge (third-party) and confirm the installation prompt—this warning appears because the source differs from the official marketplace address
  4. Once loaded, invoke the plugin's commands through the Slash-Command UI using patterns like /awesome-skill run --option value

Installation via the SDK

For automation or headless environments, use the global plugins façade method installPlugin defined in packages/klient/src/core/facade/global.ts (lines 390-402). This triggers the server-side pluginService.installPlugin RPC, which clones the repository, validates the manifest against pluginSourceSchema, and registers the plugin so its commands become available under the Plugin Slash Commands section.

import { createKlient } from '@moonshot-ai/klient';

const klient = await createKlient({ serverUrl: 'http://localhost:58627' });

// Install from GitHub using the 'github' source type
await klient.global.plugins.installPlugin({
  source: 'github',
  githubUrl: 'https://github.com/example/awesome-skill', // or "owner/repo" shorthand
});

Managing Installed Plugins

After installation, the backend stores the plugin's manifest in the plugin service state and persists it across sessions. You can list active plugins and invoke their commands programmatically:

// List all installed plugins
const plugins = await klient.global.plugins.list();
console.log('Installed plugins:', plugins.map(p => p.id));

// Execute a slash command provided by the plugin
await klient.session('my-session-id').runSlashCommand({
  command: '/awesome-skill',
  args: ['run', '--debug'],
});

Summary

  • Marketplace Configuration: Set KIMI_CODE_PLUGIN_MARKETPLACE_URL to customize the plugin catalog source, defaulting to the bundled marketplace at code.kimi.com as specified in docs/en/configuration/env-vars.md.
  • Source Types: Plugins support local-path, zip-url, or github origins as defined in packages/klient/src/contract/global/plugins.ts (lines 66-71).
  • GitHub Installation: Use the Custom tab in the UI or the installPlugin method from GlobalPluginsFacade (packages/klient/src/core/facade/global.ts lines 390-402) with source: 'github' to clone and register repositories.
  • Persistence: Installed plugins remain available across sessions through the plugin service state, with commands accessible via the slash-command interface documented in docs/en/customization/plugins.md.

Frequently Asked Questions

How do I point Kimi Code to a private plugin marketplace?

Export the KIMI_CODE_PLUGIN_MARKETPLACE_URL environment variable with a URL pointing to your internal JSON catalog before starting the application. This can reference a private CDN, S3 bucket, or local file path using the file:// protocol.

What GitHub URL formats are supported for plugin installation?

The platform accepts both full HTTPS URLs (https://github.com/owner/repo) and shorthand notation (owner/repo) in the githubUrl parameter of the installPlugin method, as validated by the pluginSourceSchema in the Klient contract.

Where does Kimi Code store the plugin manifest after installation?

The server-side plugin service maintains the manifest in its internal state after validating the cloned repository. This registration persists across sessions, making slash commands available immediately upon restart without requiring reinstallation.

Can I install plugins from GitHub Enterprise or private repositories?

While the github source type primarily handles public repositories, private GitHub Enterprise instances are supported if the Kimi Code server has appropriate authentication credentials configured at the system level, enabling the underlying pluginService.installPlugin RPC to authenticate during the clone operation.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →