worldcup-analyzer

技能包数据分析

World Cup Analyzer 是一个面向国家队世界杯比赛的 Agent Skill:封装远程机器学习预测接口,输出胜平负、预期净胜球、赛程/赛果上下文,并内置临时 Key、配额提醒和反投注合规约束。

热度1000Star2Update2026-06-07
暂无实践

README

前往 Source

worldcup-analyzer

ClawHub Python License

Mira/Claude-Code Skill for predicting outcomes of national-team football matches using a remote machine learning API at https://www.jiajielitong.com. Defaults to the 2026 FIFA World Cup; england-premium is reserved for upcoming API support. Statistical analysis only — not betting advice.

Layout

worldcup-analyzer/
├── SKILL.md                  # Skill manifest + agent instructions
├── README.md                 # This file (human-facing)
├── skill-card.md             # ClawHub marketplace card
├── requirements.txt          # Python deps (httpx preferred, requests fallback)
├── scripts/
│   └── wc_client.py          # HTTP client, cache, formatter, validator
├── references/
│   ├── api.md                # Endpoint reference (/teams/, /predict/)
│   ├── team_names.md         # Canonical 48-team list + alias map
│   ├── compliance.md         # HK Cap. 148 refusal templates and rules
│   └── schedule.md           # World Cup schedule/result lookup behavior
└── evals/
    ├── evals.json            # Eval cases
    └── run_evals.py          # Local runner — hits the live API

Quick start

export SOCCER_API_KEY="your_key_here"   # optional permanent key
export WORLDCUP_API_BASE="https://www.jiajielitong.com"   # optional; this is the default
pip install -r requirements.txt
python3 evals/run_evals.py

No permanent key? Agent Skill users can still try the prediction endpoint: the client automatically requests a 24-hour Agent temporary key from POST /matches/agent/temp-key. Each source IP can request one temp key per UTC day, with 2 free prediction credits. Repeating the exact same home/away fixture within 3 days does not consume additional credits. When the temp-key limit is reached, register a permanent API key at https://www.jiajielitong.com.

What the client gives you

FunctionPurpose
request_agent_temp_key()Requests a 24-hour Agent temporary key with 2 free prediction credits per day; cached in process only.
predict_match(home, away, competition="worldcup")Outcome + expected goal diff. Uses SOCCER_API_KEY when set, otherwise an Agent temporary key. 6h in-memory TTL cache.
list_teams(competition="worldcup")Canonical team list from GET /matches/teams/. 12h TTL cache.
validate_team(name, competition)(True, canonical) or (False, fuzzy_suggestion). Cheap — uses cached team list.
format_prediction(data)Margin-aware renderer with mandatory compliance disclaimer. Flags near-draws when `
format_response(body)Appends disclaimer to any custom string.
format_prediction(data, language="zh")Optional Chinese rendering for Chinese user prompts.
format_response(body, language="zh")Optional Chinese disclaimer.
first_use_message(language="zh")First-use onboarding text that explains the 2-per-day free temp key, repeat-query credits behavior, and model-data summary.
quota_warning(data, language="zh")Returns a short heads-up at ≥ 80% quota; points temp-key/plan-exhausted users to https://www.jiajielitong.com for a permanent key; None on unlimited (limit == -1) tier.
canonicalize_team_name(name)Alias map only (no API call).
cache_clear()Reset both predict + teams caches.

Note: the provider does not count additional credits when the exact same fixture is queried again with the same home/away order within 3 days. Reversing home and away is a different fixture.

Demo

ClawHub page: https://clawhub.ai/datatrevor/worldcup-analyzer

Chinese prompt:

用户:巴西主场对摩洛哥,世界杯谁更有可能赢?

Example output:

**Brazil vs Morocco**(模型预测)

- 从 Brazil 视角看的赛果:Win
- 预期净胜球(主队 - 客队):+0.57
- 解读:模型偏向主场的 Brazil
- 赛程:若赛程页已公布,将附上开赛时间;若比赛已结束,将附上最终赛果

仅供统计参考,不构成投注建议。18+。

English prompt:

User: Predict Brazil vs Morocco in the World Cup.

Example output:

**Brazil vs Morocco** (modeled projection)

- Outcome from Brazil's POV: Win
- Expected goal difference (home - away): +0.57
- Interpretation: model favors Brazil at home
- Schedule: kickoff time is included when available; final result is shown for completed fixtures

Statistical reference only. Not betting advice. 18+.

Compliance hard constraints

  • No phrases like recommended bet, sure win, lock, tips, 稳赢, 推荐.
  • Disclaimer is automatic and must not be stripped.
  • Refuse betting picks, stake sizing, bookmaker odds, anyone identifying as under 18.

Schedule/result behavior

After a World Cup prediction, check https://en.wikipedia.org/wiki/2026_FIFA_World_Cup for the fixture. If the page is unavailable or does not show the fixture, fall back to https://baike.baidu.com/en/item/2026%20FIFA%20World%20Cup/1497370#9. If the match is upcoming, include kickoff time. If it has finished, include the final result; when the model's win/draw/loss differs from the actual result, thank the user and say the result has been used to retrain the backend model.

See references/compliance.md for full text + refusal templates.

常见问题

worldcup-analyzer 是什么?
worldcup-analyzer 是一个 AI Agent Skill(智能体技能)。World Cup Analyzer 是一个面向国家队世界杯比赛的 Agent Skill:封装远程机器学习预测接口,输出胜平负、预期净胜球、赛程/赛果上下文,并内置临时 Key、配额提醒和反投注合规约束。
worldcup-analyzer 怎么用?
你可以在 Skill Hub 中国下载 worldcup-analyzer 的 SKILL.md 文件,放入你的项目目录中。AI Agent(如 Claude Code)会自动识别并加载该 Skill,按照其中定义的规则和流程来辅助你完成任务。目前已有 1 篇实践案例可供参考。
worldcup-analyzer 有哪些实践案例?
目前 Skill Hub 中国收录了 1 篇 worldcup-analyzer 的实践案例,涵盖真实项目中的使用场景、操作步骤和踩坑记录。你可以在本页面的「热门实践」区域查看完整列表。
worldcup-analyzer 和 xlsx 有什么区别?
worldcup-analyzer 和 xlsx 都属于「数据分析」类别的 AI Skill。worldcup-analyzer 主要用于World Cup Analyzer 是一个面向国家队世界杯比赛的 Agent Skill:封装远程机器学习预测接口,输。xlsx 则侧重于全面支持公式、格式设置、数据分析和可视化的电子表格创建、编辑和分析。当 Claude 需要处理电子表格(.xlsx、.x。你可以根据具体场景选择最合适的 Skill。