qianwen-ai/qianwen-ai/qianwen-text

Claude Code and agent skill by qianwen-ai/qianwen-ai

Trust tier 2
  • community
LLM review pending
Source check pending

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-text

SKILL.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.

LocationPurpose
scripts/text.pyDefault execution — chat/completions request, streaming, output save
references/execution-guide.mdFallback: curl, Python SDK, function calling, thinking mode
references/api-guide.mdAPI supplement and full code examples
references/prompt-guide.mdPrompt engineering: CO-STAR framework, CoT, few-shot, task steps
references/sources.mdOfficial 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:

bash
python3 -c "
import sys; sys.path.insert(0, 'scripts')
from qianwen_lib import detect_api_key_type
print(detect_api_key_type('scripts/qianwen_lib.py'))
"
OutputMeaning
token-planToken Plan key — use only models from the Token Plan catalog below.
paygPay-as-you-go key — full model catalog available.
not-setNo 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.

  1. User specified a model → use directly.
  2. Consult the qianwen-model-selector skill when model choice depends on requirement, scenario, or pricing.
  3. 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 availability
changes frequently. **Always check the official model list
for the authoritative, up-to-date catalog before making model decisions.**
Model details: For more information about a specific model, direct the user to https://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:

bash
python3 --version # must be 3.9+

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.

bash
python3 <this-skill-dir>/scripts/text.py \
--request '{"messages":[{"role":"user","content":"Hello!"}],"model":"qwen3.7-plus"}' \
--output output/qianwen-text/ --print-response

For streaming (recommended for interactive use):

bash
python3 <this-skill-dir>/scripts/text.py \
--request '{"messages":[{"role":"user","content":"Write a poem about the sea"}],"model":"qwen3.7-plus"}' \
--stream --print-response
ArgumentDescription
--request '{...}'JSON request body
--file path.jsonLoad request from file (alternative to --request)
--streamEnable streaming output
--output pathSave response JSON to path (file if .json suffix, otherwise directory); use distinct filenames across calls to avoid overwriting
--print-responsePrint response to stdout
--model IDOverride model (also settable in request JSON)
Model priority: --model CLI flag > "model" field in --request JSON > built-in default.
Verify Result
  • Exit code 0 + output contains valid JSON with choices field → 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 --output is used, verify the response JSON file exists and contains choices
  • 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 PatternDiagnosisResolution
command not found: python3Python not on PATHTry python or py -3; install Python 3.9+ if missing
Python 3.9+ requiredScript version check failedUpgrade Python to 3.9+
SyntaxError near type hintsPython < 3.9Upgrade Python to 3.9+
QIANWEN_API_KEY/DASHSCOPE_API_KEY not foundMissing API keyObtain key from QianWen Console; add to .env: echo 'DASHSCOPE_API_KEY=sk-...' >> .env; or run qianwen-ops-auth if available
HTTP 401Invalid or mismatched keyRun qianwen-ops-auth (non-plaintext check only); verify key is valid
SSL: CERTIFICATE_VERIFY_FAILEDSSL cert issue (proxy/corporate)macOS: run Install Certificates.command; else set SSL_CERT_FILE env var
URLError / ConnectionErrorNetwork unreachableCheck internet; set HTTPS_PROXY if behind proxy
HTTP 429Rate limitedWait and retry with backoff
HTTP 5xxServer errorRetry with backoff
PermissionErrorCan't write outputUse --output to specify writable directory

Quick Reference

Request Fields
FieldTypeDescription
prompt / messagesstring \arrayUser input or message list
modelstringModel ID (e.g. qwen3.7-plus)
systemstringSystem prompt (optional)
temperaturefloat0–2, controls randomness
max_tokensintMax output tokens
toolsarrayFunction definitions for tool calling
streamboolEnable streaming (recommended for interactive use)
enable_thinkingboolEnable 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/qianwen-ai/qianwen-ai/qianwen-text/badge)](https://verified-skill.com/skills/qianwen-ai/qianwen-ai/qianwen-text)

Something wrong with this skill or its page? Tell us.