Install
openclaw skills install @fly5661/ccdb-factor-searchCCDB碳因子查询与匹配。Find and select the best-fit CCDB carbon / emission factor for PCF, LCA, carbon accounting, ESG, and supply-chain work — not just a raw search result list. Supports 碳因子 / 排放因子 / 碳足迹因子 / emission factor / carbon factor / ecoinvent / ecoinvent factor / ecoinvent 因子 / 因子匹配 / 选因子 / LCA因子 / PCF因子 / scope 3 因子 / BOM因子匹配. Covers a broad range of factor sources across China and international datasets, including ecoinvent-related records and other mainstream public or institutional sources. Also activate proactively when 产品碳足迹计算 / LCA建模 / 碳核算 / 供应链排放测算 clearly need factor data even if the user did not explicitly say "查因子".
openclaw skills install @fly5661/ccdb-factor-searchFind the best-fit CCDB emission factor for carbon footprint, PCF, LCA, and carbon accounting work — not just a raw result list.
This skill is built for the real business question:
Which factor should I actually use?
It searches in Chinese + English, compares candidates, filters weak matches, explains risks, and returns a recommended factor with direct-use guidance.
It is especially useful when the database is broad and the user needs help choosing from domestic + international sources, including ecoinvent and other mainstream institutional datasets.
It can:
Use this skill when you need to:
Also activate proactively when:
帮我找中国最新全国电力因子。
查询最新中国全国电力因子帮我找聚酯切片的碳因子,如果中文结果不好就切英文继续找这个因子能不能直接用于正式报告?Compare carbon footprint factor vs emission factor for electricityFind the best CCDB factor for primary aluminium, prefer physical-unit factorpython3 scripts/query_ccdb.py --auto --user-request "查询最新的中国全国电力因子,单位最好是 kgCO2e/kWh。"
python3 scripts/query_ccdb.py --query "electricity" --lang en --top 5
查询最新的中国全国电力因子,单位最好是 kgCO2e/kWh。
Expected behavior:
帮我找聚酯切片的碳因子,如果中文结果不好就切英文继续找。
Expected behavior:
请帮我找原铝的排放因子,优先物理量单位,不要误选成按金额计算的因子。
Expected behavior:
这个因子能不能直接用于正式报告?
Expected behavior:
推荐结果:
匹配等级: close_match
因子名称: 电力
因子值: 0.5777
单位: kgCO2e/kWh
适用地区: 中国
适用年份开始: 2024
适用年份结束: 2024
发布年份: 2024
来源机构: 生态环境部
来源级别: 国家排放因子
使用建议: 建议人工复核后使用
风险与注意事项:
- 这是碳足迹因子,不等同于 CO2 排放因子
- 若用于正式核算或核查,请先确认适用口径
A good result should explain these fields clearly:
direct_match → highly aligned, usually safe to use after quick sanity checkclose_match → mostly aligned, should usually be reviewed before formal reportingfallback_generic → usable only as rough estimate / placeholdernot_suitable → should not be used directlyapi_unavailable → no recommendation; retry laterIdentify as much as possible from the request:
For non-trivial factor matching, do not search in only one language. Always try:
Do not judge a factor from one field only. Key ranking dimensions include:
name, description, specification)countries)unit)applyYear ~ applyYearEnd)year)institution, sourceLevel)Do not force a recommendation when evidence is weak. Prefer:
not_suitableapi_unavailableover a misleading confident answer.
The final answer should explain:
These are not always interchangeable.
If:
then Chinese candidates should be preferred by default.
For electricity / steam / natural gas queries, if region is missing, surface that clearly as a risk.
If the user asks for “最新 / latest”, ranking should prefer more recent applyYear, not only lexical similarity.
If the user wants a physical activity factor, do not recommend spend-based / monetary-unit factors as if they were equivalent.
scripts/query_ccdb.pyreferences/api-contract.mdreferences/matching-strategy.mdreferences/output-template.mdIf the API contract changes, update the script and references/api-contract.md together.
Keep scoring / filtering logic in code rather than overloading SKILL.md with implementation detail.
If scripts/query_ccdb.py is missing or fails to run, fall back to a direct API call:
curl -s -X POST https://gateway.carbonstop.com/management/system/website/searchFactorDataMcp \
-H 'Content-Type: application/json' \
-d '{"sign":"<md5(\"mcp_ccdb_search\"+keyword)>","name":"<keyword>","lang":"zh"}'
The sign is md5("mcp_ccdb_search" + keyword). In Python:
import hashlib, requests
keyword = "电力"
sign = hashlib.md5(("mcp_ccdb_search" + keyword).encode()).hexdigest()
resp = requests.post("https://gateway.carbonstop.com/management/system/website/searchFactorDataMcp",
json={"sign": sign, "name": keyword, "lang": "zh"})
print(resp.json())
Even in fallback mode, apply the same ranking, matching, and output rules defined above. Do not return raw API results without analysis.
For public packaging, keep the skill folder lean. Recommended public package contents:
SKILL.mdREADME.md_meta.jsonCHANGELOG.mdscripts/query_ccdb.pyreferences/api-contract.mdreferences/matching-strategy.mdreferences/output-template.mdevals/evals.jsonDraft notes and publishing scratch files should not be included in the final public package.