From green-code
Plant trees via Tree-Nation to offset your AI carbon footprint. Use when the user wants to compensate their CO2 emissions. Accepts optional tree count argument.
npx claudepluginhub jeremiesamson/green-code --plugin green-codeThis skill uses the workspace's default tool permissions.
Plant trees via Tree-Nation to compensate the user's AI carbon footprint.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Plant trees via Tree-Nation to compensate the user's AI carbon footprint.
Read ~/.claude/plugins/data/green-code/config.json to verify API key and forest_id are set. If not, tell the user to run /green:config first.
Read ~/.claude/plugins/data/green-code/usage.json to get the current CO2 accumulation.
Determine how many trees to plant:
/green:plant 3), use that number.ceil(accumulated.co2_kg / threshold_co2_kg)Confirm with the user before planting: "You're about to plant {N} tree(s) via Tree-Nation to offset {co2} kg of CO2. Proceed?"
If confirmed, run the planting script:
"${CLAUDE_PLUGIN_ROOT}/scripts/treenation.sh" plant {N}
Parse the output:
OK: -- success. Show the number of trees planted and certificate URLs.ERROR: -- show the error and suggest checking the API key.After successful planting, update the accumulated CO2:
N * threshold_co2_kg from accumulated.co2_kg in usage.jsonShow a summary:
{N} tree(s) planted via Tree-Nation!
CO2 offset: {offset} kg
Total trees planted: {trees.total}
Certificate(s): {urls}