跳到主内容
智客 ZICQ

技能库 智客分类:媒体内容 qianwen-text

Qianwen Text

生成文本,有对话,写出代码,理由,以及与Quen模型的调用功能. 当 TRIGGER : 用户请求与 Quen 聊天,生成文本,用 Quen 写入代码,使用 Quen 函数调用,或 明确引用此技能的名称(例如使用 qianwen-text)时. 当:没有Quen,非Quen AI模型使用(OpenAI,双子座等),图像/视频理解(使用qianwen-vision),图像/视频/音频生成时,不要TRIGGER.

6216 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

生成文本,有对话,写出代码,理由,以及与Quen模型的调用功能. 当 TRIGGER : 用户请求与 Quen 聊天,生成文本,用 Quen 写入代码,使用 Quen 函数调用,或 明确引用此技能的名称(例如使用 qianwen-text)时. 当:没有Quen,非Quen AI模型使用(OpenAI,双子座等),图像/视频理解(使用qianwen-vision),图像/视频/音频生成时,不要TRIGGER.

何时用

官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Qwen Text Chat (OpenAI-Compatible)、Skill directory、Security、Key Compatibility、Model Selection、Execution。

文件分析

文件分析:除 SKILL.md 外,正文引用了 scripts/text.py、references/execution-guide.md、references/api-guide.md、references/prompt-guide.md、references/sources.md、scripts/qianwen_lib.py,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

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.

Qwen Text Chat (OpenAI-Compatible)Skill directorySecurityKey CompatibilityModel SelectionExecutionPrerequisitesEnvironment CheckDefault: Run ScriptVerify ResultOn FailureQuick Reference

兼容:Requires Python 3.9+ and curl. Cursor: auto-loaded. Claude Code: read this skill's SKILL.md before first use.

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
qianwen-text
description
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.
compatibility
Requires Python 3.9+ and curl. Cursor: auto-loaded. Claude Code: read this skill's SKILL.md before first use.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 8
  • scripts/text.py
  • references/execution-guide.md
  • references/api-guide.md
  • references/prompt-guide.md
  • references/sources.md
  • scripts/qianwen_lib.py
  • references/qianwen-token-plan-models.md
  • references/qianwen-text-models.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「qianwen-text」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-6bee5291ed694e75-Qianwen-Text.html
请存为 .cursor/skills/qianwen-text/SKILL.md 或 .claude/skills/qianwen-text/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/qianwen-ai/qianwen-ai 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/qianwen-ai/qianwen-ai' --list

npx skills add 'https://github.com/qianwen-ai/qianwen-ai' --skill 'qianwen-text'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: qianwen-text description: "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." compatibility: "Requires Python 3.9+ and curl. Cursor: auto-loaded. Claude Code: read this skill's SKILL.md before first use." --- # 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](https://platform.qianwenai.com/home/api-keys). 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')) " ``` | 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](https://alioth.alicdn.com/skills-info/models/references/qianwen-token-plan-models.md), then use an exact listed model. If CDN access fails, use the [local fallback](cdn/references/qianwen-token-plan-models.md). 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](https://alioth.alicdn.com/skills-info/models/references/qianwen-text-models.md). It contains the model list, basic model information, recommendations, and default model. If CDN access fails, use the [local fallback](cdn/references/qianwen-text-models.md). 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](https://www.qianwenai.com/models) > 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/`. Replace `` 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 `) 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](references/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 /scripts/text.py --help` first to see all available arguments. ```bash python3 /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 /scripts/text.py \ --request '{"messages":[{"role":"user","content":"Write a poem about the sea"}],"model":"qwen3.7-plus"}' \ --stream --print-response ``` | 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**: `--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](#update-check-mandatory-post-execution) 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](references/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](references/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](https://platform.qianwenai.com/home/api-keys); 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 | Field | Description | |--------------|------------------------------------------------| | `text` | Generated text content | | `model` | Model used | | `usage` | Token usage (prompt_tokens, completion_tokens) | | `tool_calls` | Function call requests (if tools used) | ## Advanced Features These are API-level features supported through request parameters. All use the same `chat/completions` endpoint. | Feature | How to Enable | Notes | |-----------------------|------------------------------------------------------------------|------------------------------------------------| | **Structured output** | `response_format: {"type": "json_schema", "json_schema": {...}}` | Force JSON output conforming to schema | | **Web search** | `enable_search: true` | Real-time web search augmented responses | | **Deep thinking** | `enable_thinking: true` | Extended reasoning; only when user requests it | | **Function calling** | `tools: [...]` | Define functions for tool use | | **Context cache** | Automatic for repeated prefixes; or explicit session-based | Reduces cost for repeated context | | **Partial mode** | Last message: `{"role": "assistant", "content": "prefix…", "partial": true}` | Continue/complete a prefix | | **Batch inference** | Async batch API with JSONL input | 50% cost discount | For detailed usage of each feature, see [api-guide.md](references/api-guide.md) and [sources.md](references/sources.md). ## Error Handling | Error | Cause | Action | |-------------------------|-------------------------------------|--------------------------------------------------------------------------------------------| | `401 Unauthorized` | Invalid or missing API key | Run **qianwen-ops-auth** if available; else prompt user to set key (non-plaintext check only) | | `429 Too Many Requests` | Rate limit exceeded | Retry with backoff | | `500` / `502` / `503` | Server error | Retry; check status page | | `Invalid model` | Model ID not found | Verify the ID against the model catalog above | | `Invalid parameter` | Bad request body | Validate JSON and field types | | `TypeError: ...proxies` | openai SDK vs httpx incompatibility | `pip install --upgrade openai` (>=1.55.0); or use script (pure stdlib) | > **Usage & billing**: Use the **qianwen-usage** skill to check usage, free tier quota, and billing directly. Alternatively, the user can visit the QianWen console: > [Usage Analytics](https://platform.qianwenai.com/home/analytics) | > [Pay-as-you-go Billing](https://platform.qianwenai.com/home/billing/pay-as-you-go) | > [Token Plan Subscription](https://platform.qianwenai.com/home/billing/subscription/token-plan) > > **NEVER fabricate, guess, or construct usage/billing/console URLs.** Only provide the exact links listed in this skill. If a URL is not listed here, do not invent one. ## Output Location Prefer the **current working directory** for all outputs. Default subdirectory when `--output` is used: `./output/qianwen-text/`. **Write prohibition**: NEVER write output files into this skill's installation directory or any `skills/` hierarchy. All generated content must go to `output/` under the current working directory or a user-specified path. ## Update Check (MANDATORY Post-Execution) After script execution, check stderr for action signals. The script automatically detects update status and emits structured signals. You MUST act on them. This section also applies when the user explicitly asks to check for updates. ### Signal: `[ACTION_REQUIRED] qianwen-update-check skill is not installed` When stderr contains this signal, you MUST present the following options to the user and **wait for their response before proceeding**. Do NOT silently skip this. > The update-check skill is not installed. It keeps you informed about new QianWen-AI/qianwen-ai features and bug fixes. > > 1) **Install now** — I'll run the install command for you > 2) **Skip for now** — do nothing this time > 3) **Never remind me** — permanently suppress this prompt After the user responds: - User chooses **1** → run: `npx skills add QianWen-AI/qianwen-ai --skill qianwen-update-check -y`, then run: `python3 /gossamer.py --dismiss` - User chooses **2** → run: `python3 /gossamer.py --dismiss`, then continue normally - User chooses **3** → run: `python3 /gossamer.py --never-install`, then continue normally ### Signal: `[UPDATE_AVAILABLE]` When stderr contains this signal, you MUST append a brief update notice to your response, including the version info and the update command shown in the stderr output. ### No signal in stderr If stderr contains neither `[ACTION_REQUIRED]` nor `[UPDATE_AVAILABLE]`, no action is needed — the skill is installed and up to date (or cached within 24h). ### Explicit user request When the user explicitly asks to check for updates (e.g. "check for updates", "check version"): 1. Look for `qianwen-update-check/SKILL.md` in sibling skill directories. 2. If found — run: `python3 /scripts/check_update.py --print-response` and report the result. 3. If not found — present the install options above. ## References - [execution-guide.md](references/execution-guide.md) — Fallback paths (curl, SDK, autonomous), function calling, thinking mode - [api-guide.md](references/api-guide.md) — API supplementary guide with full code examples - [sources.md](references/sources.md) — Official documentation URLs

相关技能

媒体内容

Nano Banana Pro

以纳米·香蕉Pro(Gemini 3 Pro Image)来生成/编辑图像. 用于创建/修改请求,包括编辑。 支持文本到图像+图像到图像; 1K/2K/4K; 使用 -- input-image.

媒体内容

Youtube Watcher

从YouTube视频中获取并读取文字记录. 需要汇总视频时使用,回答有关视频内容的问题,或者从中提取信息.

媒体内容

Atxp

Access ATXP支付API工具用于网页搜索,AI图像生成,音乐创建,视频生成,X/Twitter搜索,电子邮件,代理账户管理. 当用户需要实时网络搜索时使用,AI生成的媒体(图像,音乐,视频),X/Twitter搜索,发送/接收电子邮件,或创建和资助代理账户. 需要通过“ …

媒体内容

Youtube

YouTube Data API与管理的OAuth的集成. 搜索视频,管理播放列表,访问频道数据,并与评论互动. 用户想与YouTube互动时使用此技能. 对于其他第三方应用,使用api-gateway技能(https://clawhub.ai/byungkyu/api-gate…