Skill: 52yuanchangxing/quote-invoice-workbench (version 1.0.0)

--- name: quote-invoice-workbench description: Turn messy service pricing notes into professional quotes, SOW line items, and invoice drafts with assumptions clearly surfaced. version: 1.1.0 metadata: openclaw: requires: bins: - python3 emoji: 🧰 --- # Quote & Invoice Workbench ## Purpose Turn messy service pricing notes into professional quotes, SOW line items, and invoice drafts with assumptions clearly surfaced. ## Trigger phrases - 报价单 - invoice draft - 做服务报价 - 估算项目费用 - scope and quote ## Ask for these inputs - service scope - rate card or budget - timeline - payment terms - optional taxes/discounts ## Workflow 1. Break the scope into clear line items and assumptions. 2. Use the bundled pricebook as a starting point or adapt to the user's rates. 3. Calculate subtotal, taxes, discounts, deposit, and milestones. 4. Generate quote and invoice drafts separately. 5. Make all assumptions explicit to reduce disputes. ## Output contract - quote table - invoice draft - assumptions list - scope exclusions ## Files in this skill - Script: `{baseDir}/scripts/quote_calculator.py` - Resource: `{baseDir}/resources/pricebook.csv` ## Operating rules - Be concrete and action-oriented. - Prefer preview / draft / simulation mode before destructive changes. - If information is missing, ask only for the minimum needed to proceed. - Never fabricate metrics, legal certainty, receipts, credentials, or evidence. - Keep assumptions explicit. ## Suggested prompts - 报价单 - invoice draft - 做服务报价 ## Use of script and resources Use the bundled script when it helps the user produce a structured file, manifest, CSV, or first-pass draft. Use the resource file as the default schema, checklist, or preset when the user does not provide one. ## Boundaries - This skill supports planning, structuring, and first-pass artifacts. - It should not claim that files were modified, messages were sent, or legal/financial decisions were finalized unless the user actually performed those actions. ## Compatibility notes - Directory-based AgentSkills/OpenClaw skill. - Runtime dependency declared through `metadata.openclaw.requires`. - Helper script is local and auditable: `scripts/quote_calculator.py`. - Bundled resource is local and referenced by the instructions: `resources/pricebook.csv`.

path: CHANGELOG.md
content: # Changelog

## 1.0.0
- Initial release.


path: README.md
content: # Quote & Invoice Workbench

Slug: `quote-invoice-workbench`

## 功能定位

Turn messy service pricing notes into professional quotes, SOW line items, and invoice drafts with assumptions clearly surfaced.

## 适用场景

- 当用户需要：报价单
- 当用户手头已有原始材料，需要快速整理成可执行输出
- 当用户希望先预览方案、再决定是否落盘或批量处理

## 安装要求

- OpenClaw / AgentSkills 兼容目录结构
- `python3` 可执行文件在 PATH 中可用
- 无远程安装脚本、无隐藏联网依赖、无未声明凭据要求

## 目录结构

- `SKILL.md`：触发描述、工作流、输出契约
- `scripts/quote_calculator.py`：本地辅助脚本
- `resources/pricebook.csv`：被 SKILL/README 引用的资源文件
- `examples/example-prompt.md`：触发与输入示例
- `tests/smoke-test.md`：最小冒烟测试
- `SELF_CHECK.md`：规范与安全自检
- `CHANGELOG.md`：变更记录

## 触发示例

- `报价单`
- `invoice draft`
- `做服务报价`
- `估算项目费用`
- `scope and quote`

## 建议输入

- service scope
- rate card or budget
- timeline
- payment terms
- optional taxes/discounts

## 预期输出

- quote table
- invoice draft
- assumptions list
- scope exclusions

## 辅助脚本

脚本：`scripts/quote_calculator.py`

建议先运行帮助信息确认参数：

```bash
python3 scripts/quote_calculator.py --help
```

该脚本设计原则：

- 本地执行，便于审计与回滚
- 输入输出路径显式传入
- 不使用 `curl|bash`、远程直灌、base64 混淆执行
- 仅处理用户明确提供的文件或目录

## 输入输出示例

输入示例见：`examples/example-prompt.md`

输出示例建议至少包含：

- 结构化主结果
- 未决问题 / 风险项
- 可交付给他人的摘要或清单

## 常见问题

### 1. 这个 skill 会直接改我的文件吗？

默认不应直接进行破坏性批量操作；应优先生成预览、清单或草案，只有在用户明确要求时才建议执行进一步动作。

### 2. 这个 skill 需要联网吗？

当前目录内未声明联网依赖，也没有内置远程下载步骤。是否联网应由具体会话任务决定，而不是由 skill 包本身强制触发。

### 3. 资源文件的作用是什么？

`resources/pricebook.csv` 为脚本或说明提供模板、规则、清单或模式参考，便于输出格式统一、可复用、可审计。

## 风险提示

- 对用户提供的数据、文本、截图或本地文件进行整理时，应先确认范围与目标。
- 涉及重命名、移动、合并、覆盖、生成正式对外内容时，应先给预览版本。
- 对不确定字段使用“待确认”标记，不应编造事实。

## 安全审计结论

- 依赖边界：仅声明 `python3`
- 凭据边界：未声明环境变量依赖
- 执行边界：本地脚本、本地资源、显式输入
- 高风险模式检查：未引入 `curl|bash`、远程管道执行、混淆载荷或私有 API 绑定


path: SELF_CHECK.md
content: # SELF_CHECK — quote-invoice-workbench

## 1. 规范检查

- [x] Skill 为独立文件夹
- [x] 包含 `SKILL.md`
- [x] `SKILL.md` 使用 YAML frontmatter
- [x] frontmatter 含 `name`、`description`、`version`
- [x] 运行依赖声明在 `metadata.openclaw.requires`
- [x] 包含 `README.md`
- [x] 包含 `scripts/` 且至少 1 个脚本
- [x] 包含 `resources/` 且至少 1 个资源文件
- [x] 包含 `examples/example-prompt.md`
- [x] 包含 `tests/smoke-test.md`

## 2. 路径与引用检查

- [x] `SKILL.md` 中引用了 `scripts/quote_calculator.py`
- [x] `SKILL.md` 中引用了 `resources/pricebook.csv`
- [x] `README.md`、`SELF_CHECK.md`、`tests/smoke-test.md` 路径与当前目录一致
- [x] 打包后无需依赖绝对路径

## 3. 依赖与脚本检查

- [x] 仅声明 `python3` 作为运行依赖
- [x] 脚本为明文、可审计、本地执行
- [x] 脚本参数通过 CLI 显式传入
- [x] 无未声明环境变量依赖
- [x] 无未声明安装动作

## 4. 资源检查

- [x] 资源文件存在且为真实内容
- [x] 资源用途与 skill 目标一致
- [x] 资源已在说明中被引用

## 5. 安全检查

- [x] 未发现 `curl|bash`
- [x] 未发现远程下载后直接执行
- [x] 未发现 base64/混淆载荷执行
- [x] 未发现越权监控、盗号、破解、恶意抓取设计
- [x] 文件读写范围应由用户明确指定

## 6. 热门度与实用性复核

- 高频需求：是
- 低理解门槛：是
- 易传播：是
- 可二次定制：是
- 维护成本：低到中

## 7. 评分

- 规范完整度：9.5/10
- 可用性：9.0/10
- 安全性：9.5/10
- 可维护性：9.0/10
- 综合评分：9.3/10

## 8. 结论

该 skill 已补齐交付级目录结构，适合纳入统一 bundle 分发。后续若要继续增强，优先方向是增加更贴近真实场景的样例输入与回归测试数据。


path: scripts/quote_calculator.py
content: #!/usr/bin/env python3
import argparse, json
from decimal import Decimal

def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("line_items_json", help="JSON list with item, qty, rate")
    ap.add_argument("--tax", type=float, default=0.0)
    ap.add_argument("--discount", type=float, default=0.0)
    ap.add_argument("--out", default="quote.json")
    args = ap.parse_args()
    items = json.load(open(args.line_items_json, "r", encoding="utf-8"))
    subtotal = sum((item.get("qty",1) * item.get("rate",0) for item in items), 0)
    total = subtotal * (1 + args.tax/100.0) * (1 - args.discount/100.0)
    payload = {"items": items, "subtotal": round(subtotal,2), "tax_pct": args.tax, "discount_pct": args.discount, "total": round(total,2)}
    json.dump(payload, open(args.out, "w", encoding="utf-8"), ensure_ascii=False, indent=2)
    print(f"Wrote {args.out}")

if __name__ == "__main__":
    main()


path: examples/example-prompt.md
content: # Quote & Invoice Workbench 示例

## 示例触发词

- 报价单
- invoice draft
- 做服务报价
- 估算项目费用
- scope and quote

## 示例输入

- service scope
- rate card or budget
- timeline
- payment terms
- optional taxes/discounts

## 示例请求

请使用 `quote-invoice-workbench`，基于我提供的材料，按照 skill 中的工作流给出：

1. quote table
1. invoice draft
1. assumptions list
1. scope exclusions

## 说明

- 先给预览稿或结构化草案
- 信息不足时，只补问最关键缺口
- 不要编造未提供的事实


path: tests/smoke-test.md
content: # Smoke test — quote-invoice-workbench

## 目标

验证该 skill 具备最小可用交付结构，且本地辅助脚本可被解释器加载。

## 检查项

1. `SKILL.md` 存在，且 frontmatter 含 `name`、`description`、`version`
2. `README.md`、`SELF_CHECK.md`、`examples/example-prompt.md` 存在
3. `scripts/` 下至少有一个可执行脚本
4. `resources/` 下至少有一个真实资源文件
5. 运行 `python3 scripts/quote_calculator.py --help` 返回退出码 0

## 人工验证

- 用 `examples/example-prompt.md` 中的触发词在会话中调用 skill
- 检查输出是否覆盖以下内容：
  - quote table
  - invoice draft
  - assumptions list
  - scope exclusions
- 检查是否优先给出预览、草案或确认步骤，而非直接做破坏性操作

## 通过标准

全部检查项通过，即视为 smoke test 通过。


path: resources/pricebook.csv
content: item,unit,base_rate
Strategy session,hour,120
Design work,hour,90
Development,hour,110
Retainer,month,1800
On-site shoot,day,600
Editing,asset,25


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)