---
name: carbon-footprint
description: Answers questions about industrial product carbon footprints. Use this skill for any queries related to carbon footprint, carbon emissions, emission factors, related standards (e.g., ISO 14067), and policy analysis in the industrial sector. It is particularly useful for generating report drafts, proposing technical optimization solutions, and handling data anomalies in carbon accounting.
---

# Carbon Footprint Q&A

This skill provides access to a specialized AI agent focused on industrial product carbon footprint management. It can answer complex questions, generate report content, and provide technical solutions by calling a dedicated API.

## Important API Characteristics

- **Streaming Response**: The API uses Server-Sent Events (SSE) streaming mode, which returns partial answers incrementally as they are generated.
- **Maximum Wait Time**: The system is configured with a maximum wait time of 200 seconds for complete response delivery.
- **Complete Response Display**: All streaming chunks are collected and displayed together only after the full response is received or the timeout is reached.

## When to Use

Use this skill when the user's query involves:
- Definitions, calculation methods, or industry benchmarks for carbon footprint.
- Carbon emission factor values.
- Technical standards like ISO 14067, IEC 62933, or national standards.
- Carbon-related policy analysis.
- Proposing technical solutions to reduce carbon emissions in production.
- Investigating anomalies or inconsistencies in carbon data.

## Workflow

1.  **Analyze the User's Query**: Identify the core question and any specific context (e.g., product, process, standard, region).
2.  **Consult Usage Scenarios**: Before the first API call in a task, read `/home/admin/.openclaw/workspace/skills/carbon-footprint/references/usage_scenarios.md` to understand how to best formulate the query for different scenarios (e.g., basic query, report generation, technical optimization).
3.  **Execute the Chat Script**: Call the `carbon_footprint_chat.py` script to send the query to the specialized agent. Use the `-q` or `--query` flag to pass the user's question.
4.  **Handle Multi-turn Conversations**: If the conversation requires follow-up questions, capture the `conversation_id` from the script's output and pass it in the next call using the `-c` or `--conversation_id` flag.
5.  **Present the Result**: Format the answer from the script and present it to the user. The answer is a structured JSON object containing the agent's response.

## Bundled Resources

-   **`scripts/carbon_footprint_chat.py`**: The primary tool for interacting with the carbon footprint agent. It handles API communication and returns the agent's response.
    -   **Usage**: `python3 /home/admin/.openclaw/workspace/skills/carbon-footprint/scripts/carbon_footprint_chat.py --query "<your_question>"`
    -   Run with `--help` to see all available options.
-   **`references/usage_scenarios.md`**: Provides detailed examples and guidance for different query types. **Always consult this guide** to formulate effective queries.
-   **`references/api_reference.md`**: Contains detailed documentation of the underlying API, including the endpoint, authentication, and data schemas. Refer to this only if you need to understand the script's internal workings.

## Example Usage

**User Request:** "如何降低多晶硅生产碳足迹？"

**Action:**

1.  First, read `/home/admin/.openclaw/workspace/skills/carbon-footprint/references/usage_scenarios.md` to see how to handle technical optimization questions.
2.  Then, execute the script:

```bash
shell(
    brief="Query carbon footprint agent about polysilicon production",
    action="exec",
    session="carbon-footprint-query",
    command="python3 /home/admin/.openclaw/workspace/skills/carbon-footprint/scripts/carbon_footprint_chat.py --query '如何降低多晶硅生产碳足迹？'"
)
```

The agent might ask for clarification (e.g., which production method). If so, engage in a multi-turn dialogue using the `conversation_id`.