← 返回 Skills 市场
lijihua2017

ccdb

作者 lijihua2017 · GitHub ↗ · v0.1.6 · MIT-0
cross-platform ✓ 安全检测通过
262
总下载
2
收藏
0
当前安装
7
版本数
在 OpenClaw 中安装
/install ccdb
功能描述
CCDB Carbon Emission Factor Search Tool. Based on the Carbonstop CCDB database, it queries carbon emission factor data via the `carbonstop-ccdb` CLI. Support...
使用说明 (SKILL.md)

CCDB Carbon Emission Factor Search

Queries the Carbonstop CCDB emission factor database via directly calling the public HTTP API.

Prerequisites

Requires Node.js ≥ 18 (for npx). No API Key is needed. The CLI uses built-in crypto and fetch with zero runtime dependencies.

Security & Auditability

To ensure safe, deterministic execution and mitigate supply-chain risks, this skill pins the execution to [email protected].

Agents should run this CLI in a sandboxed environment if possible, or verify the exact version hash on the npm registry.

Available Tools

This skill relies on the carbonstop-ccdb CLI. Because it is published to npm, you don't need to worry about absolute paths or local files. You can execute it anywhere by running npx [email protected] \x3Ccommand> [options].

1. Search Emission Factors (Formatted Output)

Purpose: Search for carbon emission factors by keyword and return human-readable formatted text.

npx [email protected] search "电力"
npx [email protected] search "electricity" --lang en

Parameters:

  • keyword: Search keyword, e.g., "electricity", "cement", "steel", "natural gas"
  • --lang: (Optional) Target language for the search. Defaults to zh. Pass --lang 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.

npx [email protected] search "electricity" --lang 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.

npx [email protected] compare 电力 天然气 柴油
npx [email protected] compare electricity "natural gas" --lang en
npx [email protected] compare electricity "natural gas" --json

Parameters:

  • compare: Use the compare subcommand.
  • keywords: List of search keywords, 1-5 items maximum.

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 npx [email protected] search "electricity" --lang en or npx [email protected] search "中国电网". 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 npx [email protected] compare electricity "natural gas" diesel --lang 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.
安全使用建议
This skill appears to do what it says: it runs the npm CLI package carbonstop-ccdb to query CCDB emission factors. Before installing/using it: (1) ensure Node.js >= 18 is available — the SKILL.md requires it but the registry metadata does not list it; (2) be aware that `npx` will download and execute code from npm at runtime — run the skill in a sandboxed environment or isolated runner if possible; (3) review the referenced npm package and GitHub repository (check maintainers, recent publish history, and source code) and verify the package version/hash if you need stronger supply-chain guarantees; (4) if you operate in a network-restricted or high-security environment, consider vendoring the CLI binary/package or mirroring a vetted tarball rather than allowing live npx downloads; (5) no API keys or other secrets are required by the skill. If you want higher assurance, ask the skill author to declare Node as a required binary in metadata and to provide a verifiable checksum or packaged release instead of relying solely on npx.
功能分析
Type: OpenClaw Skill Name: ccdb Version: 0.1.6 The skill is a legitimate tool for querying carbon emission factors from the Carbonstop CCDB database. It uses a version-pinned NPM package ([email protected]) via npx and provides clear, task-oriented instructions for searching and comparing data without any signs of data exfiltration, malicious execution, or prompt injection.
能力标签
cryptocan-make-purchasesrequires-sensitive-credentials
能力评估
Purpose & Capability
The SKILL.md describes exactly what the skill does — call the carbonstop-ccdb CLI (via npx) to search/compare emission factors — which matches the name/description. Minor inconsistency: the registry metadata lists no required binaries, but the runtime instructions explicitly require Node.js >= 18 (npx). The metadata should declare Node as a required binary.
Instruction Scope
Instructions are scoped to running the npm-published CLI (search/compare and JSON output) and to prefer China/latest year when unspecified. They do not ask for unrelated files, environment variables, or secret exfiltration. However, the runtime instructions direct the agent to run `npx [email protected] ...`, which will download and execute package code from the npm registry — a legitimate action for this purpose but a supply-chain/runtime execution risk that the skill itself acknowledges and recommends sandboxing/verification.
Install Mechanism
There is no install spec in the registry (instruction-only). The SKILL.md relies on `npx` to fetch and run `[email protected]` from npm and pins a version, which reduces but does not eliminate supply-chain risk. Because execution depends on fetching remote code at runtime, recommend verifying package source, integrity, or vendor-providing a pinned tarball if higher assurance is required.
Credentials
The skill declares no credentials or config paths and the instructions do not request secrets. The only environment requirement is Node.js >= 18 (not listed in metadata). No unrelated credentials or high-privilege access are requested.
Persistence & Privilege
The skill does not request always:true or cross-skill/system-wide configuration changes. It is user-invocable and can be invoked autonomously (platform default), which is expected for a utility skill.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install ccdb
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /ccdb 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.6
- Added a new "Security & Auditability" section highlighting deterministic, version-pinned CLI execution and supply-chain risk mitigation. - Provided direct links to the CLI source code and npm package, and emphasized Node.js version requirements and zero runtime dependencies. - Recommended running the CLI in a sandboxed environment or verifying the npm version hash for enhanced agent safety. - No breaking changes to usage or the core functionality of the skill.
v0.1.5
- Updated documentation and all CLI usage examples to use carbonstop-ccdb version 1.0.1 explicitly with npx. - No changes to code or skill logic; this is a documentation-only update. - Ensures compatibility and stability by pinning the CLI tool version in all instructions.
v0.1.4
- CLI invocation simplified: removed unnecessary use of `-y` flag in documentation. - Minor phrasing and formatting updates for clarity. - No functional or interface changes.
v0.1.3
- Migrated from a custom script to the published `carbonstop-ccdb` CLI on npm; local script and file dependency removed. - Usage instructions now rely on `npx -y carbonstop-ccdb` commands for all searches and comparisons. - Node.js ≥ 18 is now required for npx support. - Skill continues to support keyword search, JSON output, and multi-keyword comparison, with simplified usage and no absolute path issues.
v0.1.2
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.
v0.1.1
ccdb 0.1.1 Changelog - All documentation and interface descriptions updated to English for broader accessibility. - Tool descriptions, usage instructions, and scenarios now follow an English-first convention. - No functional/tool changes; this version focuses on content language unification and clarity for international users.
v0.1.0
Initial release of ccdb skill: Enables searching and comparing carbon emission factors from the Carbonstop CCDB database. - Search carbon emission factors by keyword, with human-readable or structured JSON results. - Compare emission factors for up to 5 different energy sources/materials simultaneously. - Supports queries by region, year, and sector; prioritizes China/latest if not specified. - No API key required; easy CLI and HTTP script usage. - Includes guidance for carbon footprint calculation and handling synonyms for better results.
元数据
Slug ccdb
版本 0.1.6
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 7
常见问题

ccdb 是什么?

CCDB Carbon Emission Factor Search Tool. Based on the Carbonstop CCDB database, it queries carbon emission factor data via the `carbonstop-ccdb` CLI. Support... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 262 次。

如何安装 ccdb?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install ccdb」即可一键安装,无需额外配置。

ccdb 是免费的吗?

是的,ccdb 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

ccdb 支持哪些平台?

ccdb 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 ccdb?

由 lijihua2017(@lijihua2017)开发并维护,当前版本 v0.1.6。

💬 留言讨论