返回顶部
c

ccdb

|

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.2
安全检测
已通过
139
下载量
2
收藏
概述
安装方式
版本历史

ccdb

# CCDB Carbon Emission Factor Search Queries the Carbonstop CCDB emission factor database via directly calling the public HTTP API. ## Prerequisites Zero dependencies. The tool uses a native Node.js script `scripts/ccdb-search.mjs` with built-in `crypto` and `fetch`. No API Key is needed. ## Available Tools This skill comes with a lightweight CLI script `scripts/ccdb-search.mjs` that can be executed directly. You can execute it by running `node /workspace/skills/skills/ccdb/scripts/ccdb-search.mjs` (replace the path with the actual absolute path to the script). ### 1. Search Emission Factors (Formatted Output) **Purpose**: Search for carbon emission factors by keyword and return human-readable formatted text. ```bash node /workspace/skills/skills/ccdb/scripts/ccdb-search.mjs "电力" node /workspace/skills/skills/ccdb/scripts/ccdb-search.mjs "electricity" en ``` Parameters: * `keyword`: Search keyword, e.g., "electricity", "cement", "steel", "natural gas" * `lang`: (Optional) Target language for the search. Defaults to `zh`. Pass `en` for English. Returns: Formatted text containing the factor value, unit, applicable region, year, publishing institution, etc. ### 2. Search Emission Factors (JSON Output) **Purpose**: Operates the same as regular search, but returns structured JSON data. Highly recommended for programmatic handling and carbon emission calculations. ```bash node /workspace/skills/skills/ccdb/scripts/ccdb-search.mjs "electricity" en --json ``` Parameters are identical to formatting search, just append the `--json` flag. JSON Return Fields: | Field | Description | |-------|-------------| | `name` | Factor Name | | `factor` | Emission Factor Value | | `unit` | Unit (e.g., kgCO₂e/kWh) | | `countries` | Applicable Countries/Regions | | `year` | Publication Year | | `institution` | Publishing Institution | | `specification` | Specification details | | `description` | Additional description | | `sourceLevel` | Factor source level | | `business` | Industry sector | | `documentType` | Document/Source type | ### 3. Compare Multiple Emission Factors **Purpose**: Compare the carbon emission factors of up to 5 keywords simultaneously. Useful for horizontal comparison of different energy sources or materials. ```bash node /workspace/skills/skills/ccdb/scripts/ccdb-search.mjs --compare 电力 天然气 柴油 node /workspace/skills/skills/ccdb/scripts/ccdb-search.mjs --compare electricity "natural gas" en node /workspace/skills/skills/ccdb/scripts/ccdb-search.mjs --compare electricity "natural gas" --json ``` Parameters: * `--compare`: Flag to trigger comparison mode. * `keywords`: List of search keywords, 1-5 items maximum. ### Node.js One-Liner (Fallback) If the script is somehow inaccessible, you can use this standalone Node.js snippet: ```bash node -e "const c=require('crypto'),n=process.argv[1],s=c.createHash('md5').update('mcp_ccdb_search'+n).digest('hex');fetch('https://gateway.carbonstop.com/management/system/website/searchFactorDataMcp',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({sign:s,name:n,lang:'en'})}).then(r=>r.json()).then(d=>console.log(JSON.stringify(d,null,2)))" "electricity" ``` ## Usage Scenarios & Examples ### Scenario 1: Query Emission Factor for a Specific Energy Source > User: What is the carbon emission factor for the Chinese power grid? → Action: Execute `node /workspace/skills/skills/ccdb/scripts/ccdb-search.mjs "electricity" en` or `node /workspace/skills/skills/ccdb/scripts/ccdb-search.mjs "中国电网"`. Find the one corresponding to China and the most recent year. ### Scenario 2: Carbon Emission Calculation > User: My company used 500,000 kWh of electricity last year, what is the carbon footprint? → Workflow: 1. Search the `"electricity"` factor (preferably with `--json`), select China and the latest year. 2. Calculate Carbon Emissions = 500,000 kWh × Factor Value (in kgCO₂e/kWh). ### Scenario 3: Comparing Energy Alternatives > User: Compare the carbon emission factors of electricity, natural gas, and diesel. → Action: Execute `node /workspace/skills/skills/ccdb/scripts/ccdb-search.mjs --compare "electricity" "natural gas" "diesel" en` ### Scenario 4: Querying Industry-Specific Data > User: What is the emission factor for the cement industry? → Action: Search using `"cement"`. ## Important Notes 1. **Prioritize China Mainland and the Latest Year**: Unless the user specifies another region or year, implicitly prioritize data for China and the most recent year available. 2. **Pay Close Attention to Unit Conversion**: Different factors might have entirely different units (e.g., kgCO₂/kWh vs. tCO₂/TJ). Always double-check before doing mathematical calculations. 3. **Data Authority / Providers**: Take note of the publishing institutions (e.g., MEE, IPCC, IEA, EPA). 4. **No Results Found? Use Synonyms**: If the search yields empty results, attempt to use synonyms (e.g., translate your query, or map "power" → "electricity" → "grid"). 5. **Always Use JSON for Calculations**: The `--json` format returns highly precise numerical figures that are ideal for programmatic multiplication.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ccdb-1776021372 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ccdb-1776021372 技能

通过命令行安装

skillhub install ccdb-1776021372

下载 Zip 包

⬇ 下载 ccdb v0.1.2

文件大小: 4.82 KB | 发布时间: 2026-4-13 09:40

v0.1.2 最新 2026-4-13 09:40
Summary: The skill now uses a streamlined Node.js script to query emission factor data directly, removing previous MCP/CLI dependency.

- Dropped all requirements for ccdb-mcp-server and mcporter; now relies solely on a single Node.js script using public HTTP API.
- Updated instructions and usage examples to reflect direct script execution.
- Removed any mention of MCP tools; focus is now on simple command-line queries for factors and comparisons.
- Maintains support for both formatted and JSON data output, and multi-keyword comparison.
- Zero external dependencies required; built-in Node.js features are sufficient.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部