tjweather天气查询助手

v1.0.3

全球地点天气预报及地理编码分析(TJWeather API)。

0· 204·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for qiansonguio/tjweather.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "tjweather天气查询助手" (qiansonguio/tjweather) from ClawHub.
Skill page: https://clawhub.ai/qiansonguio/tjweather
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: TJWEATHER_API_KEY
Required binaries: python3
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install tjweather

ClawHub CLI

Package manager switcher

npx clawhub@latest install tjweather
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the requested binaries and env var. The skill legitimately needs python3 and an API key to call api.tjweather.com and to perform geocoding/weather analysis.
Instruction Scope
SKILL.md restricts the agent to run the included geocoder.py and tjweather.py scripts and to produce a specific output format. The instructions do not request unrelated credentials or ask the agent to read arbitrary host files; they do require the agent to apply DST judgment, which is reasonable for correct local times.
Install Mechanism
There is no install spec (instruction-only with bundled Python scripts). No external downloads or archive extraction are performed by the skill; risk from installation is minimal.
Credentials
Only TJWEATHER_API_KEY is required (declared as primary). A minor inconsistency: tjweather.py will try to read a local .env in the skill parent directory if the environment variable is missing — this is a narrow fallback to locate the same API key, but it means the script may read a file named .env in the skill tree. README also publishes three 'trial' API keys, which are usable sample keys (not other unrelated secrets).
Persistence & Privilege
Skill is not forced-always and does not request system-wide persistence or modify other skills. Autonomous invocation is allowed (platform default) but not combined with other concerning privilege requests.
Assessment
This skill appears coherent for its stated purpose: it runs the included Python scripts to geocode a location and call the TJWeather API using TJWEATHER_API_KEY. Before enabling: (1) ensure you trust api.tjweather.com (the skill sends location coordinates and queries to that host and possibly to geocoding providers); (2) set a dedicated TJWEATHER_API_KEY in the environment (or the skill will look for a local .env file in the skill directory); (3) be aware the README contains public trial keys — using them may be rate-limited or shared; (4) if you are concerned about leakage, review network egress policies since the scripts perform outbound HTTPS requests to the weather/geocoding services. Otherwise the skill’s requirements and behavior are proportionate to its declared functionality.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🌤️ Clawdis
Binspython3
EnvTJWEATHER_API_KEY
Primary envTJWEATHER_API_KEY
latestvk9716yw6r0ff26wxw8pst1s1jn84s20w
204downloads
0stars
4versions
Updated 2w ago
v1.0.3
MIT-0

TJWeather Skill 🌤️

通过 TJWeather API 查询全球任意地点的天气预报。本工具不仅提供精准的气象数据,还内置了高可靠性的三级地理编码回退逻辑,确保无论用户输入多么模糊,都能得到妥善的处理。


⚠️ 核心配置与准则

[!IMPORTANT] API KEY 获取:本 Skill 依赖环境变量 TJWEATHER_API_KEY。该 Key 已由用户通过 ~/.openclaw/openclaw.json 完成注入。 Agent 禁止行为:严禁向用户索要或询问 API Key。

[!TIP] 预报限制:测试版本最长支持 10 天。若用户查询请求超过此限制,请在回复中礼貌说明,并展示前 10 天的数据。


🛠️ 执行流程 (强制逻辑)

作为 Agent,你必须严格按照以下阶段序列执行任务,不得跳步。

阶段一:地理编码 (Geocoding - CRITICAL)

必须且仅能 使用该内部脚本。禁止 使用内置 Web 搜索获取坐标。

# 执行地理编码查询
python3 {baseDir}/scripts/geocoder.py "{location_query}"

🔍 响应处理深度指引

  • 状态解析:解析 JSON 输出中的 lon, lat, name, source, tz
  • 回退感知 (FALLBACK PROTOCOL)
    • sourceInternal (Enhanced Fuzzy),意味着精确位置无法匹配,已回退到城市级坐标。你必须在回复的首行明确告知用户
    • 逻辑示例:用户查“龙旗广场”,若 Source 为 Internal,回复需包含:“未能找到龙旗广场的精确位置,已自动为您查询所属城市(北京市)的天气。”

阶段二:气象分析 (Weather Analysis)

结合获取的坐标与你对该地点夏令时 (DST) 的最终裁定,调用分析脚本。

# 执行天气预测、统计及大势分析
python3 {baseDir}/scripts/tjweather.py {lon} {lat} "{matched_name}" "{original_query}" {fcst_days} {tz}

[!CAUTION] 时区 (tz) 裁定规则geocoder.py 返回的 tz 是物理经度转换的参考值。你必须运用你的通用知识,确认该地点当前是否处于夏令时(例如:伦敦在 3-10 月间需在 tz=0 基础上 +1),以确保回复时间线完全符合当地习惯。


📝 输出规范 (MANDATORY)

[!IMPORTANT] 回复必须包含以下三个部分,漏掉任何一项均视为任务失败 (FAILED):

  1. 首行自适应提示:包含查询词、匹配结果及(如果有)回退说明。
  2. 数据正文:展示 tjweather.py 返回的所有每日统计(气温、风力、降水等)。
  3. 温润体贴的总结:在底部追加一段 📝 总结。语气需柔和、关怀备至,概括整体趋势并提供生活建议。

完整示例 (Success with Precision)

用户: "北京海淀区上地街道未来3天天气"

你的逻辑:

  1. 调用 geocoder.py "北京海淀区上地街道" -> 返回 source: Nominatim, name: 上地街道, 海淀区, 北京市, 100193, 中国
  2. 确认由于是首选服务成功,无需回退提示。
  3. 调用 tjweather.py 获取数据。

期望输出:

您查询的 北京海淀区上地街道 匹配到 上地街道, 海淀区, 北京市, 100193, 中国,坐标:116.29, 40.04

📅 2026年4月10日 星期五 🌡️ 气温: 7.5°C ~ 26.4°C ... (统计数据)

📝 总结: 上地街道这两天天气晴朗舒适,非常适合户外活动。早晚温差较大,建议您早出晚归时增加一件外套。祝您生活愉快!😊


[!NOTE] 遵循本协议将使你的查询表现出卓越的专业度与拟人化的同理心。

Comments

Loading comments...