[] architecture changes
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
---
|
||||
name: weather-fetcher
|
||||
description: Instructions for fetching current weather temperature data for Karachi, Pakistan from wttr.in API
|
||||
---
|
||||
|
||||
# Weather Fetcher Skill
|
||||
|
||||
This skill provides instructions for fetching current weather data.
|
||||
|
||||
## Task
|
||||
|
||||
Fetch the current temperature for Karachi, Pakistan in degrees Celsius (Centigrade).
|
||||
|
||||
## Instructions
|
||||
|
||||
1. **Fetch Weather Data**: Use the WebFetch tool to get current weather data for Karachi from wttr.in API:
|
||||
- URL: `https://wttr.in/Karachi?format=j1`
|
||||
- This returns JSON format weather data
|
||||
|
||||
2. **Extract Temperature**: From the JSON response, extract the current temperature in Celsius from the `current_condition` section.
|
||||
|
||||
3. **Store Result**: Keep the temperature value for the next step (transformation).
|
||||
|
||||
## Expected Output
|
||||
|
||||
After completing this skill's instructions:
|
||||
```
|
||||
Current Karachi Temperature: [X]°C
|
||||
Status: Successfully fetched weather data
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Only fetch the temperature, do not perform any transformations yet
|
||||
- Use wttr.in as it provides reliable, free weather data
|
||||
- Return just the numeric temperature value clearly
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
name: weather-karachi
|
||||
description: Fetch and transform weather data for Karachi. Use when the user asks about Karachi weather, temperature data, or wants to run the weather workflow.
|
||||
model: haiku
|
||||
---
|
||||
|
||||
# Weather Karachi Skill
|
||||
|
||||
Fetch the current temperature for Karachi, Pakistan and apply transformations.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Use the AskUserQuestion tool to ask the user whether they want the temperature in Celsius or Fahrenheit
|
||||
2. Use the weather-fetcher subagent to retrieve the current temperature from wttr.in API in the requested unit
|
||||
3. Use the weather-transformer subagent to read transformation rules from input/input.md and apply them to the temperature
|
||||
4. Write the results to output/output.md
|
||||
|
||||
## Subagent Invocation
|
||||
|
||||
Use the Task tool to invoke subagents sequentially (not in parallel) to maintain data dependencies.
|
||||
|
||||
### Step 1: Fetch Temperature
|
||||
|
||||
Use the Task tool to invoke the weather-fetcher subagent:
|
||||
- subagent_type: weather-fetcher
|
||||
- description: Fetch Karachi temperature
|
||||
- prompt: Fetch the current temperature for Karachi, Pakistan in [unit requested by user] from wttr.in API. Return the numeric temperature value in your final report.
|
||||
- model: haiku
|
||||
|
||||
Wait for the subagent to complete and extract the temperature value from its final report.
|
||||
|
||||
### Step 2: Transform Temperature
|
||||
|
||||
Use the Task tool to invoke the weather-transformer subagent:
|
||||
- subagent_type: weather-transformer
|
||||
- description: Transform temperature
|
||||
- prompt: Apply transformation rules from input/input.md to the temperature value: [X] degrees. Write formatted results to output/output.md.
|
||||
- model: haiku
|
||||
|
||||
Wait for the subagent to complete.
|
||||
|
||||
## Critical Requirements
|
||||
|
||||
1. **Use Task Tool Only**: DO NOT use bash commands to invoke subagents. You must use the Task tool.
|
||||
2. **Sequential Execution**: Launch subagents one at a time, wait for completion before launching the next.
|
||||
3. **Data Passing**: Extract the temperature from weather-fetcher's report and pass it to weather-transformer's prompt.
|
||||
|
||||
## Output Summary
|
||||
|
||||
Provide a clear summary to the user showing:
|
||||
- Temperature unit requested
|
||||
- Original temperature fetched
|
||||
- Transformation rule applied (from input/input.md)
|
||||
- Final transformed result (written to output/output.md)
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
name: weather-transformer
|
||||
description: Instructions for applying mathematical transformations to temperature data based on rules in input/input.md
|
||||
---
|
||||
|
||||
# Weather Transformer Skill
|
||||
|
||||
This skill provides instructions for transforming temperature data.
|
||||
|
||||
## Task
|
||||
|
||||
Apply mathematical transformations to a temperature value and write results to output file.
|
||||
|
||||
## Instructions
|
||||
|
||||
1. **Read Transformation Rules**: Use the Read tool to read `input/input.md` which contains the transformation instructions.
|
||||
|
||||
2. **Apply Transformation**: Apply the transformation rule to the temperature value.
|
||||
- Example: If instruction says "add +10", add 10 to the temperature
|
||||
- Example: If instruction says "multiply by 2", multiply temperature by 2
|
||||
|
||||
3. **Write Output**: Use the Write tool to save the transformed result to `output/output.md` with proper formatting.
|
||||
|
||||
## Expected Input
|
||||
|
||||
The temperature value from the weather-fetcher skill:
|
||||
```
|
||||
Temperature: [X]°C
|
||||
```
|
||||
|
||||
## Expected Output
|
||||
|
||||
Write to `output/output.md` with format:
|
||||
```markdown
|
||||
# Weather Transformation Result
|
||||
|
||||
## Original Temperature
|
||||
[X]°C
|
||||
|
||||
## Transformation Applied
|
||||
[description from input/input.md]
|
||||
|
||||
## Final Result
|
||||
[Y]°C
|
||||
|
||||
## Calculation Details
|
||||
[X]°C [operation] = [Y]°C
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- Read the exact transformation from input/input.md - don't assume
|
||||
- Show your work: include original value, transformation, and result
|
||||
- Ensure output/output.md is properly formatted and readable
|
||||
Reference in New Issue
Block a user