Rewrite Question — 技能工具
v1.0.0补全上下文并重写用户提问
0· 154·1 当前·1 累计
安全扫描
OpenClaw
可疑
medium confidenceSkill behavior mostly matches its rewrite purpose but it silently inherits and exposes the agent's environment (.env and all env vars) to a spawned Python process and performs network calls — this mismatch in declared vs. actual environment access is a concern.
评估建议
This skill appears to implement the advertised rewrite functionality, but it will: (1) read a parent ../.env file if present, and (2) pass the whole process environment into the spawned Python process, giving the Python code access to any environment variables or secrets available to the agent. The Python code also imports httpx and will make network calls (expected for LLM/API usage). Before installing, consider: - Inspect rewrite_question.py fully to see what external endpoints it calls and wh...详细分析 ▾
ℹ 用途与能力
The skill's name/description (rewrite an incomplete user query using conversation history) aligns with the included code: index.js invokes rewrite_question.py which implements LLM-driven rewrite logic and QA matching. It reasonably accepts optional Gemini API parameters. Minor inconsistency: SKILL.md frames the skill as instruction-only but the package actually contains runnable code that will be executed.
⚠ 指令范围
The SKILL.md and code instruct the agent to run a local Python script that performs LLM calls and QA SQL time-updates. index.js also reads a parent .env file (../.env) if present and will pass the full process environment into the child process, which means the Python code can access any environment variables available to the agent. That behavior (silent loading/exposure of environment secrets) expands scope beyond the simple rewrite task and is not declared in the skill metadata.
✓ 安装机制
There is no install spec or remote download; the skill is delivered as local code files and executed via spawning the system Python. No archive downloads or package installs were found in the manifest.
⚠ 凭证需求
The skill declares no required env vars, yet index.js will use GEMINI_API_URL / GEMINI_API_KEY / GEMINI_TOKEN if present and will also load ../.env and forward the entire process.env to the Python process. This implicit, wide environment access (including unrelated secrets) is disproportionate to a straightforward rewrite task and not surfaced in metadata.
✓ 持久化与权限
The skill is not marked 'always:true' and does not request persistent system-level privileges. It communicates via stdio when invoked by the agent; no evidence it modifies other skills' configs or requests permanent presence.
⚠ index.js:101
Shell command execution detected (child_process).
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv1.0.02026/3/17
- Initial release of the "rewrite_question" skill. - Automatically rewrites user queries to make them self-contained by resolving pronouns, aligning time references, and completing entities using conversation history. - Supports command-line usage for processing and regenerating output. - Outputs detailed rewrite results in JSON format, ready for downstream processing.
● 可疑
安装命令 点击复制
官方npx clawhub@latest install rewrite-question
镜像加速npx clawhub@latest install rewrite-question --registry https://cn.clawhub-mirror.com
技能文档
# Skill: rewrite_question
- Description: 补全上下文并重写用户提问。
- Inputs: [query, history]
- Outputs: [rewritten_query]
- ID: rewrite_question
- Role: 语境重构专家
独立运行说明
``bash
# 基本用法(输出写入 skills/.workflow/rewrite_output.json)
python rewrite_question.py --query "今天汉河店的成交额"
# 全量重跑(清空本步及所有后续中间文件)
python rewrite_question.py --query "今天汉河店的成交额" --clean
`
输出文件(
skills/.workflow/rewrite_output.json)
`json
{
"original_query": "今天汉河店的成交额",
"final_query": "2026-03-11 汉河店的成交额",
"is_rewritten": true,
"confidence": 0.95,
"thought": "...",
"is_qa_matched": false,
"matched_sql": null
}
`
下一步
`bash
python ../recognize-intent/recognize_intent.py
``数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制