qianwen-text

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Agent setup: If your agent doesn't auto-load skills (e.g. Claude Code), see agent-compatibility.md once per session.
Agent 配置:如果你的Agent不会自动加载技能(例如Claude Code), 请在每个会话中查看agent-compatibility.md

Qwen Text Chat (OpenAI-Compatible)

Qwen 文本对话(兼容OpenAI)

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.
通过兼容OpenAI的API,使用Qwen模型生成文本、进行对话、编写代码以及调用工具。 此技能属于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.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)
references/agent-compatibility.md
Agent self-check: register skills in project config for agents that don't auto-load
使用此技能的内部文件来执行操作和学习。当默认路径失效或需要详细信息时,按需加载参考文件。
位置用途
scripts/text.py
默认执行方式 — 聊天/补全请求、流式输出、保存结果
references/execution-guide.md
备选方案:curl命令、Python SDK、函数调用、思考模式
references/api-guide.md
API补充说明及完整代码示例
references/prompt-guide.md
提示词工程:CO-STAR框架、思维链(CoT)、少样本示例、任务步骤
references/sources.md
官方文档URL(仅手动查询使用)
references/agent-compatibility.md
Agent自检:为不会自动加载技能的Agent在项目配置中注册技能

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.
绝对不要明文输出任何API密钥或凭证。请始终使用变量引用(Shell中使用
$DASHSCOPE_API_KEY
, Python中使用
os.environ["DASHSCOPE_API_KEY"]
)。任何对凭证的检查或检测都必须非明文:仅报告状态(例如“已设置”/“未设置”、“有效”/“无效”),绝不能泄露密钥值。永远不要显示
.env
或可能包含机密信息的配置文件内容。
当未配置API密钥时,绝对不要直接要求用户提供密钥。相反,应帮助创建一个带有占位符的
.env
文件(
DASHSCOPE_API_KEY=sk-your-key-here
),并指导用户从QianWen控制台获取实际密钥后替换占位符。仅当用户明确要求时,才写入实际密钥值。

Key Compatibility

密钥兼容性

Scripts require a standard QianWen API key (
sk-...
). Token Plan 团队版 keys (
sk-sp-...
) target a different endpoint (
token-plan.cn-beijing.maas.aliyuncs.com
) and are designed exclusively for interactive AI tools (Cursor, Claude Code, Qwen Code, OpenClaw, OpenCode, Codex, Kilo Code/CLI, Hermes Agent). They cannot be used by these scripts. Standard
sk-
key required. The script detects
sk-sp-
keys at startup and prints a warning. If qianwen-ops-auth is installed, see its
references/tokenplan.md
for details on key types, endpoint mapping, supported models, and error codes.
脚本需要标准QianWen API密钥(格式为
sk-...
)。Token Plan团队版密钥(格式为
sk-sp-...
)针对不同的端点(
token-plan.cn-beijing.maas.aliyuncs.com
),专为交互式AI工具(Cursor、Claude Code、Qwen Code、OpenClaw、OpenCode、Codex、Kilo Code/CLI、Hermes Agent)设计。这些密钥无法用于本脚本,必须使用标准的
sk-
格式密钥。脚本启动时会检测
sk-sp-
格式密钥并打印警告。 如果已安装qianwen-ops-auth,请查看其
references/tokenplan.md
了解密钥类型、端点映射、支持的模型和错误代码的详细信息。

Model Selection

模型选择

ModelUse Case
qwen3.6-plus
Recommended default — latest flagship, balanced performance/cost/speed, 1M context, thinking on by default, multimodal (text+image+video)
qwen3.5-plus
Balanced performance, cost, speed, 1M context, thinking on by default
qwen3.5-flash
Fast, low-cost, 1M context
qwen3-max
Strongest capability, built-in tools (web search, code interpreter)
qwen-plus
General purpose
qwen-turbo
Cheapest, low latency
qwen3-coder-next
Recommended code model — best balance of quality, speed, cost; agentic coding
qwen3-coder-plus
Code generation — highest quality for complex tasks
qwen3-coder-flash
Code generation — fast responses, lower cost
qwq-plus
Reasoning / chain-of-thought
qwen-mt-plus
Machine translation — best quality, 92 languages
qwen-mt-flash
Machine translation — fast, low cost, 92 languages
qwen-mt-lite
Machine translation — real-time chat, fastest, 31 languages
qwen-plus-character-ja
Role-playing, Japanese
qwen-plus-character
Role-playing — character restoration, empathetic dialog
qwen-flash-character
Role-playing — fast, lower cost
  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
    qwen3.6-plus
    (default).
Fallback: if model-selector is unavailable, the defaults in the table above apply.
⚠️ Important: The model list above 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 its detail page:
https://www.qianwenai.com/models/<model-name>
(replace
<model-name>
with the exact model ID, e.g.
qwen3.6-plus
https://www.qianwenai.com/models/qwen3.6-plus). NEVER modify or guess the model name in the URL.
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.
模型使用场景
qwen3.6-plus
推荐默认模型 — 最新旗舰模型,在性能、成本、速度间达到平衡,支持1M上下文窗口,默认开启思考模式,支持多模态(文本+图像+视频)
qwen3.5-plus
性能、成本、速度平衡,支持1M上下文窗口,默认开启思考模式
qwen3.5-flash
响应快速、成本低,支持1M上下文窗口
qwen3-max
能力最强,内置工具(网页搜索、代码解释器)
qwen-plus
通用场景
qwen-turbo
成本最低、延迟低
qwen3-coder-next
推荐代码模型 — 在质量、速度、成本间达到最佳平衡;支持Agent化编码
qwen3-coder-plus
代码生成 — 处理复杂任务时质量最高
qwen3-coder-flash
代码生成 — 响应快速、成本较低
qwq-plus
推理/思维链
qwen-mt-plus
机器翻译 — 质量最佳,支持92种语言
qwen-mt-flash
机器翻译 — 响应快速、成本低,支持92种语言
qwen-mt-lite
机器翻译 — 实时对话场景,速度最快,支持31种语言
qwen-plus-character-ja
角色扮演,日语场景
qwen-plus-character
角色扮演 — 角色还原、共情对话
qwen-flash-character
角色扮演 — 响应快速、成本较低
  1. 用户指定模型 → 直接使用该模型。
  2. 当模型选择取决于需求、场景或定价时,咨询qianwen-model-selector技能
  3. 无指定且任务明确 → 使用
    qwen3.6-plus
    (默认模型)。
备选方案:如果模型选择器不可用,则使用上表中的默认模型。
⚠️ 重要提示:上表中的模型列表是特定时间点的快照,可能已过时。模型可用性会频繁变化。在选择模型前,请务必查看官方模型列表获取权威、最新的目录
模型详情:如需了解特定模型的更多信息,请引导用户访问其详情页面:
https://www.qianwenai.com/models/<model-name>
(将
<model-name>
替换为准确的模型ID,例如
qwen3.6-plus
对应https://www.qianwenai.com/models/qwen3.6-plus)。绝对不要修改或猜测URL中的模型名称。
动态模型查询:如果qianwen-model-selector技能或QianWen CLI
qianwen models info <model>
)可用,请使用它们获取实时模型数据。CLI需要身份验证 — 请查看qianwen-usage技能了解登录流程。

Execution

执行步骤

Prerequisites

前置条件

  • API Key: Check that
    DASHSCOPE_API_KEY
    (or
    QIANWEN_API_KEY
    ) is set using a non-plaintext check only (e.g. in shell:
    [ -n "$DASHSCOPE_API_KEY" ]
    ; report only "set" or "not set", never the key value). If not set: run the * qianwen-ops-auth* skill if available; otherwise guide the user to obtain a key from QianWen Console and set it via
    .env
    file (
    echo 'DASHSCOPE_API_KEY=sk-your-key-here' >> .env
    in project root or current directory) or environment variable. The script searches for
    .env
    in the current working directory and the project root. Skills may be installed independently — do not assume qianwen-ops-auth is present.
  • Python 3.9+ (stdlib only, no pip install needed for script execution)
  • API密钥:仅通过非明文方式检查
    DASHSCOPE_API_KEY
    (或
    QIANWEN_API_KEY
    )是否已设置(例如在Shell中:
    [ -n "$DASHSCOPE_API_KEY" ]
    ;仅报告“已设置”或“未设置”,绝不能泄露密钥值)。如果未设置:若qianwen-ops-auth技能可用则运行该技能;否则引导用户从QianWen控制台获取密钥,并通过
    .env
    文件(在项目根目录或当前目录执行
    echo 'DASHSCOPE_API_KEY=sk-your-key-here' >> .env
    )或环境变量进行设置。 脚本会在当前工作目录和项目根目录中查找
    .env
    文件。技能可能会独立安装 — 不要假设qianwen-ops-auth已存在。
  • Python 3.9+(仅使用标准库,执行脚本无需安装pip依赖

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.
首次执行前,验证Python是否可用:
bash
python3 --version  # 版本必须为3.9+
如果找不到
python3
,请尝试
python --version
py -3 --version
。如果Python不可用或版本低于3.9,请直接查看execution-guide.md中的路径2(curl命令)

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.6-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.6-plus"}' \
  --stream --print-response
ArgumentDescription
--request '{...}'
JSON request body
--file path.json
Load request from file (alternative to
--request
)
--stream
Enable streaming output
--output dir/
Save response JSON to directory
--print-response
Print response to stdout
--model ID
Override model (also settable in request JSON)
脚本路径:脚本位于此技能目录(包含本SKILL.md的目录)的
scripts/
子目录中。你必须先定位此技能的安装目录,然后始终使用完整绝对路径执行脚本。不要假设脚本在当前工作目录中。执行前不要使用
cd
切换目录。
执行注意事项:所有脚本都在前台运行 — 等待标准输出,不要后台运行。
查看帮助:先运行
python3 <此技能目录>/scripts/text.py --help
查看所有可用参数。
bash
python3 <此技能目录>/scripts/text.py \
  --request '{"messages":[{"role":"user","content":"Hello!"}],"model":"qwen3.6-plus"}' \
  --output output/qianwen-text/ --print-response
流式输出(交互式场景推荐):
bash
python3 <此技能目录>/scripts/text.py \
  --request '{"messages":[{"role":"user","content":"Write a poem about the sea"}],"model":"qwen3.6-plus"}' \
  --stream --print-response
参数描述
--request '{...}'
JSON请求体
--file path.json
从文件加载请求(替代
--request
参数)
--stream
启用流式输出
--output dir/
将响应JSON保存到指定目录
--print-response
将响应打印到标准输出
--model ID
覆盖请求中的模型设置(也可在请求JSON中设置)

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.
  • 退出码为
    0
    + 输出包含带有
    choices
    字段的有效JSON → 执行成功
  • 非零退出码、HTTP错误、空响应,或包含
    "code"
    /
    "message"
    错误字段的JSON → 执行失败
  • 如果Agent无法读取退出码,请扫描输出中的错误模式(
    Error
    Traceback
    401
    403
  • 执行后检查:当使用
    --output
    参数时,验证响应JSON文件是否存在且包含
    choices
    字段
  • 强制检查标准错误输出:确认结果后,扫描命令的标准错误输出中是否存在
    [ACTION_REQUIRED]
    [UPDATE_AVAILABLE]
    。如果存在任一信号,必须按照下方更新检查中的说明操作,再向用户回复。

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: python3
Python not on PATHTry
python
or
py -3
; install Python 3.9+ if missing
Python 3.9+ required
Script version check failedUpgrade Python to 3.9+
SyntaxError
near type hints
Python < 3.9Upgrade Python to 3.9+
QIANWEN_API_KEY/DASHSCOPE_API_KEY not found
Missing API keyObtain 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 keyRun 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 unreachableCheck internet; set
HTTPS_PROXY
if behind proxy
HTTP 429
Rate limitedWait and retry with backoff
HTTP 5xx
Server errorRetry with backoff
PermissionError
Can't write outputUse
--output
to specify writable directory
如果脚本执行失败,请将错误输出与下方诊断表匹配以确定解决方案。如果无匹配项,请查看execution-guide.md中的备选方案:curl命令(路径2)、Python SDK代码生成(路径3)和自主解决(路径5)。
如果Python完全不可用 → 直接查看execution-guide.md中的路径2(curl命令)
错误模式诊断结果解决方案
command not found: python3
Python不在PATH中尝试
python
py -3
;若缺失则安装Python 3.9+
Python 3.9+ required
脚本版本检查失败将Python升级到3.9+
SyntaxError
near type hints
Python版本低于3.9将Python升级到3.9+
QIANWEN_API_KEY/DASHSCOPE_API_KEY not found
缺失API密钥QianWen控制台获取密钥;添加到
.env
文件:
echo 'DASHSCOPE_API_KEY=sk-...' >> .env
;或若qianwen-ops-auth可用则运行该技能
HTTP 401
密钥无效或不匹配运行qianwen-ops-auth(仅非明文检查);验证密钥是否有效
SSL: CERTIFICATE_VERIFY_FAILED
SSL证书问题(代理/企业环境)macOS:运行
Install Certificates.command
;其他系统设置
SSL_CERT_FILE
环境变量
URLError
/
ConnectionError
网络无法连接检查网络;若在代理后则设置
HTTPS_PROXY
环境变量
HTTP 429
触发速率限制等待后重试并使用退避策略
HTTP 5xx
服务器错误重试并使用退避策略
PermissionError
无法写入输出使用
--output
参数指定可写入的目录

Quick Reference

快速参考

Request Fields

请求字段

FieldTypeDescription
prompt
/
messages
string | arrayUser input or message list
model
stringModel ID (e.g.
qwen3.6-plus
)
system
stringSystem prompt (optional)
temperature
float0–2, controls randomness
max_tokens
intMax output tokens
tools
arrayFunction definitions for tool calling
stream
boolEnable streaming (recommended for interactive use)
enable_thinking
boolEnable thinking mode. Model defaults apply:
qwen3.6-plus
/
qwen3.5-plus
/
qwen3.5-flash
have thinking ON by default. Only set explicitly when user requests deep thinking or needs to disable for flash models. Adds latency for real-time tasks.
字段类型描述
prompt
/
messages
string | array用户输入或消息列表
model
string模型ID(例如
qwen3.6-plus
system
string系统提示词(可选)
temperature
float取值0–2,控制输出随机性
max_tokens
int最大输出token数
tools
array工具调用的函数定义
stream
bool启用流式输出(交互式场景推荐)
enable_thinking
bool启用思考模式。遵循模型默认设置
qwen3.6-plus
/
qwen3.5-plus
/
qwen3.5-flash
默认开启思考模式。仅当用户要求深度思考或需要为flash模型关闭时才显式设置。实时任务开启会增加延迟。

Response Fields

响应字段

FieldDescription
text
Generated text content
model
Model used
usage
Token usage (prompt_tokens, completion_tokens)
tool_calls
Function call requests (if tools used)
字段描述
text
生成的文本内容
model
使用的模型
usage
Token使用情况(prompt_tokens、completion_tokens)
tool_calls
工具调用请求(若使用了工具)

Advanced Features

高级功能

These are API-level features supported through request parameters. All use the same
chat/completions
endpoint.
FeatureHow to EnableNotes
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 cacheAutomatic for repeated prefixes; or explicit session-basedReduces cost for repeated context
Partial mode
partial_mode: "prefix"
Continue/complete a prefix
Batch inferenceAsync batch API with JSONL input50% cost discount
For detailed usage of each feature, see api-guide.md and sources.md.
这些是通过请求参数支持的API级功能,均使用相同的
chat/completions
端点。
功能启用方式注意事项
结构化输出
response_format: {"type": "json_schema", "json_schema": {...}}
强制输出符合JSON Schema的内容
网页搜索
enable_search: true
基于实时网页搜索增强响应内容
深度思考
enable_thinking: true
扩展推理能力;仅在用户要求时使用
函数调用
tools: [...]
定义供模型调用的函数
上下文缓存重复前缀自动缓存;或显式基于会话缓存减少重复上下文的使用成本
部分模式
partial_mode: "prefix"
续写/补全给定前缀内容
批量推理使用JSONL输入的异步批量API享受50%的成本折扣
每个功能的详细用法,请查看api-guide.mdsources.md

Error Handling

错误处理

ErrorCauseAction
401 Unauthorized
Invalid or missing API keyRun qianwen-ops-auth if available; else prompt user to set key (non-plaintext check only)
429 Too Many Requests
Rate limit exceededRetry with backoff
500
/
502
/
503
Server errorRetry; check status page
Invalid model
Model ID not foundVerify model name against Model Selection table
Invalid parameter
Bad request bodyValidate 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 | Pay-as-you-go Billing | Token Plan 团队版 Subscription
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.
错误类型原因操作
401 Unauthorized
API密钥无效或缺失若qianwen-ops-auth可用则运行该技能;否则提示用户设置密钥(仅非明文检查)
429 Too Many Requests
超过速率限制重试并使用退避策略
500
/
502
/
503
服务器错误重试;查看状态页面
Invalid model
模型ID不存在根据模型选择表验证模型名称
Invalid parameter
请求体格式错误验证JSON格式和字段类型
TypeError: ...proxies
openai SDK与httpx版本不兼容
pip install --upgrade openai
(版本>=1.55.0);或使用纯标准库脚本
使用量与计费:使用qianwen-usage技能直接查看使用量、免费额度和计费信息。或者用户可以访问QianWen控制台: 使用分析 | 按量计费 | Token Plan团队版订阅
绝对不要编造、猜测或构造使用量/计费/控制台URL。仅提供本技能中列出的准确链接。如果某个URL未在此列出,请不要自行创建。

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.
所有输出优先保存到当前工作目录。当使用
--output
参数时,默认子目录为:
./output/qianwen-text/
写入禁止:绝对不要将输出文件写入此技能的安装目录或任何
skills/
层级目录。所有生成的内容必须保存到当前工作目录下的
output/
或用户指定的路径。

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

信号:
[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 <this-skill-scripts-dir>/gossamer.py --dismiss
  • User chooses 2 → run:
    python3 <this-skill-scripts-dir>/gossamer.py --dismiss
    , then continue normally
  • User chooses 3 → run:
    python3 <this-skill-scripts-dir>/gossamer.py --never-install
    , then continue normally
当标准错误输出包含此信号时,你必须向用户提供以下选项,并等待用户回复后再继续。不要直接跳过此步骤。
更新检查技能未安装。该技能会通知你QianWen-AI/qianwen-ai的新功能和Bug修复。
  1. 立即安装 — 我将为你运行安装命令
  2. 暂时跳过 — 本次不执行任何操作
  3. 永不提醒 — 永久禁用此提示
用户回复后:
  • 用户选择1 → 运行:
    npx skills add QianWen-AI/qianwen-ai --skill qianwen-update-check -y
    ,然后运行:
    python3 <此技能脚本目录>/gossamer.py --dismiss
  • 用户选择2 → 运行:
    python3 <此技能脚本目录>/gossamer.py --dismiss
    ,然后正常继续
  • 用户选择3 → 运行:
    python3 <此技能脚本目录>/gossamer.py --never-install
    ,然后正常继续

Signal:
[UPDATE_AVAILABLE]

信号:
[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).
如果标准错误输出中既没有
[ACTION_REQUIRED]
也没有
[UPDATE_AVAILABLE]
,则无需操作 — 技能已安装且为最新版本(或24小时内已缓存)。

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 <qianwen-update-check-dir>/scripts/check_update.py --print-response
    and report the result.
  3. If not found — present the install options above.
当用户明确要求检查更新时(例如“检查更新”、“查看版本”):
  1. 在同级技能目录中查找
    qianwen-update-check/SKILL.md
  2. 如果找到 — 运行:
    python3 <qianwen-update-check目录>/scripts/check_update.py --print-response
    并报告结果。
  3. 如果未找到 — 提供上述安装选项。

References

参考文档

  • execution-guide.md — Fallback paths (curl, SDK, autonomous), function calling, thinking mode
  • api-guide.md — API supplementary guide with full code examples
  • sources.md — Official documentation URLs
  • execution-guide.md — 备选执行路径(curl、SDK、自主解决)、函数调用、思考模式
  • api-guide.md — API补充指南及完整代码示例
  • sources.md — 官方文档URL