Skip to content

netz888/worldcup-deep-analysis

Repository files navigation

worldcup-deep-analysis ⚽

A Claude Code skill for deep, data-rich World Cup match analysis — squads, injuries, coaches, referee tendencies, venue / altitude / weather, plus calibrated win-draw-loss and scoreline probabilities.

Entertainment only — not betting advice.

🌐 Live website: wc.netzfs.com · source: netz888/WORLD-CUP-AI-HUB (Next.js). 在线网站:wc.netzfs.com · 源码: netz888/WORLD-CUP-AI-HUB(Next.js)。

✅ Status

Sub-project 1 (self-contained skill) is implemented. The skill, its references, templates, the analysis-JSON schema, a trained Elo multi-factor prediction engine (tools/predict.mjs), a zero-dependency validator, and a full Brazil-vs-Morocco sample are all in the repo. See the design spec in docs/superpowers/specs/.

🧠 Trained prediction engine

Probabilities come from a v6 Elo multi-factor engine (worldcup-deep-analysis/tools/predict.mjs), grid-searched + leave-one-tournament-out cross-validated on 192 real World Cup group-stage matches (2010 / 2014 / 2018 / 2022). Train vs validation exact-score hit rate is ~16.1% vs ~16.7% (no overfitting); 1X2 direction ~55%. Exact-score accuracy has a physical ceiling (~16–17%) — the engine is honest about it. Details: references/prediction-model.md.

Install & use

The skill is self-contained — no paid API, no keys. Node runs the trained prediction engine and the validator.

  1. Copy the skill into your Claude Code skills directory:
    cp -r worldcup-deep-analysis ~/.claude/skills/
  2. In Claude Code, invoke it by describing a fixture, e.g. "分析一下巴西对摩洛哥" or "今天北京时间6点那场世界杯怎么看". The skill confirms the fixture/timezone, gathers data, calls the trained engine for probabilities, and writes a Chinese report (and, on request, a mobile-first HTML page).
  3. The skill calls the prediction engine automatically; you can also run it standalone:
    node worldcup-deep-analysis/tools/predict.mjs --rankHome 9 --rankAway 82 --host neutral
    # optional factors: --alt <m> --kaHome/--kaAway <n> --formHome/--formAway <x>
  4. Validate any analysis JSON against the contract (zero dependencies):
    npm run validate                                  # checks samples/brazil-morocco.json
    node tools/validate-analysis.mjs <your-analysis.json>

See samples/ for a complete worked example (.json, .report.md, .html).

Repo layout

worldcup-deep-analysis/
  SKILL.md                      skill entry (workflow + rules)
  references/                   dimensions, scoreline-math, prediction-model, sources, disclaimer
  templates/                    Markdown + mobile HTML report templates
  tools/predict.mjs             trained v6 Elo multi-factor engine (zero-dep, runnable)
schema/analysis.schema.json     analysis-JSON contract (draft-07)
tools/validate-analysis.mjs     zero-dependency validator
samples/                        Brazil vs Morocco worked example
  • Schedule / timezone (selectable) & qualification scenarios
  • Squads — predicted/confirmed XI, bench, key players, season form
  • Absences — injuries, suspensions, fitness doubts
  • Coaches — style, formation, stability, in-match adjustments (inferred, labelled)
  • Referee crew — tendencies (cards/penalties/added time) & psychological read (inferred)
  • Venue & environment — pitch, altitude, weather, crowd lean, travel
  • Head-to-head, market odds, and a calibrated probability model powered by the trained v6 Elo multi-factor engine (1X2, scoreline distribution, over/under, BTTS, xG, scenarios)

Hard data is cited with sources & timestamps; model/LLM inferences are explicitly labelled.

🌐 Live website

A full World Cup match-analysis web app built on this project is deployed and open-source:

📄 License

MIT

⚠️ Disclaimer

This project is a statistical & AI-assisted analysis tool for entertainment and discussion only. Predictions carry inherent uncertainty; historical accuracy does not guarantee future results. Not gambling advice.


worldcup-deep-analysis(中文)⚽

一个用于世界杯比赛深度分析Claude Code skill:阵容、伤停、教练、裁判倾向、 球场/海拔/天气,以及经过校准的胜平负与比分概率。

仅供娱乐,非投注建议。

✅ 当前状态

子项目 1(自包含 skill)已实现。 skill 本体、参考文件、模板、「分析 JSON」schema、 训练好的 Elo 多因子预测引擎tools/predict.mjs)、零依赖校验器、以及一份完整的 巴西vs摩洛哥范例都已在仓库中。设计文档见 docs/superpowers/specs/

🧠 训练好的预测引擎

概率来自 v6 Elo 多因子引擎worldcup-deep-analysis/tools/predict.mjs),在 2010 / 2014 / 2018 / 2022 四届世界杯小组赛共 192 场真实赛果上做网格搜索 + 留一届交叉验证 训练而成。训练集 vs 验证集精确比分命中 ~16.1% vs ~16.7%(未过拟合);1X2 方向命中 ~55%。 精确比分命中存在物理上限(~16–17%),引擎对此诚实标注。详见 references/prediction-model.md

安装与使用

skill 自包含 —— 无需付费 API、无密钥。 Node 用于运行训练好的预测引擎与校验器。

  1. 把 skill 复制到你的 Claude Code skills 目录:
    cp -r worldcup-deep-analysis ~/.claude/skills/
  2. 在 Claude Code 里用自然语言触发,例如:"分析一下巴西对摩洛哥""今天北京时间6点那场世界杯怎么看"。skill 会确认对阵/时区、搜集数据、调用训练好的引擎 算概率,产出中文报告(并可按需生成移动端 HTML 页面)。
  3. skill 会自动调用预测引擎;你也可以单独运行:
    node worldcup-deep-analysis/tools/predict.mjs --rankHome 9 --rankAway 82 --host neutral
    # 可选因子:--alt <海拔米> --kaHome/--kaAway <核心缺阵数> --formHome/--formAway <近期净胜球趋势>
  4. 用零依赖校验器检查分析 JSON 是否符合契约:
    npm run validate                                  # 校验 samples/brazil-morocco.json
    node tools/validate-analysis.mjs <你的分析.json>

完整范例见 samples/(含 .json / .report.md / .html)。

它做什么

给定一场比赛(如"巴西 vs 摩洛哥",或"今天北京时间 6 点那场"),skill 会先确认对阵与时区, 逐维度搜集数据、估算概率,输出深度分析报告(+ 可选移动端 HTML):

  • 赛程 / 时区(可选)与出线形势
  • 阵容 —— 预测/确认首发、替补、核心球员、赛季状态
  • 伤停 —— 伤病、停赛、出场存疑
  • 教练 —— 风格、阵型、稳定性、临场调整 (推断,会标注)
  • 裁判组 —— 倾向(场均牌/点球/补时)与"心理"解读 (推断)
  • 场地与环境 —— 草皮、海拔、天气、球迷倾向、旅行
  • 历史交锋市场赔率、以及由训练好的 v6 Elo 多因子引擎驱动的校准概率模型 (1X2、比分分布、大小球、BTTS、xG、情景推演)

硬数据标注来源与时间;模型/LLM 的推断会明确标注,不伪装成数据。

🌐 在线网站

基于本项目构建的完整世界杯赛事分析网站已部署上线、源码开源:

⚠️ 免责声明

本项目为统计与 AI 辅助的赛事分析工具,仅供娱乐与讨论;预测存在固有不确定性, 历史准确率不代表未来结果。非赌博建议。

About

A Claude Code skill for deep World Cup match analysis: squads, injuries, coaches, referee tendencies, venue, altitude & weather, plus calibrated win/draw/loss and scoreline probabilities. Entertainment only, not betting advice. 世界杯比赛深度分析 Skill:覆盖阵容、伤病、主教练、裁判倾向、比赛场地、海拔与天气等因素,并提供校准后的胜/平/负概率及比分概率预测

Resources

License

Contributing

Stars

9 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors