/agentic-awesome-skills:carbonmark-carbon-retirementfrom agentic-awesome-skills
Prices and retires verified carbon credits on Base mainnet via Carbonmark's x402 API. Handles listing supply, quoting amounts, preparing retirement transactions, and fetching public certificates.
Ships in agentic-awesome-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Retire tokenized carbon credits on Base mainnet through Carbonmark's x402 Carbon Retirement API (https://x402.klimalabs.com), and return the public certificate that proves the retirement.
The skill covers the whole task: list what can be retired and at what price, quote an amount, prepare the retirement for the user's wallet to sign, and fetch the certificate afterwards. Listing, quoting and certificates are free and need no API key or account. A retirement is paid in USDC on Base and is permanent.
No other skill in this catalog covers carbon credits. Use a general payments or wallet skill for the signing step; this skill supplies what to sign and how to check the result.
Do not use it to estimate a footprint (it does not calculate emissions), to trade or hold credits (it only retires them), or on any chain other than Base mainnet.
https://x402.klimalabs.com. Every call sends only the parameters shown below.Base URL: https://x402.klimalabs.com/api. All amounts are decimal tonnes: 0.001 is one kilogram.
Ask for anything missing; do not guess:
Then list the supply:
curl -s "https://x402.klimalabs.com/api/discover"
carbonClasses[] is pooled supply. Each has carbonClassId, name, priceUsdcPerTonneFormatted and minRetirementTonnesFormatted (0.001 for most, 1 for classes that retire in whole tonnes only).marketplaceListings[] are individual listings at a fixed price. Each has listingId, projectName, priceUsdcPerTonneFormatted, leftToSellFormatted (tonnes still available) and minFillFormatted. Skip a listing with less left than the amount wanted.Add ?maxUsdcPricePerTonne=15 to keep only supply at or under 15 USDC per tonne. Do not send chainId to discover; it rejects it.
Take identifiers only from this response. A made-up carbonClass answers 404 no_candidates. Show the user the options and let them choose, unless they asked for the cheapest.
The prices in discover are indicative. A class can cost more per tonne for a large amount, and the fee differs between classes and listings, so "cheapest" means the lowest quoted total for the amount wanted: quote the two or three lowest-priced classes and the two or three lowest-priced listings, and compare.
Quote (free). Identify the supply with exactly one of carbonClass (a carbonClassId) or listingId:
curl -s "https://x402.klimalabs.com/api/quote?chainId=8453&inputToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&amount=0.001&carbonClass=0x0008f35758a4318942ecb5d5414116ce7b1ede2d"
inputToken is USDC on Base. Read these fields:
| Field | Meaning |
|---|---|
pricePerTonneFormatted | price per tonne for this amount |
retirementPriceFormatted | price of the whole amount, before the fee |
feeFormatted | the service fee |
totalFormatted | expected total when the wallet sends the transactions itself (path A) |
relayTotalFormatted | expected total when a relayer sends them (path B); it adds the relayer's gas and can be several times totalFormatted for a small amount |
suggestedMaxInputFormatted | the most that can be spent on path A if the price moves (slippageBps, 4% at the time of writing) |
In humanSummary the figure after @ is the price of the whole amount, not the price per tonne.
Stop and confirm. Before preparing anything, show the user:
totalFormatted on path A, relayTotalFormatted on path B), the exact maximum authorized spend, and any separate wallet network fees;Continue only on an explicit yes in the current conversation. A request for a quote is not permission to retire. Do not call the prepare endpoints before that yes: they are free and change nothing, but they send the wallet address and the beneficiary text.
Both paths take the same details: a JSON object, URL-encoded. Its keys are beneficiaryString (the name on the certificate), retirementMessage (optional public message) and beneficiaryAddress (optional, the address the retirement is credited to). An unknown key answers 400 schema_validation. The API can add keys of its own (such as retiringAddress) to the details it returns; leave them as they are. To retire from a listing, replace carbonClass=... with listingId=....
Path A: the wallet sends transactions.
curl -s "https://x402.klimalabs.com/api/prepare/retire?chainId=8453&inputToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&amount=0.001&carbonClass=0x0008f35758a4318942ecb5d5414116ce7b1ede2d&details=%7B%22beneficiaryString%22%3A%22Example%20beneficiary%22%7D"
The response has transactions[]: an ERC-20 approve, then the retirement call, each with to, value and data, plus chain: "base". After the checks below, send them in that order from the user's wallet, as one atomic batch if supported. For separate transactions, confirm the allowance receipt before submitting retirement. If retirement fails, report any outstanding allowance so the user can decide whether to revoke it. Do not edit the calldata. The quote object in this response is the authoritative price, and approvalInstructions.amountFormatted is the ceiling the wallet approves.
Path B: the wallet signs, a relayer sends. The wallet needs USDC but no ETH.
curl -s "https://x402.klimalabs.com/api/prepare-auth?chainId=8453&inputToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&amount=0.001&carbonClass=0x0008f35758a4318942ecb5d5414116ce7b1ede2d&from=0xYOUR_WALLET_ADDRESS&beneficiaryIsPayer=true&details=%7B%22beneficiaryString%22%3A%22Example%20beneficiary%22%7D"
Replace 0xYOUR_WALLET_ADDRESS with the paying wallet. This path must say who the retirement is credited to, in one of two ways: beneficiaryIsPayer=true as its own query parameter (the paying wallet), or beneficiaryAddress inside details (another address). With neither it answers 400. beneficiaryIsPayer is never a key inside details.
The response has:
typedData: what the wallet signs.actionsRetireRequest: the request to post afterwards.authValueFormatted: the ceiling the signature authorizes. What is not spent is returned in the same transaction.onChainDetails: the exact name, message and addresses that will be recorded. Check them against what the user confirmed before signing.Then:
typedData exactly as returned (EIP-712, eth_signTypedData_v4).actionsRetireRequest.authPayload.signature. The note in the response describes the accepted signature formats.actionsRetireRequest, otherwise unchanged, as JSON to https://x402.klimalabs.com/api/actions/retire.Use one prepare-auth response from start to finish: every call returns a new salt and nonce. The authorization expires (validBefore, about an hour after the call at the time of writing); if signing takes longer, prepare again.
The request carries a salt tied to what was signed. Changing the amount, the credit or the details afterwards answers 400 params_mismatch.
The answer has transactionHash and retirements[]. status: "pending_index" means the retirement is confirmed on-chain and the certificate is not indexed yet; fetch it in step 3.
On either path, check the ceiling before signing or sending. Verify the wallet preview against the authorized chain, payer, token, approved contract, exact beneficiary, amount, and maximum spend. Stop if the wallet cannot verify what it is authorizing or if the ceiling or fees exceed the user-approved maximum. Ask for a new explicit confirmation for any changed terms. Never approve an unlimited allowance.
Take the transaction hash (from the wallet on path A, from transactionHash on path B) and fetch the certificate:
curl -s "https://x402.klimalabs.com/api/certificate?txHash=0x4be83c30c99a3347593f6ee695253147a032085ceee287c8d613173a3f5cec14"
Success is a retirements[] entry with a certificateUrl on app.carbonmark.com. Give the user that link, the amount and the transaction hash.
404 retirement_not_found just after the transaction means it is not indexed yet: wait a few seconds and retry, up to about a minute. If it still fails, report the transaction hash and say the certificate is not available yet. Do not report a retirement as complete without the certificate or a confirmed transaction.
Illustrative, with prices as observed on 2026-11-18; they will differ:
User request: Retire 2 kg of carbon for "Acme Robotics", cheapest option. My wallet 0xAbc...123
can sign typed data but holds no ETH.
Inputs: amount 0.002 t; beneficiary "Acme Robotics"; wallet 0xAbc...123; path B (no ETH).
Expected result: the agent quotes the lowest-priced candidates and picks the lowest total, then
stops and shows: Wind Energy - Small Scale, 0.002 t, about 0.027 USDC relayed (0.010 USDC if
the wallet sent it itself), beneficiary "Acme Robotics", irreversible. After the user says yes
it calls prepare-auth, has the wallet sign, posts the request, and returns a certificate link
of the form https://app.carbonmark.com/retirements/id/8453-0x...-0.
A read-only request:
User request: What would it cost to retire 5 tonnes of carbon at under $10 a tonne?
Expected result: the agent calls discover with maxUsdcPricePerTonne=10, quotes 5 tonnes for each
matching class, says how many marketplace listings also match and quotes the cheapest of those
with at least 5 tonnes left, and reports the totals. Nothing is prepared, signed or spent.
422 amount_not_whole_tonnes with the nearest valid amounts. Above the available supply it answers 422 insufficient_liquidity for a class, or 422 for a listing with less left than requested.details fields (beneficiaryLocation, consumptionCountryCode, consumptionPeriodStart, consumptionPeriodEnd); the API names what is missing in 400 puro_details_required.5xx, or 422 contract_revert with errorName: "UnknownError", on quote or prepare can be transient: retry up to twice, a few seconds apart, then report the failure. Do not infer from such an error that the class is unavailable.discover, quote and certificate change nothing, cost nothing and send no personal data.prepare/retire and prepare-auth also change nothing and cost nothing, but they send the wallet address and the beneficiary text to x402.klimalabs.com. Call them only after the user has confirmed.Related skills in this catalog: payment-integration for general payment flows. This skill is specific to carbon retirement and does not replace a wallet or signing skill.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
carbon-credits, carbon-retirement, climate, x402, base, usdc
npx claudepluginhub sickn33/agentic-awesome-skills --plugin agentic-awesome-skills2 plugins in one repository ship this exact skill · first indexed Nov 18, 2026
3,104 skills in this plugin
/007Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project./00-andruia-consultantUsar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un plan de implementación en español./10-andruia-skill-smithUsar para crear o mejorar una skill de Andru.ia: define entradas y resultados, redacta SKILL.md con ejemplos y límites, valida la estructura y prepara una PR.Other plugins' skills for the same job