supervision-log-v2
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "supervision-log-v2" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-272cc90cd45920d9182e2e34d8892868202607c278ac797629f1a026d38a4b2c. Verify the upstream source and version against https://skillhub.cn/skills/user_0f306ece/supervision-log-v2 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Supervision log auto-fill tool: when a user uploads their supervision-log Word template and describes the day’s site conditions, the AI recognizes the template structure and fills the information into the user’s template to generate a Word document; supports user-defined templates and, if information is incomplete, collects missing details via questions before generating the document. Trigger examples include “write supervision log,” “fill log,” “upload template,” etc.
Introduction source: third_party · user_0f306ece · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: supervision-log
version: 2.1
description: >
监理日志自动填写工具(支持用户自定义模板)。当用户上传自己的监理日志 Word 模板文件,
并描述当日现场情况时,AI 自动识别模板结构,将信息填写到用户模板中生成 Word 文档。
触发关键词:写监理日志、填日志、今天现场、巡视记录、旁站记录、施工情况、监理记录、
日志、上传模板、用我的模板、填我的表格等。
若用户信息不全,通过采访方式收集完整信息后再生成文档。监理日志 AI 智能填写 Skill v2.1(动态模板版)
功能概述
支持用户上传任意格式的监理日志 Word 模板(.doc 或 .docx),AI 自动分析模板结构,
将当日现场记录智能填写进去,输出格式完整的 .docx 文件。
完整工作流程
第一步:定位并预处理模板文件
ls /mnt/user-data/uploads/
格式处理规则:
| 文件格式 | 处理方式 |
|---|---|
.docx |
直接使用 |
.doc |
必须先转换为 .docx,再处理 |
| 其他格式 | 告知用户需提供 Word 文档 |
.doc 转 .docx 命令:
python3 scripts/office/soffice.py \
--headless --convert-to docx \
"/mnt/user-data/uploads/<文件名>.doc" \
--outdir /home/claude/
# 转换后文件位于 /home/claude/<文件名>.docx
找到多个 .doc/.docx 文件时,询问用户使用哪个。
第二步:预览模板结构
python3 scripts/fill_template.py \
--template <模板路径>.docx \
--preview
重点分析输出结果,识别两类字段:
A. 表格字段(脚本可自动填写)
行1: 工程名称 | [空]
行2: 天气 | [空] | 气温 | [空] | 风力 | [空] | 风向 | [空]
行3: 施工部位... | [空]
...
B. 表格外行内字段(需手动处理 XML)
段落2: 填写人: 日 期: 年 月 日
这类字段在段落文字中,fill_template.py 不会处理,需在第六步用 str_replace 直接替换 XML。
同时记录字段名映射,不同模板的标签名可能不同,例如:
- "工程名称" vs "项目名称"
- "填写人" vs "记录人"
- 可能多出"风力"、"风向"等标准模板没有的字段
- 可能缺少某些标准字段(如无"总监理工程师"栏)
第三步:信息收集(采访阶段)
根据模板实际字段确定需要收集的信息(而非固定字段列表)。
从用户描述中自动提取已有信息,对缺失字段逐一追问:
基础必问(几乎所有模板都有):
- 项目/工程名称、日期、天气、气温、施工内容、记录人
按模板字段追加询问(模板有才问):
- 有"风力"→ 问风力;有"风向"→ 问风向
- 有"总监理工程师"→ 问总监姓名
- 有"日志编号"→ 问编号或告知留空
话术示例(自然对话,不要一次列清单):
- "请问工程名称是什么?"
- "今天天气和气温怎么样?"(若有风力风向→"风力风向是多少?")
- "今天施工的部位和主要内容是什么?"
- "填写人是哪位监理工程师?"
第四步:信息确认
展示摘要请用户确认,字段名与模板保持一致:
我来整理今天的记录,请确认:
📋 工程名称:XXX
📅 日期:2026年1月26日
🌤 天气:晴 气温:15°C 风力:4级 风向:东南风
🏗 施工部位及内容:
1. XXX
2. XXX
👷 资源投入:施工人员XX人;机械:XXX
👁 监理巡视:XXX
⚠️ 存在问题:无
✍️ 填写人:张三
确认无误后生成文档,如需修改请告诉我。
第五步:解压模板,用脚本填写表格字段
# 解压
python3 scripts/office/unpack.py <模板>.docx /home/claude/unpacked/
# 用脚本填写表格中的标准字段
python3 scripts/fill_template.py \
--template <模板>.docx \
--data '{
"project": "工程名称(对应模板"工程名称"或"项目名称"标签)",
"date": "2026年1月26日",
"weather": "晴",
"temperature": "15°C",
"construction_location": "1.XXX\n2.XXX",
"personnel_status": "施工人员XX人;机械:XXX",
"site_inspection": "现场巡视未发现异常,无旁站",
"material_inspection": "XXX",
"batch_inspection": "",
"quality_safety_issues": "无",
"coordination_resolution": "",
"other_matters": "",
"recorder": "张三",
"chief_supervisor": "李四"
}' \
--output /mnt/user-data/outputs/监理日志_YYYY-MM-DD.docx
fill_template.py按标签名匹配,模板中没有的字段自动跳过,不会报错。
第六步:处理表格外的行内字段(如有)
若第二步发现模板有表格外行内字段(填写人、日期、编号等),需在解压后的 XML 中手动替换。
操作流程:
# 1. 查看目标段落的完整 XML
python3 -c "
import re
with open('/home/claude/unpacked/word/document.xml', encoding='utf-8') as f:
xml = f.read()
paras = re.findall(r'<w:p[ >].*?</w:p>', xml, re.DOTALL)
# 找包含目标文字的段落
for i, p in enumerate(paras):
if '填写人' in p or '日期' in p:
print(f'段落{i}:')
print(p)
"
# 2. 根据 XML 结构,用 str_replace 替换空格占位符为实际内容
# 例:填写人后的空格run → 实际姓名
# 例:年/月/日前的空格run → 实际年月日数字
常见行内字段模式:
| 模式 | 处理方式 |
|---|---|
填写人:[空格run] |
替换空格run的 <w:t> 内容为姓名 |
[空格run]年[空格run]月[空格run]日 |
分别替换年、月、日前的空格run |
日志号:[空格run] |
替换为编号或留空 |
完成后重新打包:
python3 scripts/office/pack.py \
/home/claude/unpacked \
/mnt/user-data/outputs/监理日志_YYYY-MM-DD.docx \
--original <原始模板>.docx
第七步:交付文件
present_files(["/mnt/user-data/outputs/监理日志_YYYY-MM-DD.docx"])
告知用户:
- 模板中有哪些字段已填写
- 哪些字段未识别/未填写(如有),说明原因
脚本说明
scripts/fill_template.py
按表头标签名定位并填写表格单元格,不处理表格外的行内字段。
支持的默认标签名:
项目名称 / 工程名称、日期、天气、气温、风力、风向、
施工部位及内容 / 施工部位、施工内容,...、
施工人员状况及教育情况、现场巡视及旁站 / 监理机构的检查、巡视、检验情况、
检验检测情况、存在的问题及协调处理情况 / 施工作业中存在的问题...、
监理机构签发的意见、其他有关事项 / 其他事项、
记录人、总监理工程师
标签名不匹配时静默跳过,不报错。
兼容的空单元格 XML 格式:
<w:p>内只有<w:pPr>无<w:r>(在 pPr 后插入 run)<w:t/>自闭合空标签<w:t></w:t>显式空标签
scripts/office/soffice.py
LibreOffice 封装,用于 .doc → .docx 格式转换。
scripts/office/unpack.py / pack.py
标准 docx 解压/打包工具,保留全部原始格式。
错误处理
| 情况 | 处理方式 |
|---|---|
上传的是 .doc |
用 soffice.py 转换为 .docx 再处理 |
| 上传的是其他格式 | 告知需提供 Word 文档(.doc 或 .docx) |
| 某字段未填入 | 告知用户未识别的标签名,建议对照模板确认 |
| pack 验证失败 | 检查 XML 是否有语法错误,确认 str_replace 替换正确 |
| LibreOffice 转换失败 | 建议用户在 Word 中手动另存为 .docx |
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决监理工程师日常高频刚需任务,显著提升日志填写效率
- 支持用户自定义 Word 模板,适配不同项目格式要求
- 具备动态字段识别与智能信息收集能力
Highlights
- 触发词覆盖全面,包含多种用户自然表达方式
- 边界清晰,不易与其他 Skill 重叠
Areas to improve
-
缺少独立 When to Use 章节 Reported severity: Minor
文档未设置独立的 When to Use 使用场景说明章节
Recommendation: 建议在功能概述后增加 When to Use 章节,明确适用场景和使用时机
Highlights
- 七步完整工作流程,步骤划分清晰
- 包含端到端示例和字段映射说明
- frontmatter 信息完整规范
Highlights
- 工具链完整,参数定义清晰
- 覆盖主要异常场景并提供处理方案
- 关键操作设有用户确认机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.