← Back to Skills Marketplace
bettermen

lol-analyst

by bettermen · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
30
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install lol-analyst
Description
英雄联盟数据分析助手。查询召唤师信息、排位数据、对局历史、英雄熟练度,AI智能分析上分策略。需要Riot Games API Key。触发词:查战绩、LOL数据、英雄联盟、排位分析、对局分析、查段位、英雄熟练度、上分建议、lol analyst。
README (SKILL.md)

lol-analyst — 英雄联盟数据分析助手

基于 Riot Games Official API 的 LOL 数据分析 Skill,支持中文自然语言查询。

功能

功能 说明 触发词
🔍 召唤师查询 查询玩家基本信息 查查 {name#tag} 的信息
🏆 排位分析 排位段位、胜率、趋势 看看我的排位 / {name}的段位
📜 对局历史 最近N场对局详情 最近{20}把战绩
⭐ 英雄熟练度 英雄池分析 最擅长的英雄
🎯 AI智能解读 LLM解读数据 分析我需要怎么改进
🆚 英雄对比 多英雄表现对比 对比我的 Jinx vs Caitlyn

前置条件

1. 获取 Riot Games API Key

  1. 访问 Riot Developer Portal
  2. 用你的 Riot Games 账号登录(就是玩LOL的账号)
  3. 登录后自动生成 Development API Key(24小时过期)
  4. 如需永久 Key:注册产品 → 申请 Personal API Key

2. 配置 API Key

在 Skill 首次运行时输入,或设置环境变量:

export RIOT_API_KEY="RGAPI-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

使用示例

# 查询玩家
查查 虎牙丶Uzi#TW2 的信息

# 排位分析
看看 Faker#KR1 的排位

# 对局历史
我最近20把排位战绩

# 英雄分析
对比我的金克丝和凯特琳数据

# AI分析
分析我最近的对局,给上分建议

支持区域

代码 区域
KR 韩国
NA1 北美
EUW1 西欧
EUN1 北欧/东欧
TW2 中国台湾
JP1 日本
BR1 巴西
... 全部13个区域

WorkBuddy 集成

前置条件

# 安装依赖(一次性)
C:/Users/PC/.workbuddy/binaries/python/envs/default/Scripts/pip install riotwatcher

调用方式

WorkBuddy 应通过 CLI 调用此 Skill:

PYTHON_PATH = "C:/Users/PC/.workbuddy/binaries/python/envs/default/Scripts/python.exe"
SKILL_SCRIPT = "C:/Users/PC/.workbuddy/skills/lol-analyst/scripts/lol_analyst.py"

# 配置 API Key
{ PYTHON_PATH } { SKILL_SCRIPT } --setup --api-key "RGAPI-xxx"

# 查询召唤师档案 → 输出 HTML
{ PYTHON_PATH } { SKILL_SCRIPT } --profile --name "name#tag" --region kr --output result.html

# 查询对局历史
{ PYTHON_PATH } { SKILL_SCRIPT } --matches --name "name#tag" --region kr --count 20 --output matches.html

# 综合分析报告
{ PYTHON_PATH } { SKILL_SCRIPT } --analysis --name "name#tag" --region kr --count 20 --output analysis.html

结果呈现

脚本执行后输出 HTML 文件路径(格式:__OUTPUT_FILE__:C:\path o\file.html),WorkBuddy 需:

  1. 读取输出的 HTML 文件路径
  2. 使用 preview_url 打开该 HTML
  3. 用中文给用户解读关键数据

无 API Key 时的处理

如果用户没有 API Key,引导用户:

  1. 访问 https://developer.riotgames.com/
  2. 用 Riot 账号登录(就是玩LOL的账号)
  3. 复制自动生成的 Development API Key(RGAPI-xxx 格式)
  4. 在 WorkBuddy 中执行 lol-analyst --setup --api-key "RGAPI-xxx"

文件结构

lol-analyst/
├── SKILL.md
├── scripts/
│   ├── lol_analyst.py      # 主入口
│   ├── riot_client.py       # Riot API 封装
│   ├── config_manager.py    # 配置管理
│   └── report_generator.py  # HTML 报告生成
└── requirements.txt

技术栈

  • Python 3.10+
  • RiotWatcher (Riot API Python 封装)
  • 纯 Python 标准库 HTML 报告(无外部前端依赖)
Usage Guidance
Install if you are comfortable giving the skill a Riot Games API key and letting it save HTML or JSON reports locally. Prefer setting RIOT_API_KEY as an environment variable; if you use --setup, know that the key is stored in plaintext at ~/.lol-analyst/config.json and should be removed or rotated if the machine is shared or compromised.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
The files match the stated purpose: querying Riot Games data, producing HTML or JSON reports, and supporting profile, ranked, match history, mastery, and analysis workflows.
Instruction Scope
Runtime instructions are scoped to running the bundled Python CLI, installing riotwatcher, configuring RIOT_API_KEY, and opening generated report files; no hidden role changes or unrelated agent instructions were found.
Install Mechanism
There is no installer script; setup is manual through pip install riotwatcher and the Python CLI. The static scan secret finding appears to be triggered by a documented placeholder key pattern, not an actual exposed key.
Credentials
Riot API access and local report writes are proportionate for the skill, and RIOT_API_KEY is declared in the skill metadata. Users should still treat the key as a secret.
Persistence & Privilege
The optional setup command stores the Riot API key in ~/.lol-analyst/config.json as plaintext. This is user-directed and purpose-aligned, but less safe than environment variables or OS credential storage.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lol-analyst
  3. After installation, invoke the skill by name or use /lol-analyst
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- 首发版本,集成英雄联盟召唤师信息、排位、对局、英雄熟练度查询及AI智能分析功能 - 支持中文自然语言多种触发词与指令 - 需用户手动配置 Riot Games API Key,支持全13个区域 - WorkBuddy 集成:支持通过 CLI 执行、多种数据输出 HTML 展示 - 无 API Key 时自动引导用户获取与配置
Metadata
Slug lol-analyst
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is lol-analyst?

英雄联盟数据分析助手。查询召唤师信息、排位数据、对局历史、英雄熟练度,AI智能分析上分策略。需要Riot Games API Key。触发词:查战绩、LOL数据、英雄联盟、排位分析、对局分析、查段位、英雄熟练度、上分建议、lol analyst。 It is an AI Agent Skill for Claude Code / OpenClaw, with 30 downloads so far.

How do I install lol-analyst?

Run "/install lol-analyst" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is lol-analyst free?

Yes, lol-analyst is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does lol-analyst support?

lol-analyst is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created lol-analyst?

It is built and maintained by bettermen (@bettermen); the current version is v1.0.0.

💬 Comments