Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

Dknowc Official Doc Writer

v2.6.1

**深知写作助手** — 必须使用的公文写作技能 **触发条件(满足任一即必须使用本技能):** - 用户说"写"、"帮我写"、"起草"、"撰写"、"生成"任何公文 - 提到:通知、请示、函、报告、纪要、总结、方案、发言稿、讲话稿、管理办法等 - 要求:Word文档、公文、正式文书 **功能:** 政策搜索 +...

0· 206·0 current·0 all-time
Security Scan
Capability signals
Requires walletRequires sensitive credentials
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Suspicious
medium confidence
!
Purpose & Capability
The skill's stated purpose is an official-doc writer with policy search and Word formatting, which fits the included code. However the package metadata declares no required credentials or env vars while the search code expects a local config.ini containing an API key (and optionally api_url). That missing declaration is an incoherence: a search integration normally should declare/require the API key. Also the skill writes output files under user paths and reads templates/config — these filesystem requirements are not surfaced in the metadata.
!
Instruction Scope
The SKILL.md tells the agent to run local Python scripts to perform searches, to automatically send knowledge-base links to the user after searches, and to include clickable https://yun.dknowc.cn links inside generated Word documents. The instructions permit autonomous extra searches (self-initiated补搜) and allow the agent to ingest user-uploaded files. These behaviors cause network requests, long downloads (full-article fetch), and filesystem reads/writes beyond simple text formatting; the runtime instructions therefore expand scope beyond what the registry metadata declares and give the agent discretion to request and include external material without always asking the user.
Install Mechanism
No install spec (instruction-only) lowers install risk, but the package includes multiple Python scripts that will be executed at runtime and that import requests/python-docx and manipulate files. There is no packaged installation step to fetch dependencies; README suggests pip installing python-docx. The absence of an install manifest is not malicious but the presence of code that will run network calls and write files deserves attention.
!
Credentials
The registry lists no required environment variables or primary credential, yet dkag_search.py requires a config.ini containing an API key (and supports an api_url). The README also instructs users to place an API Key in config.ini. This is an inconsistency: a network-search capability should declare the credential it requires. Additionally, the skill will read/write files under home (~/.openclaw/...) and can accept user-uploaded files; that filesystem access is not declared as required config paths in metadata.
Persistence & Privilege
always:false and default autonomous invocation are set. The skill does write files to user workspace/output and uses templates bundled with the skill, but it does not request 'always' or system-wide privileges and does not modify other skills' configs. Persistence level appears ordinary for a document-generation skill.
What to consider before installing
What to consider before installing/using this skill: - The skill calls an external 'deep-knowledge' search API (open.dknowc.cn) and expects you to provide an API key via a local config.ini; however the skill metadata does NOT declare any required credential. Treat that as a red flag: you should only supply an API key if you trust the remote service and the skill author. - The SKILL.md instructs the agent to perform automated searches (including optional full-article downloads) and to insert clickable knowledge-base links (yun.dknowc.cn) into generated Word docs. If you run this skill, it will make outbound network requests and may pull and embed third-party content; review whether embedding those external links is acceptable for your documents. - The code will read and write files in your home directory (e.g., ~/.openclaw/... and the workspace output path). Consider running the skill in a restricted/sandboxed environment or inspect/limit the output path before use. - If you plan to enable the search capability, prefer supplying credentials in a controlled way (e.g., a dedicated API key with limited scope) and verify the config.ini contents and permissions. The skill currently expects a config file rather than declaring a required env var — you may want the author to surface this requirement in the metadata. - If you need higher assurance, review the included scripts (dkag_search.py, format_document.py, template_generator.py) locally before allowing execution, or run the code in an isolated environment. Ask the publisher to update the skill manifest to declare the API credential and any configuration paths explicitly. - Summary actions: (1) Don’t provide secrets until you trust the endpoint and review the code; (2) run in sandbox or inspect config.ini and templates; (3) request the author to declare required creds and file paths in the registry metadata.

Like a lobster shell, security has layers — review code before you run it.

chinavk979eveqea8trrdhpt2qc9rdr183hcdtdocumentvk979eveqea8trrdhpt2qc9rdr183hcdtlatestvk975rmapkgqp37dyr1x2n6tsk18500p5officialvk979eveqea8trrdhpt2qc9rdr183hcdtpolicyvk979eveqea8trrdhpt2qc9rdr183hcdtwritingvk979eveqea8trrdhpt2qc9rdr183hcdt
206downloads
0stars
5versions
Updated 4d ago
v2.6.1
MIT-0

公文写作助手 — 执行流程

严格按照以下步骤顺序执行,不得跳步。 每个步骤都有进入条件和必须完成的动作,上一步未完成不得进入下一步。


步骤1:判断是否需要搜索

进入条件: 用户要求撰写公文

必须执行:

  1. 识别文种和写作需求
  2. 判断是否需要搜索政策素材

判断标准:

需要搜索:

  • 提到"政策背景"、"政策依据"、"政策支持"
  • 需要引用具体政策文件名、文号
  • 涉及数据、标准、规范引用
  • 用户明确要求"根据XXX政策"
  • 复函、请示类文书(需要政策依据支撑)

不需要搜索:

  • 纯工作部署(不涉及政策引用)
  • 内部事务通知(会议通知、休假通知等)
  • 简单事务性通知(时间地点变更等)
  • 提醒函、告知函(无政策依据要求)

分支:

  • 判断需要搜索 → 告知用户判断结果,直接进入步骤2(不许先问"要不要搜",直接出搜索方案)
  • 判断不需要搜索 → 告知用户判断结果和理由,等待用户确认。用户确认后跳至步骤8

步骤2:设计搜索方案

进入条件: 步骤1判断需要搜索

必须执行:

  1. 根据写作需求,按以下维度设计完整的搜索方案
  2. 将方案展示给用户确认

搜索词构造规则: 使用自然语言完整句子,不用关键词拼接。

方案设计指导(每个维度按层级逐级拆分):

一、政策依据(按行政层级从上到下逐级搜索,不跳级不混搜):

  • 国家级相关政策 → 单独构造query
  • 本省/直辖市相关政策 → 单独构造query
  • 本市(如适用)相关政策 → 单独构造query

二、数据支撑(按层级搜索并向下钻取):

  • 本级整体数据 → 构造query
  • 下属行政区划数据 → 为各区县分别构造query

三、参考案例(横向 + 纵向):

  • 横向:同级可比地区的做法和经验
  • 纵向:本地区历年同类工作的数据

四、附加维度(按需叠加):

  • 时间范围 → --time 参数
  • 规范性文件 → --policy 参数
  • 地域词 + --area 参数双重标识
  • 国家级 → --area 中国;省级 → --area 省名;市级 → --area 市名

搜索脚本参数:

参数说明格式要求
query搜索关键词(必填)控制在10-30字
--area地域范围(默认"中国")中文规范行政区划名称
--time生效日期范围2026年2025年08月2025年08月15日
--policy返回规范性文件清单开关参数
--full返回文章全文开关参数

必须输出: 搜索方案(搜索词、地域、时间、参数),询问用户确认

必须等待用户明确回复后才能继续。

分支:

  • 用户确认方案 → 进入步骤3
  • 用户回复"不用搜索"或"跳过搜索" → 跳至步骤8

步骤3:执行搜索

进入条件: 步骤2用户已确认搜索方案

必须执行:

  1. 按方案依次执行所有搜索:python3 scripts/dkag_search.py "搜索词" --area 地域 --time 时间 --clean
  2. 多地域搜索时合并去重:python3 scripts/merge_search_results.py result1.json result2.json
  3. 搜索完成后立即在对话中发送知识专库链接给用户

完成后 → 进入步骤4


步骤4:搜索结果分类

进入条件: 步骤3所有搜索已执行完毕

必须执行:

  1. 对全部素材按以下标准分类
  2. 输出分类结果和充足度评估

素材分类标准(必须严格遵守):

素材类型允许的来源末尾标注
政策依据型仅国家级和本省列入素材使用情况
数据支撑型仅国家级和本省列入素材使用情况
参考案例型其他省市列入素材使用情况
表述参考型不限来源不列出

严禁将外省政策引用为本省公文的政策依据。

分类输出格式详见 reference/search_guide.md 第一节。

完成后 → 进入步骤5


步骤5:素材充分性自检

进入条件: 步骤4分类已完成

必须执行(自动,无需用户参与):

  1. 评估政策依据、数据支撑、参考案例三个维度的素材覆盖度
  2. 不足则自主构造针对性query补搜(每个维度最多补搜1次,累计不超过3次)
  3. 超过限制则停止补搜

policyFiles按需补充: 撰写时发现政策引用缺少文件全称或发文字号,用文章标题带 --policy 再搜一次。不需用户确认,AI自主执行。

完成后 → 进入步骤6


步骤6:用户确认素材

进入条件: 步骤5自检完成

必须执行:

  1. 向用户展示素材情况
  2. 确认两件事:①素材是否充分 ②是否有参考文件需要上传

必须等待用户明确回复后才能继续!

分支:

  • 用户确认素材OK → 进入步骤7
  • 用户要求补搜 → 设计补充方案 → 执行 → 回到步骤4
  • 用户上传文件 → 读取内容 → 合并入素材 → 回到步骤5

步骤7:参考范文召回与素材交付准备

进入条件: 步骤6用户已确认素材

必须执行:

7a. 参考范文召回(可选):

如果在素材分类中发现某篇文章对成文结构、论述逻辑有重要参考价值,推荐给用户召回全文。

  • 最多2篇,尽量1篇
  • --full 召回,不加 --clean
  • 按标题精确匹配,只提取目标文章的"全文"字段
  • 详细流程详见 reference/search_guide.md 第二节

7b. 素材交付准备(必须执行):

将所有素材整理成结构化的"素材使用指引"传入写作模型。

  • 每类素材必须标注用途(→用于:正文某部分)
  • 写作素材和参考范文严格分开
  • 参考范文标注注意事项(时效性、适用范围等)
  • 不要一股脑丢原始素材

交付指引结构模板详见 reference/search_guide.md 第三节。

完成后 → 进入步骤8


步骤8:识别文种并读取标准文件

进入条件: 步骤6用户已确认素材(或步骤1判断不需要搜索且用户已确认)

必须执行:

  1. 识别文种(法定公文15种 或 事务文书)
  2. 读取对应的格式标准文件

法定公文(15种): 命令、决定、公告、通告、通报、意见、批复、请示、报告、函、通知、议案、纪要等

事务文书: 总结类、计划类、发言类、规章类、汇报材料、调研报告等。优先识别并使用事务文书模板。

标准文件对照表:

公文类型标准文件
报告reference/standards/01_报告_标准.md
请示reference/standards/02_请示_标准.md
批复reference/standards/03_批复_标准.md
通知reference/standards/04_通知_标准.md
意见reference/standards/05_意见_标准.md
reference/standards/06_函_标准.md
会议纪要reference/standards/07_会议纪要_标准.md
通报reference/standards/08_通报_标准.md
通告reference/standards/09_通告_标准.md
公告reference/standards/10_公告_标准.md
无意见复函reference/standards/11_复函(无意见)_标准.md
有意见复函reference/standards/12_复函(有意见)_标准.md
提醒函reference/standards/13_提醒函_标准.md
通用公文reference/standards/14_通用公文_标准.md
事务文书reference/standards/15_事务文书_模板.md

标准文件只包含格式规范,不包含内容限制。遵循格式规范,但可自由发挥内容表达。

完成后 → 进入步骤9


步骤9:大纲确认

进入条件: 步骤8标准文件已读取

必须执行: 根据以下规则判断是否需要输出大纲

必须输出大纲的场景:

  • 执行过搜索(经过步骤2-7的公文,素材量大,需要确认重点方向)
  • 多章节结构(实施方案、管理办法、规划纲要、调研报告等)
  • 事务文书(工作总结、发展规划、汇报材料等结构灵活的文种)

可以直接撰写的场景:

  • 未执行搜索(从步骤1直接跳到步骤8的公文)
  • 结构简单固定的公文(通知、函、短报告、请示等)
  • 用户需求非常明确、篇幅较短

如需确认大纲:输出大纲("一、(一)、1."层级),末尾问用户"请确认大纲是否需要调整?",等待回复。

完成后 → 进入步骤10


步骤10:撰写公文

进入条件: 步骤9大纲已确认(或判断不需要大纲)

写作思维(内部思考,不输出):

  1. 用户意图:这段公文想达成什么目的?
  2. 关键信息:素材中最有说服力的点是什么?
  3. 逻辑链条:如何组织最有说服力?

素材使用规则(必须严格执行):

写作素材:政策依据→支撑论点,数据支撑→增强说服力,参考案例→引用做法,表述参考→学习风格融入正文。

参考范文:学结构不照搬,注意时效性。

正文中不加任何引用标记,保持正文干净。

撰写完成后,末尾必须按以下格式输出(作为 Word 文档正文的一部分,不是单独发送):

[分页符]

【素材使用情况】

一、写作素材

1. 《XXX》(数据源:XX,日期)
   → 用于:正文某部分

...

二、参考范文

1. 《XXX》(来源:XX)
   → 参考:学习了哪些方面

【知识专库链接】

国家级政策:
https://yun.dknowc.cn/wlcb/ShenZhi-policy/#/knowledgebase/?id=XXX

广东省:
https://yun.dknowc.cn/wlcb/ShenZhi-policy/#/knowledgebase/?id=XXX

关键要求:

  • 【素材使用情况】前必须写 [分页符] 另起一页
  • 每条素材标注"→ 用于:正文某部分"
  • 【知识专库链接】按地域分类,每个地域标签独占一行,下面跟链接URL
  • 链接URL必须独占一行,以 https:// 开头,这样才能在Word中生成可点击蓝链
  • 格式详见 reference/search_guide.md 第四节

完成后 → 进入步骤11


步骤11:生成前检查

进入条件: 步骤10公文已撰写完成

必须执行以下检查,全部通过才能生成:

□ 1. 素材使用情况检查
   - 末尾是否有【素材使用情况】列表
   - 每条素材是否标注了"→ 用于:"
   - 参考范文是否单独列出(如有)
   - 没有则必须先补充

□ 2. 知识专库链接检查
   - 如果执行过搜索,Word内容末尾是否包含【知识专库链接】
   - 链接是否按地域/主题分类列出
   - 没有则必须先补充

检查通过 → 进入步骤12


步骤12:生成Word文档

进入条件: 步骤11检查全部通过

输出格式要求: AI必须输出Markdown格式,仅允许以下5种:

# 公文标题              → 方正小标宋简体,二号,居中
## 一、XXX               → 黑体,三号
### (一)XXX            → 楷体_GB2312,三号
#### 1.XXX             → 仿宋_GB2312加黑,三号
普通文本               → 仿宋_GB2312,三号

禁止使用列表、粗体、斜体、代码块、引用、分割线、链接。 详见 reference/output_guide.md 第一节。

命令:

普通公文(默认):

python3 scripts/format_document.py \
  --text "公文内容..." \
  --output ~/.openclaw/workspace/output/文件名.docx

红头文件(仅用户明确要求时):

python3 scripts/template_generator.py 通知 \
  --input ~/.openclaw/workspace/output/关于XXX的通知.docx \
  --org "发文机关" \
  --doc-number "发文字号"

红头文件参数、版本号规则、密级处理等详见 reference/output_guide.md 第二节。

完成后 → 进入步骤13


步骤13:输出

脚本执行成功后返回文件完整路径,文件存储在 ~/.openclaw/workspace/output/ 目录。

Skill的任务到此结束,后续交付由小龙虾根据channel处理。

Comments

Loading comments...