anhui-labor-cost

An Anhui province labor-cost query and update tool. Manages per-city labor cost data in Anhui (yuan/day), supports OCR of images and import into an SQLite database, exact and fuzzy queries. Triggered when users request querying labor costs for a specific city or quarter, upload images for OCR and import, or manually enter/update labor-cost data.

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 "anhui-labor-cost" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-913b0331e93c11a85be9c66524369aa38c050bbd8c3bd16f045e62034018e597. Verify the upstream source and version against https://skillhub.cn/skills/user_fdbfbc27/anhui-labor-cost 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

An Anhui province labor-cost query and update tool. Manages per-city labor cost data in Anhui (yuan/day), supports OCR of images and import into an SQLite database, exact and fuzzy queries. Triggered when users request querying labor costs for a specific city or quarter, upload images for OCR and import, or manually enter/update labor-cost data.

0 Downloads

Introduction source: third_party · user_fdbfbc27 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the 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

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: anhui-labor-cost
description: |
  安徽省人工费查询与更新技能。管理安徽省各地市的人工费数据(元/每日),支持OCR识别图片数据并录入SQLite数据库、精确查询和模糊查询。当用户需要查询安徽省某地市人工费、录入新季度人工费数据、或通过图片识别人工费数据时触发此技能。

  触发场景:
  (1) 用户询问"XX年XX月XX地人工费查询"等精确查询
  (2) 用户询问"XX年XX季度皖南地区人工费"等模糊查询
  (3) 用户上传人工费数据图片要求OCR识别并录入
  (4) 用户要求手动录入或更新人工费数据
  (5) 用户询问安徽省人工费相关数据
agent_created: true

安徽省人工费查询与更新

概述

管理安徽省16个地市的人工费数据(元/每日),按"年度、季度"归类存储于 SQLite 数据库。支持两种数据录入方式(OCR自动识别 / 手动输入)和两种查询模式(精确查询 / 模糊查询)。

数据存储

  • 数据库路径:~/.workbuddy/anhui_labor_cost.db(SQLite)
  • 主表:labor_costs(字段:year, quarter, city, region, price, unit, source, raw_text, created_at, updated_at)
  • 唯一约束:(year, quarter, city) — 同年同季度同城市自动覆盖(UPSERT)

Python 环境

所有脚本使用以下 Python 解释器执行:

C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe

脚本目录:C:\Users\admin\.workbuddy\skills\anhui-labor-cost\scripts\


工作流一:数据录入(OCR方式)

当用户上传人工费数据图片时,执行以下流程:

Step 1: OCR 识别

调用腾讯云 OCR skill 识别图片文字:

C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe C:\Users\admin\.workbuddy\skills\tencentcloud-ocr\scripts\main.py --image-base64 "<图片路径>"

返回 JSON:{"raw_text": "识别到的文字内容...", "RequestId": "..."}

前置条件:需配置环境变量 TENCENTCLOUD_SECRET_ID 和 TENCENTCLOUD_SECRET_KEY,并安装 tencentcloud-sdk-python。若未配置,提示用户改用手动输入方式。

Step 2: 文本解析

将 OCR 返回的 raw_text 传入解析脚本:

C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/ocr_parse.py --raw-text "<OCR文本>"

返回结构化 JSON:{"year": 2025, "quarter": "Q1", "records": [{"city": "合肥", "price": 128.00, "region": "皖中"}, ...], "warnings": [...], "unparsed_lines": [...]}

Step 3: 确认并入库

向用户展示解析结果(年份、季度、各城市金额、警告信息),确认后执行入库:

C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/init_data.py --input <解析结果JSON文件路径>

工作流二:数据录入(手动方式)

当用户直接提供文本数据时(如"合肥:128.00,芜湖:125.00,..."),直接调用初始化脚本:

# 指定年份和季度
C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/init_data.py --year 2025 --quarter Q1 --data "合肥:128.00,芜湖:125.00,..."

# 指定年份和月份(自动转季度)
C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/init_data.py --year 2025 --month 3 --data "合肥:128.00,芜湖:125.00,..."

工作流三:数据更新

新季度人工费数据发布后,使用 update_data.py 录入。该脚本会自动检测已有数据冲突(同年同季度同城市),展示旧值→新值对比,支持 --force 跳过确认:

# 从手动数据更新(含冲突检测)
C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/update_data.py --year 2025 --quarter Q2 --data "合肥:130.00,芜湖:127.00,..."

# 跳过确认直接写入
C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/update_data.py --year 2025 --quarter Q2 --data "合肥:130.00,..." --force

# 从 OCR 原始文本直接更新
C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/update_data.py --ocr-text "<OCR文本>" --year 2025 --quarter Q2 --force

工作流四:精确查询

当用户查询特定城市的人工费时(如"2025年3月合肥人工费查询"):

  1. 从用户语句中提取:年份、月份/季度、城市名、原始时间词
  2. 月份自动转季度用于数据库查询
  3. 输出保留用户原始时间词
# 参数式查询
C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/query_data.py --mode exact --year 2025 --month 3 --city 合肥 --display-time "3月"

# 自然语言查询(自动解析)
C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/query_data.py --nl "2025年3月合肥人工费查询"

输出格式:

{
  "mode": "exact",
  "display_time": "3月",
  "formatted": "2025年3月合肥人工费为128.00元/每日"
}

关键规则:display_time 保留用户原始查询中的时间表述。用户输"3月"则输出"3月",用户输"Q1"则输出"Q1",用户输"第一季度"则输出"第一季度"。


工作流五:模糊查询

当用户查询某地区的人工费时(如"2025年5月皖南地区人工费"):

  1. 从用户语句中提取:年份、月份/季度、地区名、原始时间词
  2. 月份自动转季度
  3. 地区自动展开为城市列表(皖南→芜湖、马鞍山、铜陵、宣城、黄山、池州、安庆)
  4. 逐城市输出结果
# 参数式模糊查询
C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/query_data.py --mode fuzzy --year 2025 --month 5 --region 皖南 --display-time "5月"

# 自然语言查询
C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/query_data.py --nl "2025年5月皖南地区人工费"

输出格式:

2025年5月皖南地区人工费:
- 芜湖市:125.00元/每日
- 马鞍山市:124.00元/每日
- 铜陵市:122.00元/每日
- 宣城市:118.00元/每日
- 黄山市:115.00元/每日
- 池州市:116.00元/每日
- 安庆市:119.00元/每日

缺失城市标注为"暂无数据"。


工作流六:全量查询

查询某年某季度所有城市数据:

C:\Users\admin\.workbuddy\binaries\python\envs\default\Scripts\python.exe scripts/query_data.py --mode all --year 2025 --quarter Q1

按区域分组输出。


地区映射

详见 references/region_mapping.md。

区域 城市
皖南 芜湖、马鞍山、铜陵、宣城、黄山、池州、安庆
皖中 合肥、滁州、六安
皖北 蚌埠、淮南、淮北、阜阳、亳州、宿州

安庆固定归入皖南地区。


注意事项

  1. OCR 环境前置条件:使用 OCR 功能前需配置腾讯云 API 密钥(TENCENTCLOUD_SECRET_ID、TENCENTCLOUD_SECRET_KEY)并安装 tencentcloud-sdk-python。若未配置,Skill 仍可通过手动输入方式正常使用。
  2. 数据去重:同年同季度同城市的数据通过 UPSERT 机制自动覆盖,无需手动删除旧数据。
  3. 城市名纠错:OCR 识别的城市名通过别名映射和编辑距离纠错自动归一化。详见 references/ocr_examples.md。
  4. 查询无结果:输出提示信息并列出数据库中可用的年份/季度范围供参考。
  5. 金额合理范围:50.00 ~ 300.00 元/每日,超出范围的值标记 warning 但仍入库供人工确认。
  6. 月份-季度映射:Q1=1-3月, Q2=4-6月, Q3=7-9月, Q4=10-12月。

资源索引

  • scripts/region_config.py — 地区映射配置
  • scripts/db_manager.py — 数据库管理
  • scripts/ocr_parse.py — OCR 文本解析
  • scripts/init_data.py — 数据初始化
  • scripts/update_data.py — 数据更新
  • scripts/query_data.py — 查询脚本
  • references/region_mapping.md — 安徽省地域分类参考
  • references/ocr_examples.md — OCR 解析示例与边界情况

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 解决安徽省人工费查询与录入的实际业务需求
  • 支持OCR识别和多种查询模式,提升数据录入效率
  • 具有明确的实用价值和广泛适用场景
Trigger Precision88/100

Highlights

  • 触发词覆盖合理,包含精确查询、模糊查询、OCR录入、手动录入等多种场景
  • 边界清晰,用户容易理解何时使用此技能
Structure and Standards85/100

Highlights

  • 结构完整,包含多个工作流和步骤划分
  • 有详细的示例和说明,frontmatter完整
  • 文档组织良好,易于理解和执行
Execution Reliability82/100

Highlights

  • 工具来源明确,参数正确
  • 覆盖主要异常情况,如OCR环境前置条件、数据去重等
  • 提供了详细的错误处理和注意事项
Evidence Verifiability (mean of the first four)87/100

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.

  • Accounts, secrets or authorization

    Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.

    Mentioned in main document · lines 198

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

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.