天气查询 logo

天气查询

Community
lyxhnu
天气查询

查询指定城市的天气情况,并整理成适合直接回复用户的简洁结果。

Overview

Publisherlyxhnu
RepositorySkill-First-Hybrid-RAG
Skill name天气查询
Stars
95
Forks
15
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by lyxhnu on GitHub. Read the source before you install it.

Installation

Install the 天气查询 AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/lyxhnu/Skill-First-Hybrid-RAG/tree/main/backend/skills/get_weather
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lyxhnu/Skill-First-Hybrid-RAG.git /tmp/Skill-First-Hybrid-RAG
mkdir -p .claude/skills
cp -r /tmp/Skill-First-Hybrid-RAG/backend/skills/get_weather .claude/skills/lyxhnu
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable 天气查询 in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads 天气查询 on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so 天气查询 is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

经验教训

[重要提示] wttr.in 接口可能不稳定或无法访问(已在 2026-03-10 遇到多次失败)。 优先使用 Open-Meteo API,更稳定可靠。

[2026-03-10] 当 fetch_url 或 terminal curl 出现超时/失败时,优先使用 python_repl + requests 库。不要重复尝试同一路径。

执行步骤

方案一(优先):Open-Meteo API + python_repl

使用 python_repl 执行:

python
import requests
# 北京坐标
lat, lon = 39.9042, 116.4074
url = f"https://api.open-meteo.com/v1/forecast?latitude={lat}&longitude={lon}&current_weather=true"
resp = requests.get(url, timeout=10)
data = resp.json()

方案二(备用):wttr.in + python_repl

python
import requests
url = "https://wttr.in/Beijing?format=j1"
resp = requests.get(url, timeout=10)
data = resp.json()

方案三(最后手段):fetch_url 或 terminal curl

仅在前两者都失败时尝试,但成功率较低。

故障排查

如果遇到以下情况:

  • fetch_url 返回 "Fetch failed" 或超时
  • terminal curl 超过 30 秒无响应
  • urllib.request 超时

立即切换到 python_repl + requests 库,并设置合理的 timeout 参数(建议 10-15 秒)。

输出格式

用中文给出简明结果,包括:

  • 温度
  • 天气状况(需将 weathercode 转换为中文描述)
  • 风速
  • 数据来源和时间

天气代码对照表(Open-Meteo WMO Code)

  • 0: 晴朗
  • 1-3: 少云/多云
  • 45-48: 雾
  • 51-67: 雨
  • 71-77: 雪
  • 80-82: 阵雨
  • 95-99: 雷暴

Frequently asked questions

What does the 天气查询 AI skill do?

查询指定城市的天气情况,并整理成适合直接回复用户的简洁结果。

Why use 天气查询 on TypingMind?

Because you install it once and use it with any model. 天气查询 is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install 天气查询 in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/lyxhnu/Skill-First-Hybrid-RAG/tree/main/backend/skills/get_weather. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use 天气查询?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with 天气查询?

As many as you like. As long as a model supports skills, you can use 天气查询 with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the 天气查询 AI skill free?

It is published on GitHub by lyxhnu. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇