From eabba864a97b6b8dd09ef567aa670ea90f1649ad Mon Sep 17 00:00:00 2001 From: Shayan Rais Date: Sun, 26 Apr 2026 16:55:11 +0500 Subject: [PATCH] updated weather workflow --- .../agent-memory/weather-agent/readings.md | 19 +++++++ .claude/agents/weather-agent.md | 53 ++++++++++--------- .claude/skills/weather-fetcher/SKILL.md | 2 + .../claude-subagents-implementation.md | 4 +- .../orchestration-workflow.md | 2 +- orchestration-workflow/output.md | 6 +-- orchestration-workflow/weather.svg | 6 +-- 7 files changed, 60 insertions(+), 32 deletions(-) create mode 100644 .claude/agent-memory/weather-agent/readings.md diff --git a/.claude/agent-memory/weather-agent/readings.md b/.claude/agent-memory/weather-agent/readings.md new file mode 100644 index 0000000..0ea7380 --- /dev/null +++ b/.claude/agent-memory/weather-agent/readings.md @@ -0,0 +1,19 @@ +--- +name: Temperature Readings History +description: Historical record of Dubai temperature readings +type: project +--- + +# Dubai Temperature Readings + +| Date | Time | Temperature | Unit | +|------|------|-------------|------| +| 2026-04-26 | 14:26 | 32.0 | Celsius | +| 2026-04-26 | Current | 32.2 | Celsius | +| 2026-04-26 | 11:00 UTC | 32.0 | Celsius | +| 2026-04-26 | Latest | 89.3 | Fahrenheit | + +## Summary +- Latest reading: 89.3°F (approximately 32.0°C) +- Stable temperature readings across multiple fetches +- Conversion verified: 89.3°F ≈ 32.0°C diff --git a/.claude/agents/weather-agent.md b/.claude/agents/weather-agent.md index 74b9f11..2b3d764 100644 --- a/.claude/agents/weather-agent.md +++ b/.claude/agents/weather-agent.md @@ -1,18 +1,9 @@ --- name: weather-agent -description: Use this agent PROACTIVELY when you need to fetch weather data for Dubai, UAE. This agent fetches real-time temperature from Open-Meteo using its preloaded weather-fetcher skill. +description: Use this agent PROACTIVELY when you need to fetch weather data for Dubai, UAE. This agent fetches real-time temperature by invoking the weather-fetcher skill via the Skill tool. allowedTools: - - "Bash(*)" - "Read" - - "Write" - - "Edit" - - "Glob" - - "Grep" - - "WebFetch(*)" - - "WebSearch(*)" - - "Agent" - - "NotebookEdit" - - "mcp__*" + - "Skill" model: sonnet color: green maxTurns: 5 @@ -47,32 +38,46 @@ hooks: You are a specialized weather agent that fetches weather data for Dubai, UAE. +## Execution Contract (non-negotiable) + +You MUST fetch the temperature by invoking the `weather-fetcher` skill via the **Skill tool**. You are forbidden from: + +- Calling `WebFetch`, `WebSearch`, `curl`, or any HTTP/API tool yourself +- Reading the skill's instructions and executing them inline +- Skipping the Skill tool invocation for any reason (caching, "I already know the value", etc.) + +Your tool allowlist intentionally excludes network tools — if you find yourself needing one, that is a signal you are bypassing the skill. Stop and use `Skill(weather-fetcher)` instead. + ## Your Task -Execute the weather workflow by following the instructions from your preloaded skill: - -1. **Fetch**: Follow the `weather-fetcher` skill instructions to fetch the current temperature +1. **Invoke**: Call the Skill tool with `skill: weather-fetcher` to fetch the current temperature 2. **Report**: Return the temperature value and unit to the caller 3. **Memory**: Update your agent memory with the reading details for historical tracking ## Workflow -### Step 1: Fetch Temperature (weather-fetcher skill) +### Step 1: Invoke weather-fetcher skill -Follow the weather-fetcher skill instructions to: -- Fetch current temperature from Open-Meteo for Dubai -- Extract the temperature value in the requested unit (Celsius or Fahrenheit) -- Return the numeric value and unit +Use the **Skill tool** to invoke the weather-fetcher skill: -## Final Report +``` +Skill(skill: "weather-fetcher") +``` -After completing the fetch, return a concise report: +The skill will fetch the current temperature from Open-Meteo for Dubai and return the temperature value in the requested unit (Celsius or Fahrenheit). Pass the unit preference as part of the invocation context. + +**Fail-closed guardrail**: If the Skill tool invocation does not return a numeric temperature and unit, DO NOT attempt to fetch the data yourself. Report the failure to the caller and stop. + +### Step 2: Final Report + +After the skill returns, provide a concise report to the caller: - Temperature value (numeric) - Temperature unit (Celsius or Fahrenheit) - Comparison with previous reading (if available in memory) ## Critical Requirements -1. **Use Your Skill**: The skill content is preloaded - follow those instructions -2. **Return Data**: Your job is to fetch and return the temperature - not to write files or create outputs -3. **Unit Preference**: Use whichever unit the caller requests (Celsius or Fahrenheit) +1. **Always invoke via Skill tool**: The weather-fetcher skill MUST be invoked through the Skill tool — never inline its instructions +2. **Never call APIs directly**: You have no WebFetch/WebSearch tools by design — do not request them or work around their absence +3. **Return Data Only**: Your job is to fetch and return the temperature — not to write files or create outputs +4. **Unit Preference**: Use whichever unit the caller requests (Celsius or Fahrenheit) diff --git a/.claude/skills/weather-fetcher/SKILL.md b/.claude/skills/weather-fetcher/SKILL.md index 7b4c4ba..846ac07 100644 --- a/.claude/skills/weather-fetcher/SKILL.md +++ b/.claude/skills/weather-fetcher/SKILL.md @@ -2,6 +2,8 @@ name: weather-fetcher description: Instructions for fetching current weather temperature data for Dubai, UAE from Open-Meteo API user-invocable: false +allowed-tools: + - "WebFetch(*)" --- # Weather Fetcher Skill diff --git a/implementation/claude-subagents-implementation.md b/implementation/claude-subagents-implementation.md index ad60eda..2d97c38 100644 --- a/implementation/claude-subagents-implementation.md +++ b/implementation/claude-subagents-implementation.md @@ -27,7 +27,9 @@ name: weather-agent description: Use this agent PROACTIVELY when you need to fetch weather data for Dubai, UAE. This agent fetches real-time temperature from Open-Meteo using its preloaded weather-fetcher skill. -tools: WebFetch, Read, Write, Edit +allowedTools: + - "Read" + - "Skill" model: sonnet color: green maxTurns: 5 diff --git a/orchestration-workflow/orchestration-workflow.md b/orchestration-workflow/orchestration-workflow.md index 9e9c00c..2fc774c 100644 --- a/orchestration-workflow/orchestration-workflow.md +++ b/orchestration-workflow/orchestration-workflow.md @@ -95,7 +95,7 @@ This showcases the **Command → Agent → Skill** architecture pattern, where: - **Location**: `.claude/agents/weather-agent.md` - **Purpose**: Fetch weather data using its preloaded skill - **Skills**: `weather-fetcher` (preloaded as domain knowledge) -- **Tools Available**: WebFetch, Read +- **Tools Available**: Read, Skill - **Model**: sonnet - **Color**: green - **Memory**: project diff --git a/orchestration-workflow/output.md b/orchestration-workflow/output.md index bba46ae..7b50ea6 100644 --- a/orchestration-workflow/output.md +++ b/orchestration-workflow/output.md @@ -1,13 +1,13 @@ # Weather Result ## Temperature -26.2°C +89.3°F ## Location Dubai, UAE ## Unit -Celsius +Fahrenheit ## SVG Card -![Weather Card](weather.svg) +![Weather Card](weather.svg) \ No newline at end of file diff --git a/orchestration-workflow/weather.svg b/orchestration-workflow/weather.svg index b41b84a..3d11482 100644 --- a/orchestration-workflow/weather.svg +++ b/orchestration-workflow/weather.svg @@ -1,6 +1,6 @@ - Unit: Celsius - 26.2°C + Unit: Fahrenheit + 89.3°F Dubai, UAE - + \ No newline at end of file