# Send Qwen Code to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "qwen-code-skill",
    "name": "Qwen Code",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/UserB1ank/qwen-code-skill",
    "canonicalUrl": "https://clawhub.ai/UserB1ank/qwen-code-skill",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/qwen-code-skill",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=qwen-code-skill",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "CHANGELOG.md",
      "README.md",
      "SKILL.md",
      "_meta.json",
      "assets/examples/README.md",
      "assets/examples/basic-task.example.sh"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "qwen-code-skill",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T20:11:52.061Z",
      "expiresAt": "2026-05-14T20:11:52.061Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=qwen-code-skill",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=qwen-code-skill",
        "contentDisposition": "attachment; filename=\"qwen-code-skill-1.2.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "qwen-code-skill"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/qwen-code-skill"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/qwen-code-skill",
    "downloadUrl": "https://openagent3.xyz/downloads/qwen-code-skill",
    "agentUrl": "https://openagent3.xyz/skills/qwen-code-skill/agent",
    "manifestUrl": "https://openagent3.xyz/skills/qwen-code-skill/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/qwen-code-skill/agent.md"
  }
}
```
## Documentation

### Qwen Code Skill (background-first)

Use bash background mode for non-interactive coding work with Qwen Code CLI.

### The Pattern: workdir + background

# Start Qwen Code in target directory
bash workdir:~/project background:true yieldMs:30000 command:"qwen -p 'Build a Flask API'"
# Returns sessionId for tracking

# Monitor progress
process action:log sessionId:XXX

# Check if done
process action:poll sessionId:XXX

# Send input (if Qwen asks a question)
process action:write sessionId:XXX data:"y"

# Kill if needed
process action:kill sessionId:XXX

Why workdir matters: Agent wakes up in a focused directory, doesn't wander off reading unrelated files.

### Prerequisites

# Install Qwen Code CLI
npm install -g @qwen-code/qwen-code@latest

# Verify installation
qwen --version

# Authenticate (Option 1: OAuth)
qwen auth login

# Or Option 2: API Key
export DASHSCOPE_API_KEY="sk-xxx"

### Basic Usage

# Check status
scripts/qwen-code.js status

# Run a task
scripts/qwen-code.js run "Create a Flask API"

# Code review
scripts/qwen-code.js review src/app.ts

# Headless mode (JSON output)
scripts/qwen-code.js headless "Analyze code" -o json

### Commands

CommandDescriptionExamplestatusCheck Qwen Code status and authenticationscripts/qwen-code.js statusrun <task>Execute programming taskscripts/qwen-code.js run "Create REST API"review <file>Code review and analysisscripts/qwen-code.js review src/main.pyheadless <task>Headless mode (JSON output)scripts/qwen-code.js headless "Analyze" -o jsonhelpShow help informationscripts/qwen-code.js help

### Background Execution

# Basic task
bash workdir:~/project background:true yieldMs:30000 \\
  command:"qwen -p 'Create Python Flask API'"

# Specify model
bash workdir:~/project background:true yieldMs:30000 \\
  command:"qwen -p 'Analyze code structure' -m qwen3-coder-plus"

# YOLO mode (auto-approve)
bash workdir:~/project background:true yieldMs:30000 \\
  command:"qwen -p 'Refactor this function' -y"

### Process Management

# View logs
process action:log sessionId:XXX

# Check completion
process action:poll sessionId:XXX

# Send input (if Qwen asks)
process action:write sessionId:XXX data:"y"

### Headless Mode (Automation/CI/CD)

# JSON output
qwen -p "Analyze code structure" --output-format json

# Pipeline operations
git diff | qwen -p "Generate commit message"

# Batch processing
find src -name "*.ts" | xargs -I {} qwen -p "Review {}"

### Models

Qwen Code supports Alibaba Cloud models:

qwen3.5-plus - General purpose (default)
qwen3-coder-plus - Coding specialized
qwen3-coder-next - Latest coding model
qwen3-max-2026-01-23 - Most capable

Specify model:

bash workdir:~/project background:true yieldMs:30000 \\
  command:"qwen -p 'Refactor this' -m qwen3-coder-plus"

### OAuth (Recommended)

qwen auth login

Opens browser for OAuth flow. Token auto-refreshes.

### API Key

export DASHSCOPE_API_KEY="sk-xxx"

Get key from: https://dashscope.console.aliyun.com/

### ⚠️ Rules

Respect tool choice — if user asks for Qwen, use Qwen. NEVER offer to build it yourself!
Be patient — don't kill sessions because they're "slow"
Monitor with process:log — check progress without interfering
YOLO mode for building — --yolo auto-approves changes (use in workspace only)
Review mode for safety — production code should use review mode
Parallel is OK — run many Qwen processes at once for batch work
NEVER start Qwen in ~/clawd/ — it'll read your soul docs! Use target project dir or /tmp
Workspace safety — YOLO mode is safe in agents.defaults.workspace, not elsewhere

### For

Developers using Qwen Code for programming tasks
Teams needing code review and analysis
Automation scripts and CI/CD integration
OpenClaw Sub-Agent and Skills management
Batch code analysis and refactoring

### Not For

Environments without Qwen Code CLI installed
GUI-based interaction requirements
Non-Alibaba Cloud LLM users
Offline environments (requires network connection)

### Security & Boundaries

ComponentBehaviorExecutes Shell Commands?scripts/qwen-code.jsWraps Qwen Code CLI commandsYes (via qwen command)references/qwen-cli-commands.mdCommand reference documentationNo (plain text)assets/examples/Example code filesNo (static files)

### ⚠️ Security Notes

This Skill does not execute code directly, only calls Qwen Code CLI
All code generation and modifications require user confirmation
Use review mode in production environments
Disable YOLO mode for sensitive projects

### Examples

See assets/examples/ for complete examples:

ExampleDescriptionbasic-task.example.shBasic task executioncode-review.example.shCode review workflowci-cd.example.ymlGitHub Actions integrationheadless-mode.example.jsNode.js automation example

### References

📖 Qwen Code Official Docs
📝 Command Reference
📦 Example Code
🦌 OpenClaw Documentation

### "qwen: command not found"

npm install -g @qwen-code/qwen-code@latest

### "Authentication required"

qwen auth login
# Or set API key
export DASHSCOPE_API_KEY="sk-xxx"

### Session stuck/waiting for input

# Check what Qwen is asking
process action:log sessionId:XXX

# Send approval
process action:write sessionId:XXX data:"y"

### Kill stuck session

process action:kill sessionId:XXX

Qwen Code Skill 🦌 - Your AI coding partner powered by Alibaba Cloud
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: UserB1ank
- Version: 1.2.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-07T20:11:52.061Z
- Expires at: 2026-05-14T20:11:52.061Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/qwen-code-skill)
- [Send to Agent page](https://openagent3.xyz/skills/qwen-code-skill/agent)
- [JSON manifest](https://openagent3.xyz/skills/qwen-code-skill/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/qwen-code-skill/agent.md)
- [Download page](https://openagent3.xyz/downloads/qwen-code-skill)