Example skill
Skill prakhar1114/ai_mime/src/ai_mime/agent_runner/instructions/example_skill
Fetch the current weather forecast for a specified location and return a structured summary.From its SKILL.md
npx -y skills add prakhar1114/ai_mime --skill example_skillAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- runs commandsInstructs the agent to run 1 command, including `./run.sh [path/to/inputs.json]`.
SKILL.md
2.6 KB, 605 tokens by cl100k_base, as published. Nobody here has run it
Fetch Weather Report Skill
Inputs
location(required, string): The city and state/country to search weather for (e.g. "San Francisco, CA").units(optional, string): The unit system to use, either "metric" or "imperial". Default is "metric".
Run
Run via the executable bash script:
./run.sh [path/to/inputs.json]
Python runtime contract:
run.shuses the first available interpreter in this order: skill.venv/bin/python, workflow.venv/bin/python, then required$AI_MIME_PYTHON_PATH.- If
requirements.txtexists, include these exact build/repair commands for the developer to set up the virtualenv before packaging or for manual troubleshooting:"$AI_MIME_UV_PATH" venv .venv --python "$AI_MIME_PYTHON_PATH" "$AI_MIME_UV_PATH" pip install -r requirements.txt --python .venv/bin/python - State clearly that the install commands are for skill build or manual repair. The automated runtime does not create or repair
.venvwhen executing the skill.
Outputs
weather_summary(dict):location(string): Resolved location name.temperature(float): Current temperature.condition(string): Weather condition description.
Progress logs
The script outputs progress logs on stderr to track execution progress.
All logs must be written in clear, natural language suitable for an end-user overlay. Do not use structured JSON logs.
- "Fetching weather from API..."
- "It is sunny with 18.5 C"
- "Error: API timeout"
Fallback
If the weather API fails or is unreachable, the execution falls back to performing a Google search for current weather and scraping the temperature using browser_harness. See references/fallback_plan.md for manual or automated fallback instructions.
ask_llm decision points
- Weather Condition Parsing:
If the weather condition string returned by the API is fuzzy, the script calls
ask_llmto categorize the weather condition into standard types ("Sunny", "Cloudy", "Rainy", "Snowy", "Unknown").from llm_resolver import ask_llm decision = ask_llm( prompt=f"Categorize this weather description: '{raw_desc}'", schema={ "type": "object", "properties": { "category": {"type": "string", "enum": ["Sunny", "Cloudy", "Rainy", "Snowy", "Unknown"]} }, "required": ["category"] } )
References
- fallback_plan.md: Step-by-step instructions for human/UI agent fallback execution.
What ships with it: 6 files
7.2 KB alongside SKILL.md, 2 of them executable
inputs/
references/
- fallback_plan.md791 B
scripts/
- run.pyruns5.5 KB
- requirements.txt178 B
- run.shruns598 B