bidding-format
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 "bidding-format" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-1c76fd2005ff90454dd67c630ce14747ffe99fd4976b9bb03d0ccf8f4ffdee32. Verify the upstream source and version against https://skillhub.cn/skills/user_748ae3e9/biddingformat 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
Bid-document formatting and one-click standardization tool. It automatically extracts all style rules from WPS/Word bidding templates, performs intelligent paragraph recognition and structural analysis on user input (plain text/TXT/DOCX/DOC/WPS), matches template styles, and outputs a DOCX bidding file that strictly follows the template rules. Capabilities include unifying fonts, sizes, and paragraph spacing; automatic recognition and formatting of title hierarchy with multi-level numbering (e.g., Chapter 1, 1.1, 1.1.1); batch image resizing and table alignment; automatic generation and updating of the table of contents based on title levels; and removal of extra blank pages, empty paragraphs, and redundant line breaks. Example triggers: bidding format, tender document formatting, bid layout.
Introduction source: third_party · user_748ae3e9 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Software, accounts and paid services
- Translation pending; see source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: bidding-format
description: "投标文档格式编排与一键标准化工具。从WPS/Word投标模板中自动提取全部样式规则,对用户输入(纯文本/TXT/DOCX/DOC/WPS)进行智能段落识别与结构分析,自动匹配模板样式并输出严格遵循模板格式规范的DOCX投标文件。核心能力:全文字体字号段落间距统一标准化;标题层级自动识别与格式化(第一章、1.1、1.1.1等多级编号);批量调整图片尺寸与表格对齐;根据标题层级自动生成并更新目录;清除多余空白页、空段落与冗余换行符。触发词:投标格式、投标文档格式化、标书排版、投标模板应用、格式化投标文件、统一文档格式、标准化标书、投标排版工具、bidding format、tender document formatting"
agent_created: trueBidding Format Skill — 投标文件格式化工具 v2.0
概述
从 WPS/Word 投标模板(.dotx)蒸馏全部样式规则,支持纯文本、.txt、.docx、.doc、.wps 多种输入,一键生成严格符合投标规范的 Word 文档。提供五种运行模式覆盖从基础格式化到全量标准化的所有场景。
内置模板样式体系
本 Skill 基于 WPS 标准投标模板蒸馏,内置以下核心样式规则:
| 类别 | 配置 |
|---|---|
| 页面 | US Letter (215.9×279.4mm),四边距 25.4mm (1 inch) |
| 默认字体 | 中文=宋体,西文=Times New Roman,默认 小四 |
| 正文段落 | 1.5 倍行距,首行缩进 2 字符 |
| 标题 1 | 黑体 小二号 加粗,行距 2.4x |
| 标题 2 | 黑体 三号 加粗,行距 ~1.72x,段前段后 13pt |
| 标题 3 | 黑体 小三 加粗,行距 ~1.72x,段前段后 13pt |
| 标题 4 | 黑体 小三 加粗,行距 1.55x |
| 标题 5 | 黑体 四号 加粗,行距 1.5x |
| 标题 6–9 | 黑体 四号 加粗 |
| 表头 | 宋体 小四 加粗居中 |
| 表内容 | 宋体 五号 居中单倍行距 |
| 图题注 | 宋体 小四 加粗居中 |
| 题注 | 黑体 小四 居中 |
完整样式参考见
references/style_reference.md
运行模式
1. Basic 模式(默认):基础格式化
输入文本 → 智能识别结构 → 应用模板样式 → 输出 .docx
python scripts/bidding_format.py -i content.txt -o output.docx
python scripts/bidding_format.py -i draft.docx -o final.docx --toc
2. Full 模式:一键全格式化
一次性执行:结构识别 → 样式应用 → 图片表格标准化 → 文档清理
python scripts/bidding_format.py -i input.docx -o output.docx --mode full --toc
3. Clean 模式:仅清理文档
移除多余空白页、连续空段落、冗余换行符、未使用的样式
python scripts/bidding_format.py -i messy.docx -o clean.docx --mode clean
4. Media 模式:仅标准化图片和表格
统一图片最大宽度、表格宽度和对齐方式
python scripts/bidding_format.py -i doc.docx -o fixed.docx --mode media --max-image-width 16
5. TOC 模式:在现有文档前插入目录
python scripts/bidding_format.py -i document.docx -o with_toc.docx --mode toc
6. Remap 模式:保留结构 + 表格/图注精确适配
保留原始 .docx 层级结构,表格首行→表头 / 其余→表内容,图题注→图样式,表题注→题注样式,自动清除 run 级字体覆盖。
python scripts/bidding_format.py -i 原文档.docx -o 输出.docx --mode remap --toc
内容结构智能识别
标题层级识别规则
| 层级 | 匹配模式 | 示例 |
|---|---|---|
| H1 | "第X部分/章/篇"、独立短标题(3-50字) | 第一章 项目概述 |
| H2 | "一、/二、"、"1.1" 格式 | 一、项目背景 1.1 需求分析 |
| H3 | "1.1.1"、"(一)" 格式 | 1.1.1 数据架构 |
| H4 | "1.1.1.1"、"1." 格式 | 2. 技术路线 |
| H5 | "(1)"、"①" 等 | (1) 节点配置 |
| H6 | 更深层级 | 自动延续 |
特殊元素识别
- 表格数据:制表符分隔或
|管道分隔的行 - 图标注:以
图X或Figure X开头的行 →FigureCaption样式 - 表标注:以
表X或Table X开头的行 →Caption样式 - 目录标记:单独的
目录行
图片和表格批处理规格
图片标准化
- 最大宽度:默认 14cm(可自定义
--max-image-width) - 保持原始宽高比(lock aspect ratio)
- 仅缩小超宽图片,不放大较小图片
表格标准化
- 宽度:100% 页面宽度(可自定义
--table-width) - 对齐:居中
- 清除旧的自定义单元格边距,使用默认边距
文档清理规则
清理引擎自动执行以下操作:
- 移除连续空段落:两个及以上连续空段落 → 保留一个
- 移除多余换行符:同一段落内多个换行符 → 保留一个
- 清理文档末尾空白:移除文档尾部的空段落
- 移除未使用样式:保留核心样式,删除文档中未引用的自定义样式
依赖
pip install python-docx lxml
python-docx: .docx 文件生成和操作lxml: XML 处理(字体和样式底层操作)
完整参数说明
--input, -i 输入文件路径或文本字符串 [必填]
--output, -o 输出 .docx 路径 [必填]
--mode, -m 运行模式: basic|full|clean|media|toc [default: basic]
--template, -t 自定义模板文件 (.dotx/.docx)
--toc 生成目录
--no-toc 强制不生成目录
--max-image-width 图片最大宽度 (cm) [default: 14.0]
--table-width 表格宽度百分比 [default: 100]
--dump-styles 输出内置模板样式 JSON
使用注意事项
- 字体依赖:输出文档使用"宋体"、"黑体"、"Times New Roman"等字体,确保系统已安装
- 目录更新:生成的目录是 Word TOC 域代码,需在 Word 中右键 → 更新域(或按 F9)来刷新页码
- .doc/.wps 转换:需要 LibreOffice 用于格式转换,如未安装则仅支持 .docx 输入
- 自定义模板:
--template参数可覆盖内置样式,支持从任意 .dotx 提取样式
兼容性
| 平台 | 状态 |
|---|---|
| WorkBuddy | ✅ 完全支持 |
| Codex / Cursor | ✅ 通过 Python 脚本调用 |
| Claude Code | ✅ 通过 Bash 工具调用 |
| GitHub Copilot CLI | ✅ 命令行直接运行 |
| 独立运行 | ✅ python bidding_format.py -i ... -o ... |
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决投标文档标准化的商业刚需场景
- 功能完整闭环,支持多种输入格式和运行模式
- 显著提升用户在投标场景下的文档处理效率
Highlights
- 触发词覆盖全面,包含中英文关键词
- 边界清晰,无明显歧义或重叠风险
Areas to improve
-
缺少When to Use章节 Reported severity: Minor
文档结构完整但缺少明确的When to Use使用场景说明章节
Recommendation: 建议补充When to Use章节,明确说明适用场景和使用时机
Highlights
- Phase/步骤清晰,五种运行模式说明完整
- 含端到端示例,frontmatter完整
- 文档结构良好,易于理解执行流程
Areas to improve
-
文档较长 Reported severity: Minor
主文档内容较为详尽,可能影响快速查阅
Recommendation: 建议适当精简或增加目录导航,提升查阅效率
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.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 128
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Translation pending; see source documentation.
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.