cable-redbook-pricing

Cable red-book material price calculation skill. Based on the GuangcaiNet cable red-book calculation rules and using a red-book parameter model of “copper consumption (kg/km) + processing fee (CNY/km)”, it dynamically computes reference red-book prices for cable models by inputting the current copper price. Suitable for cable main-material pricing in project cost estimating, copper-price linked adjustments, bill-of-quantities cable enquiries, and multi-scheme price comparisons. Trigger keywords: cable price adjustment, copper-price linkage, cable price calculation, red-book price, cable enquiry.

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 "cable-redbook-pricing" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-f86a4d470630c066f4712b4454b0efbbbab64578460fa1bc4d61dccfb1f4569f. Verify the upstream source and version against https://skillhub.cn/skills/user_23ecf243/redbookv1 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

Cable red-book material price calculation skill. Based on the GuangcaiNet cable red-book calculation rules and using a red-book parameter model of “copper consumption (kg/km) + processing fee (CNY/km)”, it dynamically computes reference red-book prices for cable models by inputting the current copper price. Suitable for cable main-material pricing in project cost estimating, copper-price linked adjustments, bill-of-quantities cable enquiries, and multi-scheme price comparisons. Trigger keywords: cable price adjustment, copper-price linkage, cable price calculation, red-book price, cable enquiry.

0 Downloads

Introduction source: third_party · user_23ecf243 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: cable-redbook-pricing
description: 电线电缆红本价材价计算技能。基于广材网电缆红本价计算依据,通过"铜耗量(kg/km)+加工费(元/km)"的红本参数模型,输入当日铜价即可动态计算各型号电线电缆的红本参考价。适用于工程造价中电缆主材价计算、铜价联动调价、清单电缆项询价、多方案比价等场景。触发关键词:电缆调价、铜价联动、电缆价格计算、红本价、电缆询价。

核心数据原则

本技能不存储任何价格数据。 数据库中仅保存两类红本参数:

  • 铜耗量(kg/km)
  • 加工费(元/km)

所有输出价格均基于当日铜价实时计算。 每次询价需先确认铜价基准,再填写参考价。

每次输出必须标注以下免责声明: "电线电缆材料价仅供参考,准确单价需向厂家询价"

铜价自动获取

本技能内置铜价自动获取模块 copper_price_grabber.py,每次运行时自动从上海金属网(同花顺转载)获取 SMM 1#电解铜当日现货均价。

数据来源优先级

优先级 来源 说明
1 同花顺收评页面 转载上海金属网1#电解铜报价,含区间价和均价
2 华泰期货日报 基于SMM升水数据推算现货价(备选)

用法

--copper-price 参数为可选,不传时自动获取:

# 自动获取实时铜价
python calculate_price.py --type 电力电缆 --model YJV --spec "3*240+2*120"

# 手动指定铜价(覆盖自动获取)
python calculate_price.py --type 电力电缆 --model YJV --spec "3*240+2*120" --copper-price 85000

每次运行会明确打印铜价来源:

自动获取SMM 1#电解铜: 106,880 元/吨(来源: 上海金属网(106620-107140))

免责声明

所有输出(命令行+Excel文件)均附带以下声明:

电线电缆材料价仅供参考,准确单价需向厂家询价。

输出Excel文件中以红色斜体字标注在数据表末尾。

电缆红本材价计算

概述

本技能实现基于红本价模型的电线电缆主材价动态计算。核心思想:不存储价格,只存储红本参数——价格由当日铜价实时计算。

红本价计算原理

红本价 = 铜材成本 + 加工费

红本单价(元/m) = (铜耗量(kg/km) × 当日铜价(元/kg) + 加工费(元/km)) ÷ 1000

其中:

  • 铜耗量(kg/km):每千米电缆的理论铜导体净重,由导体截面积 × 芯数 × 铜密度(8.89g/cm³) × 绞入系数计算得出
  • 加工费(元/km):包含绝缘材料、护套、铠装、填充物、人工、制造费用、利润、税金等除铜材外的全部费用
  • 当日铜价(元/kg):通常取长江现货1#电解铜价或沪铜期货主力合约价

核心能力

能力 说明
单规格计价 输入型号+规格+铜价,计算单米红本价
批量计价 从清单Excel批量读取电缆项,按规格匹配红本参数后批量计算
铜价联动调价 给定新铜价,批量更新电缆单价,输出调价前后对比
红本参数维护 导入/导出/编辑红本参数表(不存价格,只存参数)

数据类型(分类型建表)

红本参数按电线电缆类型分表存储:

类型表 覆盖范围 数据来源
电力电缆 VV/VV22/YJV/YJV22/NH-YJV/NH-YJV22/WD-YJY/WD-YJY22/WDZN-YJY/WDZN-YJY22/WDZN-YJFE 等 v0.1由用户提供
控制电缆 KVV/KVV22/KVVP/NH-KVV/NH-KVVP/WD-KVV/WDNH-KYJY 等 v0.1由用户提供
软电线 RVVP/RVV/RVS/BVR 等系列 v0.1由用户提供
矿物电缆 RTTYZ/RTTZ/BTTZ 等 后续扩展
通信电缆 CAT3/CAT5/CAT5E/CAT6(UTP/FTP/SFTP/SSTP)、HS系列、HYA市话电缆 v0.1由广材网截图反推入库
特种电缆 阻燃/耐火/低烟无卤等特种型号 后续扩展

数据文件位置

红本参数表以结构化数据文件存储于 skill 目录下:

scripts/
├── redbook_data/              ← 红本参数数据目录
│   ├── 电力电缆.json           ← 电力电缆红本参数
│   ├── 控制电缆.json           ← 控制电缆红本参数
│   └── 软电线.json             ← 软电线红本参数
├── calculate_price.py         ← 核心计价引擎
├── import_redbook_data.py     ← 数据导入工具
└── batch_calculate.py         ← 批量计价工具

各 JSON 文件格式统一:

[
  {
    "型号": "YJV",
    "规格": "3*240+2*120",
    "铜耗量_kg_km": 7890.0,
    "加工费_元_km": 8500.0,
    "单位": "m",
    "备注": ""
  }
]

工作流程

第 1 步:初始化红本参数数据库

用户提供红本参数数据(v0.1 阶段),格式为 Excel 或 CSV。

执行导入:

python scripts/import_redbook_data.py \
    --input <用户提供的Excel/CSV路径> \
    --type <电力电缆|控制电缆|软电线>

导入工具自动校验字段完整性并写入对应的 JSON 文件。

第 2 步:单规格计价

已知电缆型号、规格和当日铜价,计算红本价:

python scripts/calculate_price.py \
    --type 电力电缆 \
    --model YJV \
    --spec "3*240+2*120" \
    --copper-price 85000

输出示例:

型号: YJV, 规格: 3*240+2*120
铜耗量: 7890.00 kg/km
加工费: 8500.00 元/km
铜价: 85000 元/吨 (85.00 元/kg)
红本价: 685.15 元/m
  ├─ 铜材成本: 670.65 元/m  (97.9%)
  └─ 加工费部分: 8.50 元/m  (1.2%)

第 3 步:批量清单计价

从工程清单 Excel 中提取电缆项,匹配红本参数后批量计算:

python scripts/batch_calculate.py \
    --清单 <清单Excel路径> \
    --copper-price 85000 \
    --output <输出Excel路径>

清单 Excel 至少需包含以下列(列名可配置):

列 说明
型号 如 YJV、VV、KVV
规格 如 3240+2120、1*300
数量 清单工程量(m)
原单价 原清单单价(可选,用于调价对比)

输出 Excel 含:型号、规格、铜耗量、加工费、铜价、原单价、新单价、差额、涨幅百分比。

第 4 步:铜价联动调价

当铜价变动时,以新铜价重新计算所有电缆项单价:

python scripts/batch_calculate.py \
    --清单 <原清单Excel> \
    --copper-price 85000 \
    --old-copper-price 65000 \
    --output <调价结果Excel>

输出调价前后对比,含汇总统计(原总价、新总价、差额、涨幅)。


数据规范

红本参数表字段

字段 类型 必填 说明
型号 string 是 电缆型号,如 YJV、VV22、KVV
规格 string 是 规格描述,如 3240+2120、1*300
铜耗量_kg_km float 是 每千米电缆的理论铜导体净重(kg)
加工费_元_km float 是 每千米电缆的加工费(元),含绝缘/护套/人工/利润/税金等
单位 string 否 计价单位,默认 m
备注 string 否 备注说明

铜耗量计算公式(参考)

若用户提供的红本参数表中无铜耗量数据,可按以下公式估算:

铜耗量(kg/km) = 单芯截面(mm²) × 芯数 × 8.89 × 绞入系数

其中:

  • 8.89 = 铜的密度(g/cm³)
  • 绞入系数:单芯取 1.0,多芯取 1.02~1.05(依工艺而定)
  • 对于扇形/瓦形导体,实际截面约为标称截面的 0.97~0.98 倍

加工费参考(默认值)

当红本参数表中无加工费数据时,可按以下默认值估算(单位:元/km):

电缆类型 基础加工费 铠装附加 耐火附加 低烟无卤附加
低压电力电缆(YJV) 3000~8000 +2000 +3000 +2000
低压电力电缆(VV) 2500~6000 +2000 +3000 +2000
控制电缆(KVV) 2000~5000 +1500 +2500 +1500
软电线(RVVP) 1000~3000 — — +500

注意: 以上为估算值,精确加工费以用户提供的红本数据为准。


脚本清单

脚本 功能 命令行
calculate_price.py 单规格红本价计算 --type --model --spec --copper-price
import_redbook_data.py 从 Excel/CSV 导入红本参数 --input --type
batch_calculate.py 批量清单计价与调价 --清单 --copper-price [--old-copper-price] [--output]

参考文档

  • references/redbook_methodology.md — 红本价计算模型完整说明(含公式推导、参数含义、示例计算)
  • references/copper_price_sources.md — 铜价数据源与获取方式

资源文件

  • assets/redbook_template.xlsx — 红本参数表模板(含示例数据,用户可按此格式准备数据)
  • assets/计价清单模板.xlsx — 批量计价输入清单模板

    地区系数(v0.1 新增)

背景

红本参数来源于上海广材网,不同地区因人工、制造费用差异,加工费有所不同。通过询价单反推地区系数,可实现本地化调价。

工作流程

步骤1:收集当地询价单(含实际市场价)
    ↓
步骤2:calibrate_coefficient.py 反推地区系数
    ↓
步骤3:batch_calculate.py --region-coefficient 系数.json 应用调价

系数反推

python calibrate_coefficient.py \
    --询价单 当地询价.xlsx \
    --copper-price 70000 \
    --region 江苏 \
    --output 江苏系数.json

输出:系数JSON + 对比报告Excel(含每条明细的反推系数和红本价对比)

应用系数

python batch_calculate.py \
    --清单 清单.xlsx \
    --copper-price 106570 \
    --region-coefficient 江苏系数.json

系数说明

  • 系数 = 实际加工费 ÷ 红本加工费,反映地区/厂家与广材网红本价的差异
  • 系数 < 1.0 表示当地加工费低于红本(如江苏、河北等制造业密集区)
  • 系数 > 1.0 表示当地加工费高于红本(如偏远地区、特殊要求)
  • 建议定期(每季度)根据最新询价单更新系数

询价单格式

材料名称 规格型号 询价单价(元/m) 询价铜价(元/吨)
电力电缆 YJV 3240+2120 YJV 3240+2120 665.00 70000

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

  • 解决工程造价中电缆主材价动态计算的明确痛点
  • 支持铜价联动调价、批量计价、多方案比价等高频刚需场景
  • 红本参数模型清晰,不存价格只存参数,符合行业实践
Trigger Precision90/100

Highlights

  • 触发关键词完整覆盖电缆调价、铜价联动、红本价等核心场景
  • 边界清晰,不易与其他技能混淆
Structure and Standards90/100

Areas to improve

  • description内容重复 Reported severity: Minor

    顶层frontmatter与skill_body内部均包含完整description,存在冗余

    Recommendation: 建议仅保留一处description,避免重复

Highlights

  • 工作流程分4步清晰拆解,含初始化、单规格计价、批量计价、调价对比
  • 提供完整数据规范、脚本清单及地区系数扩展说明
  • 含端到端命令行示例与输出格式说明
Execution Reliability88/100

Highlights

  • 铜价自动获取与手动覆盖机制完善,数据来源明确(上海金属网/同花顺)
  • 所有输出均附带免责声明,符合合规要求
  • 批量调价提供前后对比,降低误操作风险
Evidence Verifiability (mean of the first four)90/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.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

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.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.