Skip to content

feat: Add Qwen Code support#220

Merged
kieranklaassen merged 2 commits intoEveryInc:mainfrom
rlam3:main
Mar 1, 2026
Merged

feat: Add Qwen Code support#220
kieranklaassen merged 2 commits intoEveryInc:mainfrom
rlam3:main

Conversation

@rlam3
Copy link
Copy Markdown
Contributor

@rlam3 rlam3 commented Feb 28, 2026

Summary

This PR adds support for Qwen Code, Alibaba's AI coding assistant. Users can now convert Claude Code plugins to Qwen Code extension format.

Changes

New Files

  • src/types/qwen.ts - Type definitions for Qwen extension format
  • src/converters/claude-to-qwen.ts - Converter from Claude to Qwen format
  • src/targets/qwen.ts - Writer for Qwen extension structure

Modified Files

  • src/targets/index.ts - Register Qwen target handler
  • src/commands/install.ts - Add --to qwen and --qwen-home options
  • README.md - Document Qwen installation

Features

  • Agent conversion: Claude agents → Qwen YAML agents with frontmatter
  • Command conversion: Supports nested commands with colon separator (workflows:plancommands/workflows/plan.md)
  • Skill preservation: SKILL.md format is compatible, copied as-is
  • MCP server config: Converts to qwen-extension.json with variable substitution support
  • Settings extraction: Automatically extracts environment variable placeholders as settings
  • Context file: Generates QWEN.md with plugin documentation index

Usage

# Convert to Qwen Code format
bunx @every-env/compound-plugin install compound-engineering --to qwen

# Output: ~/.qwen/extensions/compound-engineering/

Output Structure

~/.qwen/extensions/compound-engineering/
├── qwen-extension.json    # Config with MCP servers, settings
├── QWEN.md               # Context/documentation file
├── agents/               # Agent files (.yaml)
├── commands/             # Command files (.md)
└── skills/               # Skill directories (SKILL.md)

Testing

Tested with the compound-engineering plugin:

  • ✅ All 35+ agents converted successfully
  • ✅ All commands converted (including nested workflows:*)
  • ✅ All skills preserved
  • ✅ MCP servers converted with appropriate warnings for remote servers
  • ✅ Context file generated with full plugin index

Notes

  • Remote MCP servers are converted with a warning (Qwen has limited remote MCP support)
  • Model aliases are normalized to Qwen-compatible format
  • Path references are rewritten from .claude/ to .qwen/

rlam3 and others added 2 commits February 28, 2026 11:51
- Add Qwen Code target for converting Claude Code plugins
- Implement claude-to-qwen converter with agent/command/skill mapping
- Write qwen-extension.json config with MCP servers and settings
- Generate QWEN.md context file with plugin documentation
- Support nested commands with colon separator (workflows:plan)
- Extract MCP environment placeholders as settings
- Add --to qwen and --qwen-home CLI options
- Document Qwen installation in README

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Fix P1: Remove dead TOOL_MAP constant (defined but never referenced)
- Fix P1: Replace curl fallback for remote MCP servers with warn-and-skip,
  matching the kiro pattern — curl is not an MCP server
- Fix P1: Remove incorrect literal cwd field ("${extensionPath}${/}") from
  stdio MCP server config; the value was never interpolated
- Fix P1: Fix plugin.name → plugin.manifest.name in generateContextFile
  (plugin.name does not exist on ClaudePlugin; produced "# undefined")
- Fix P1: Wire qwenHome through resolveTargetOutputRoot; previously the
  --qwen-home CLI flag was parsed but silently discarded
- Fix P1: Remove hardcoded "compound-engineering" from qwen output path;
  now uses plugin.manifest.name via new qwenHome + pluginName params
- Fix P1: Collapse dead-code resolveQwenPaths branches (both returned
  identical structures; simplify to a single return)
- Fix P3: Remove rewriting of .opencode/ paths to .qwen/ — Claude plugins
  do not reference opencode paths, and rewriting them is incorrect
- Fix P3: inferTemperature now returns undefined for unrecognized agents
  instead of 0.3 (matching the explicit doc branch), letting the model
  use its default temperature
- Fix P2: Add lookbehind guards to rewriteQwenPaths() matching kiro pattern
  to avoid rewriting paths inside compound tokens or URLs
- Update --qwen-home default to ~/.qwen/extensions (plugin name appended)
- Add qwen-converter.test.ts with 16 tests covering all scenarios

Co-Authored-By: Claude <noreply@anthropic.com>
@kieranklaassen kieranklaassen merged commit d40b39f into EveryInc:main Mar 1, 2026
kieranklaassen added a commit to TrendpilotAI/compound-engineering-plugin that referenced this pull request Mar 1, 2026
Both openclaw (EveryInc#217) and qwen (EveryInc#220) modified install.ts and targets/index.ts.
Combined both targets: openclawHome + qwenHome in resolveTargetOutputRoot,
both registered in the targets registry.

Co-Authored-By: Claude <noreply@anthropic.com>
kieranklaassen added a commit that referenced this pull request Mar 1, 2026
CLI CHANGELOG (CHANGELOG.md):
- Add OpenClaw target (#217, TrendpilotAI) to 0.11.0
- Add Qwen Code target (#220, rlam3) to 0.11.0
- Add Fixed section: code injection, plugin.manifest.name, remote MCP, CLI flags

Plugin CHANGELOG (plugins/compound-engineering/CHANGELOG.md):
- Add OpenClaw, Qwen, Windsurf install targets to 2.36.0
- Add Fixed: argument-hint YAML crash (#219, solon)
- Add Fixed: resolve-pr-parallel skill name (underscore → hyphen)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants