qianwen-ai/qianwen-ai/qianwen-text
Claude Code and agent skill by qianwen-ai/qianwen-ai
- community
Checking that the SKILL.md file is still in the repository.
Generate text, have conversations, write code, reason, and call functions with Qwen models. TRIGGER when: user asks to chat with Qwen, generate text, write code with Qwen, use Qwen function calling, or explicitly invokes this skill by name (e.g. use qianwen-text). DO NOT TRIGGER when: general coding questions without Qwen, non-Qwen AI model usage (OpenAI, Gemini, etc.), image/video understanding (use qianwen-vision), image/video/audio generation.
Install
npx vskill@latest install qianwen-ai/qianwen-ai/qianwen-textSKILL.md
Qwen Text Chat (OpenAI-Compatible)
Generate text, conduct conversations, write code, and invoke tools using Qwen models through the OpenAI-compatible API. This skill is part of QianWen-AI/qianwen-ai.
Skill directory
Use this skill's internal files to execute and learn. Load reference files on demand when the default path fails or you need details.
| Location | Purpose | |
|---|---|---|
scripts/text.py | Default execution — chat/completions request, streaming, output save | |
references/execution-guide.md | Fallback: curl, Python SDK, function calling, thinking mode | |
references/api-guide.md | API supplement and full code examples | |
references/prompt-guide.md | Prompt engineering: CO-STAR framework, CoT, few-shot, task steps | |
references/sources.md | Official documentation URLs (manual lookup only) |
Security
NEVER output any API key or credential in plaintext. Always use variable references ($DASHSCOPE_API_KEY in shell, os.environ["DASHSCOPE_API_KEY"] in Python). Any check or detection of credentials must be non-plaintext: report only status (e.g. "set" / "not set", "valid" / "invalid"), never the value. Never display contents of .env or config files that may contain secrets.
When the API key is not configured, NEVER ask the user to provide it directly. Instead, help create a .env file with a placeholder (DASHSCOPE_API_KEY=sk-your-key-here) and instruct the user to replace it with their actual key from the QianWen Console. Only write the actual key value if the user explicitly requests it.
Key Compatibility
Both PAYG (sk-ws-...; legacy sk-...) and Token Plan (sk-sp-...) keys are supported. Detect the API key type without exposing the Key:
| Output | Meaning | |
|---|---|---|
token-plan | Token Plan key — use only models from the Token Plan catalog below. | |
payg | Pay-as-you-go key — full model catalog available. | |
not-set | No key configured. |
For Token Plan, fetch and read the current Token Plan model catalog, then use an exact listed model. If CDN access fails, use the local fallback.
Token Plan supports only specific models — use exactly a model from the references above; do not guess or probe model availability. For PAYG, continue below.
Model Selection
Before selecting, recommending, or defaulting a model, fetch and read the current Qwen text model catalog. It contains the model list, basic model information, recommendations, and default model. If CDN access fails, use the local fallback.
- User specified a model → use directly.
- Consult the qianwen-model-selector skill when model choice depends on requirement, scenario, or pricing.
- No signal, clear task → use the default from the model catalog. For strongest reasoning/coding, use its recommended high-capability option.
⚠️ Important: The model catalog is a point-in-time snapshot and may be outdated. Model availabilitychanges frequently. **Always check the official model listfor the authoritative, up-to-date catalog before making model decisions.**
Model details: For more information about a specific model, direct the user tohttps://www.qianwenai.com/models/<model-name>. Replace<model-name>with the exact model ID; never modify or guess it.
Dynamic model queries: If the qianwen-model-selector skill or QianWen CLI (qianwen models info <model>) is available, use it for real-time model data. CLI requires authentication — see the qianwen-usage skill for login flow.
Execution
Prerequisites
- API Key: Use the non-plaintext detector in Key Compatibility; do not replace it with a
variable-presence check. If no Key is found, use qianwen-ops-auth when available or guide the user to configure DASHSCOPE_API_KEY/QIANWEN_API_KEY in .env. Skills may be installed independently.
- Python 3.9+ (stdlib only, no pip install needed for script execution)
Environment Check
Before first execution, verify Python is available:
If python3 is not found, try python --version or py -3 --version. If Python is unavailable or below 3.9, skip to Path 2 (curl)** in execution-guide.md.
Default: Run Script
Script path: Scripts are in the scripts/ subdirectory of this skill's directory (the directory containing this SKILL.md). You MUST first locate this skill's installation directory, then ALWAYS use the full absolute path to execute scripts. Do NOT assume scripts are in the current working directory. Do NOT use cd to switch directories before execution.
Execution note: Run all scripts in the foreground — wait for stdout; do not background.
Discovery: Run python3 <this-skill-dir>/scripts/text.py --help first to see all available arguments.
For streaming (recommended for interactive use):
| Argument | Description | |
|---|---|---|
--request '{...}' | JSON request body | |
--file path.json | Load request from file (alternative to --request) | |
--stream | Enable streaming output | |
--output path | Save response JSON to path (file if .json suffix, otherwise directory); use distinct filenames across calls to avoid overwriting | |
--print-response | Print response to stdout | |
--model ID | Override model (also settable in request JSON) |
Model priority:--modelCLI flag >"model"field in--requestJSON > built-in default.
Verify Result
- Exit code
0+ output contains valid JSON withchoicesfield → success - Non-zero exit, HTTP error, empty response, or JSON with
"code"/"message"error → fail - If agent cannot read exit codes, scan output for error patterns (
Error,Traceback,401,403) - Post-execution check: When
--outputis used, verify the response JSON file exists and containschoices - MANDATORY — stderr signal check: After confirming the result, scan the command's stderr output for
[ACTION_REQUIRED] or [UPDATE_AVAILABLE]. If either signal is present, you MUST follow the instructions in Update Check below before responding to the user.
On Failure
If the script fails, match the error output against the diagnostic table below to determine the resolution. If no match, read execution-guide.md for alternative paths: curl commands (Path 2), Python SDK code generation (Path 3), and autonomous resolution (Path 5).
If Python is not available at all → skip directly to Path 2 (curl) in execution-guide.md.
| Error Pattern | Diagnosis | Resolution | |
|---|---|---|---|
command not found: python3 | Python not on PATH | Try python or py -3; install Python 3.9+ if missing | |
Python 3.9+ required | Script version check failed | Upgrade Python to 3.9+ | |
SyntaxError near type hints | Python < 3.9 | Upgrade Python to 3.9+ | |
QIANWEN_API_KEY/DASHSCOPE_API_KEY not found | Missing API key | Obtain key from QianWen Console; add to .env: echo 'DASHSCOPE_API_KEY=sk-...' >> .env; or run qianwen-ops-auth if available | |
HTTP 401 | Invalid or mismatched key | Run qianwen-ops-auth (non-plaintext check only); verify key is valid | |
SSL: CERTIFICATE_VERIFY_FAILED | SSL cert issue (proxy/corporate) | macOS: run Install Certificates.command; else set SSL_CERT_FILE env var | |
URLError / ConnectionError | Network unreachable | Check internet; set HTTPS_PROXY if behind proxy | |
HTTP 429 | Rate limited | Wait and retry with backoff | |
HTTP 5xx | Server error | Retry with backoff | |
PermissionError | Can't write output | Use --output to specify writable directory |
Quick Reference
Request Fields
| Field | Type | Description | ||
|---|---|---|---|---|
prompt / messages | string \ | array | User input or message list | |
model | string | Model ID (e.g. qwen3.7-plus) | ||
system | string | System prompt (optional) | ||
temperature | float | 0–2, controls randomness | ||
max_tokens | int | Max output tokens | ||
tools | array | Function definitions for tool calling | ||
stream | bool | Enable streaming (recommended for interactive use) | ||
enable_thinking | bool | Enable thinking mode. Model defaults vary; check the model catalog above before overriding them. Adds latency for real-time tasks. |
Response Fields
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/text/qianwen-text/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/qianwen-ai/qianwen-ai/qianwen-text)