> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/QwenLM/qwen-code/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to Extensions

> Learn about Qwen Code extensions and how they expand the capabilities of your AI coding assistant

# Extensions Overview

Qwen Code extensions package prompts, MCP servers, subagents, skills and custom commands into a familiar and user-friendly format. With extensions, you can expand the capabilities of Qwen Code and share those capabilities with others. They are designed to be easily installable and shareable.

## What Can Extensions Do?

Extensions allow you to customize and extend Qwen Code in several ways:

* **MCP Servers**: Add new tools that the AI can use through the Model Context Protocol
* **Custom Commands**: Create shortcuts for complex prompts with `/command` syntax
* **Skills**: Add specialized capabilities that the AI can automatically invoke when relevant
* **Subagents**: Define specialized AI assistants for specific tasks
* **Context Providers**: Supply persistent context to the model for better responses
* **Settings**: Configure API keys and other credentials securely

## Cross-Platform Compatibility

Qwen Code supports extensions from multiple ecosystems:

* **Gemini CLI Extensions** - Extensions from the [Gemini CLI Extensions Gallery](https://geminicli.com/extensions/)
* **Claude Code Marketplace** - Plugins from the [Claude Code Marketplace](https://claudemarketplaces.com/)
* **Native Qwen Extensions** - Built specifically for Qwen Code

Extensions and plugins from these platforms can be directly installed into Qwen Code. During installation, they are automatically converted to Qwen Code format:

* `gemini-extension.json` → `qwen-extension.json`
* `claude-plugin.json` → `qwen-extension.json`
* TOML command files → Markdown format
* Tool mappings and configurations are preserved

This cross-platform compatibility gives you access to a rich ecosystem without requiring extension authors to maintain separate versions.

## Extension Structure

Every extension is a directory containing a `qwen-extension.json` manifest file:

```
my-extension/
├── qwen-extension.json    # Required manifest file
├── QWEN.md               # Optional context file
├── commands/             # Optional custom commands
│   └── my-command.md
├── skills/               # Optional skills
│   └── my-skill/
│       └── SKILL.md
├── agents/               # Optional subagents
│   └── my-agent.md
└── mcp-server/          # Optional MCP server code
    └── server.js
```

## Installation Methods

You can install extensions from multiple sources:

### From GitHub Repository

```bash theme={null}
qwen extensions install https://github.com/owner/repo
# or
qwen extensions install owner/repo
```

### From Claude Code Marketplace

```bash theme={null}
qwen extensions install marketplace-name
# or
qwen extensions install marketplace-name:plugin-name
```

### From Gemini CLI Extensions

```bash theme={null}
qwen extensions install gemini-extension-repo-url
```

### From Local Path

```bash theme={null}
qwen extensions install /path/to/extension
```

### For Development (Symlink)

```bash theme={null}
qwen extensions link /path/to/extension
```

## Runtime Management

Extensions can be managed at runtime within the interactive CLI:

| Command                        | Description                     |
| ------------------------------ | ------------------------------- |
| `/extensions`                  | Manage all installed extensions |
| `/extensions install <source>` | Install an extension            |
| `/extensions explore [source]` | Browse available extensions     |

## CLI Management

You can also manage extensions using CLI commands:

```bash theme={null}
qwen extensions install <source>     # Install extension
qwen extensions uninstall <name>     # Remove extension
qwen extensions enable <name>        # Enable extension
qwen extensions disable <name>       # Disable extension
qwen extensions update <name>        # Update extension
qwen extensions list                 # List all extensions
qwen extensions settings <name>      # Manage extension settings
```

## Extension Lifecycle

On startup, Qwen Code:

1. Scans `~/.qwen/extensions/` for installed extensions
2. Loads each extension's `qwen-extension.json` manifest
3. Registers MCP servers, commands, skills, and agents
4. Resolves conflicts with user/project commands
5. Makes everything available in the session

Changes made via runtime commands (slash commands) take effect immediately through hot-reloading. Changes made via CLI commands require restarting active sessions.

## Enablement Scopes

Extensions can be enabled/disabled at two levels:

* **User level** (default): Applies across all workspaces
* **Workspace level**: Only applies to the current workspace

```bash theme={null}
# Disable everywhere
qwen extensions disable extension-name

# Disable only in current workspace
qwen extensions disable extension-name --scope=workspace
```

## Security Considerations

Extensions run with full access to your system:

* They can execute arbitrary code through MCP servers
* They can read and write files in your workspace
* They receive your API keys and credentials

**Always review extension code before installing**, especially from unknown sources. When installing, you'll be prompted to acknowledge these security risks.

## What's Next?

Explore the different types of extensions you can create:

* [Extension Types](/extensions/extension-types) - Overview of all extension capabilities
* [Creating Extensions](/extensions/creating-extensions) - Step-by-step guide to building your first extension
* [MCP Servers](/extensions/mcp-servers) - Add custom tools via Model Context Protocol
* [Custom Commands](/extensions/commands) - Create reusable prompt shortcuts
* [Skills](/extensions/skills) - Build AI-invoked capabilities
* [Subagents](/extensions/agents) - Define specialized AI assistants
