sharath1992

Weather And Environmental AI Agent — AI skill for Claude Code

AI community

An autonomous AI agent built with Claude and the free Open-Meteo APIs.

How to install Weather And Environmental AI Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open sharath1992/Weather-And-Environmental-AI-Agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Weather And Environmental AI Agent does

An autonomous AI agent built with Claude and the free Open-Meteo APIs. Give it a city name and it plans its own steps: it finds the coordinates, pulls the weather forecast, air quality, and marine data, writes a styled HTML dashboard, and saves the report to disk.

Alternatives in AI

  • WindsurfAPI — Turn Windsurf / Devin Desktop's 100+ AI models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, SWE) into OpenAI-, A 3k ★
  • Anthropic SDK TypeScript — Access to Anthropic's safety-first language model APIs in TypeScript 2.1k ★
  • Room — Open-source earning-focused swarm intelligence engine 838 ★

README

Weather & Environmental Reporting Agent

An autonomous AI agent built with Claude and the free Open-Meteo APIs. Give it a city name and it plans its own steps: it finds the coordinates, pulls the weather forecast, air quality, and marine data, writes a styled HTML dashboard, and saves the report to disk.

The project is a hands-on example of the ReAct (Reason + Act) pattern, tool use with the Claude API, and agent orchestration in plain Python, with no agent framework.

Agent Workflow

!workflow

Features

  • Autonomous planning. Claude decides which tools to call, in what order, and when it has enough data to finish.
  • Five tools. Geocoding, weather forecast, air quality, marine conditions, and saving the HTML file.
  • Graceful adaptation. Inland cities have no marine data, so the agent notices this and leaves that section out instead of failing.
  • Layered error handling. Tool failures, network errors, and API rate limits are caught and handled without crashing the agent.
  • Retries with exponential backoff. Temporary Claude API errors are retried automatically (2s → 4s → 8s).
  • Safety limits. An iteration cap stops runaway loops, and filename sanitization prevents path traversal.
  • Visible reasoning. Claude's thinking between tool calls is printed to the console.

How It Works

Orchestration

The agent has three parts, and each has a clear job:

**Python (`run_weather_agent`)** - Orchestrator - Runs the loop, calls the Claude API, executes tools, stores the conversation history, and enforces the safety limits. **Claude (`claude-sonnet-4-6`)** - Decision maker - Reads the conversation, decides which tool to call next and with what arguments, interprets the results, and writes the HTML report. **Tools + Open-Meteo APIs** - Workers - Fetch real data or write the file, and return results as dictionari