Loading...
Loading...
Provides Qwen Coder CLI delegation workflows for coding tasks using Qwen2.5-Coder and QwQ models, including English prompt formulation, execution flags, and safe result handling. Use when the user explicitly asks to use Qwen for tasks such as code generation, refactoring, debugging, or architectural analysis. Triggers on "use qwen", "use qwen coder", "delegate to qwen", "ask qwen", "second opinion from qwen", "qwen opinion", "continue with qwen", "qwen session".
npx skill4agent add giuseppe-trisciuoglio/developer-kit qwen-coderqwen-p--prompt-m--model--approval-mode-c--continue-r--resumetextjsonstream-json# CLI availability
qwen --version
# Authentication status
qwen auth statusqwenreferences/cli-command-reference.mdTask: <clear objective>
Context: <project/module/files>
Constraints: <do/don't constraints>
Expected output: <format + depth>
Validation: <tests/checks to run or explain>qwen -p "<english-prompt>"-m, --model <model-id>--approval-mode <plan|default|auto_edit|yolo>-c, --continue <session-id>-r, --resume <session-id>-o, --output-format <text|json|stream-json>| Mode | Behavior | Recommended For |
|---|---|---|
| Read-only analysis, no file modifications | Analysis-only tasks, security reviews |
| Requires confirmation before modifications | General coding tasks |
| Auto-approves edit operations | Trusted modifications with oversight |
| Approves all operations without confirmation | Experimental tasks (explicit user request only) |
--approval-mode plan--approval-mode default--yolo# Default non-interactive delegation
qwen -p "Analyze this code and suggest refactoring improvements."
# Explicit model and approval mode
qwen -p "Review authentication module for security issues with fixes." -m qwq --approval-mode plan
# Continue previous session
qwen -c <session-id> -p "Continue the refactoring from the previous session."
# Structured output for automation
qwen -p "Summarize key technical debt items as JSON array." --output-format json--approval-mode yolo| Field | Description |
|---|---|
| Task summary | What was delegated to Qwen Coder |
| Command | The qwen command executed (without sensitive parameters) |
| Model | Which model was used (for example qwen2.5-coder, qwq) |
| Approval mode | The approval mode applied (plan, default, auto_edit, yolo) |
| Key findings | Observations and results from Qwen Coder |
| Suggested next actions | Recommended follow-up steps (if applicable) |
## Qwen Coder Delegation Result
### Task
[delegated task summary]
### Command
`qwen ...`
### Key Findings
- Finding 1
- Finding 2
### Suggested Next Actions
1. Action 1
2. Action 2
### Notes
- Output language from Qwen: English
- Requires user approval before applying code changesAnalyze the authentication module and identify security vulnerabilities.qwen -p "Analyze the authentication module for security vulnerabilities. Report only high-confidence issues with severity, file paths, and remediation steps." -m qwq --approval-mode planReturns a structured analysis with high-confidence security findings, including severity ratings and specific remediation recommendations.Refactor the payment service to reduce code duplication while keeping the public API unchanged.qwen -p "Refactor the payment service in src/services/payment.ts to reduce duplication. Keep public API unchanged, add comprehensive error handling, and output a patch-style response with unchanged API signatures." -m qwen2.5-coder --approval-mode defaultProposes concrete code changes (patch-style), extracts duplication into shared helpers, and maintains original API contracts.Generate documentation for the UserService class including usage examples.qwen -p "Generate comprehensive documentation for the UserService class. Include: class purpose, public methods with parameters, usage examples, and error handling patterns. Format as markdown." -m qwen2.5-coder --approval-mode planReturns markdown-formatted documentation with JSDoc-style comments, method signatures, and practical usage examples.Generate a REST API endpoint for CRUD operations on items.qwen -p "Generate a production-ready REST API endpoint for CRUD operations on items. Include input validation, error handling, and unit tests. Use Express.js framework." -m qwen2.5-coder --approval-mode auto_editGenerates complete, runnable code for POST/GET/PUT/DELETE endpoints with proper middleware, validation, and test scaffolding.Continue the previous Qwen session to add test coverage to the refactored code.qwen -c <session-id> -p "Continue from the previous session. Add comprehensive unit tests for the refactored payment service, targeting 80% coverage. Include mocks for external dependencies." -m qwen2.5-coder --approval-mode defaultResumes the previous session context and continues work, adding test files with appropriate mocks and assertions.Compare Qwen2.5-Coder and QwQ outputs for the same refactoring task.# First run with Qwen2.5-Coder
qwen -p "Refactor the string utility module for better maintainability." -m qwen2.5-coder --approval-mode plan --output-format text
# Then run with QwQ for comparison
qwen -p "Refactor the string utility module for better maintainability." -m qwq --approval-mode plan --output-format textProvides side-by-side comparison: Qwen2.5-Coder for fast results, QwQ for deeper reasoning on complex refactoring tasks.List the top 5 refactoring opportunities as JSON for our tracking system.qwen -p "Analyze this codebase and return the top 5 refactoring opportunities as a JSON array. Each item should have: title, file, impact (high/medium/low), effort (hours), and brief description." -m qwen2.5-coder --output-format jsonReturns valid JSON array with 5 refactoring items, parseable for integration with project management tools.