{"skill":{"slug":"dota2-stats-skill","displayName":"Dota2-Stats-Skill","summary":"Use this for Dota 2 / DOTA2 / OpenDota questions about players, Steam64/account_id, match_id, heroes, hero matchups, pro matches, teams, leagues, live games,...","description":"---\r\nname: dota2-stats-skill\ndescription: Use this for Dota 2 / DOTA2 / OpenDota questions about players, Steam64/account_id, match_id, heroes, hero matchups, pro matches, teams, leagues, live games, ranks and win rates. Runs a Python standard-library CLI with 27 common OpenDota commands. Default output is Chinese; use --lang en for English. 用于刀塔2/Dota2/DOTA2/OpenDota 查询：玩家战绩、玩家ID、Steam ID、比赛ID、比赛详情、英雄数据、英雄克制、英雄胜率、职业赛事、战队、联赛、实时比赛、段位和胜率。\n---\n\n# Dota 2 Stats Query Skill\n\nThis skill uses a Python script to query Dota 2 data via the [OpenDota API](https://docs.opendota.com/), focused on common player, match, hero, team, league and pro-scene workflows.\n\n## Execution\n\nUse the script from the installed skill directory. Do not assume the current working directory is the skill root unless it has been verified.\n\n### Claude Code\n```bash\npython ~/.claude/skills/dota2-stats-skill/scripts/dota2_query.py <command> [args]\n```\n\n### OpenClaw\n```bash\npython ~/.openclaw/plugin-skills/dota2-stats-skill/scripts/dota2_query.py <command> [args]\n```\n\nWhen already inside this skill directory, the shorter form is also valid:\n\n```bash\npython scripts/dota2_query.py <command> [args]\n```\n\nThe script uses only the Python standard library, so no pip install is required. It needs network access to `https://api.opendota.com/api` and uses browser-like HTTP headers to reduce 403 risk.\n\n## Command Selection\n\n- Player name / 玩家名: use `search <name>` first, then `player <account_id>` and usually `recent <account_id>`.\n- Steam64 ID / Dota 2 account ID / 玩家ID: pass it directly to player commands. The script auto-converts Steam64 IDs to 32-bit account IDs.\n- Match ID / 比赛ID / 比赛详情: use `match <match_id>`.\n- Recent matches / 最近比赛 / 近期战绩: use `recent <account_id>` for a quick view, or `matches <account_id> --limit N` for a filtered list.\n- Win rate / 胜率 / 排位胜率: use `wl <account_id>` with filters such as `--days N`, `--hero_id N`, or ranked lobby `--lobby_type 7`.\n- Hero usage / 常用英雄 / 英雄池: use `heroes <account_id>`.\n- Hero counters / hero matchup / 英雄克制 / 对抗胜率: use `hero_matchups <hero_id>`.\n- Top players for a hero / 绝活玩家 / 英雄排行榜: use `hero_rankings <hero_id>`.\n- Pro scene / 职业比赛 / 职业选手 / 战队 / 联赛: use `pro_matches`, `pro_players`, `teams`, `team <team_id>`, or `leagues`.\n- Live games / 实时比赛 / 正在进行: use `live`.\n- Game constants / 常量 / 物品 / 模式 / 大厅 / 地区 / 版本: use `constants <resource>`.\n\n## Commands (27 total)\n\r\n### Player Commands\r\n```bash\r\npython scripts/dota2_query.py search <name>              # Search for a player (SLOW: 1-2 min)\r\npython scripts/dota2_query.py player <account_id>         # Player info/rank/winrate\r\npython scripts/dota2_query.py wl <id> [--days/--hero_id/--lobby_type]  # Win/loss stats\r\npython scripts/dota2_query.py recent <id>                 # Recent ~20 matches\r\npython scripts/dota2_query.py matches <id> [--limit/--hero_id/--days]  # Full match history\r\npython scripts/dota2_query.py heroes <id> [--limit N]     # Hero usage stats\r\npython scripts/dota2_query.py peers <id> [--limit N]      # Frequent teammates\r\npython scripts/dota2_query.py totals <id> [filters]       # Career totals (kills/assists etc)\r\npython scripts/dota2_query.py counts <id>                 # Categorized stats\r\npython scripts/dota2_query.py rankings <id>               # Player hero rankings\r\npython scripts/dota2_query.py ratings <id>                # Rank history\r\npython scripts/dota2_query.py refresh <id>                # Refresh player data\r\n```\r\n\r\n### Match Commands\r\n```bash\r\npython scripts/dota2_query.py match <match_id>            # Single match details (10 players)\r\n```\r\n\r\n### Hero Commands\r\n```bash\r\npython scripts/dota2_query.py hero_list                   # All heroes list\r\npython scripts/dota2_query.py hero_stats                  # Global hero stats\r\npython scripts/dota2_query.py hero_matchups <hero_id>     # Hero matchup winrates\r\npython scripts/dota2_query.py hero_rankings <hero_id>     # Hero leaderboard (Top players)\r\npython scripts/dota2_query.py benchmarks <hero_id>        # Hero performance benchmarks\r\n```\r\n\r\n### Global / Pro Commands\r\n```bash\r\npython scripts/dota2_query.py pro_players                 # Pro players list\r\npython scripts/dota2_query.py pro_matches [--limit N]     # Pro matches\r\npython scripts/dota2_query.py public_matches [--min_rank] # Public matches\r\npython scripts/dota2_query.py live                        # Live matches\r\npython scripts/dota2_query.py teams [--limit N]           # Teams list\r\npython scripts/dota2_query.py team <team_id>              # Team details+roster+matches\r\npython scripts/dota2_query.py leagues                     # Leagues list\r\npython scripts/dota2_query.py constants <resource>        # Game constants (heroes/items etc)\r\npython scripts/dota2_query.py find_matches --teamA 1,2 --teamB 3,4  # Search by hero lineup\r\n```\r\n\r\n### Common Filters\r\n- `--days N` — Last N days\r\n- `--hero_id N` — Specific hero ID\r\n- `--lobby_type N` — Lobby type (7=Ranked)\r\n- `--game_mode N` — Game mode\r\n- `--limit N` — Limit results\r\n- `--lang zh|en` — Output language (default Chinese)\r\n\r\n## Usage Flow\r\n\r\n### When user provides a player name:\r\n1. `search <name>` → Get account_id\r\n2. `player <id>` → View basic info\r\n3. `recent <id>` → View recent matches\r\n\r\n### Steam ID:\r\n*The tool automatically converts 64-bit Steam IDs to 32-bit Account IDs. You can pass either format.*\r\n\r\n## Rank Tier\r\n\r\n| Tier | English | 中文 |\r\n|------|---------|------|\r\n| 1 | Herald | 先锋 |\r\n| 2 | Guardian | 卫士 |\r\n| 3 | Crusader | 中军 |\r\n| 4 | Archon | 统帅 |\r\n| 5 | Legend | 传奇 |\r\n| 6 | Ancient | 万古流芳 |\r\n| 7 | Divine | 超凡入圣 |\r\n| 8 | Immortal | 冠绝一世 |\r\n\r\n## Notes\n1. Uses only Python standard library - no pip install required\n2. Requires network access to the OpenDota API\n3. Players need to have \"Public Match Data\" enabled\n4. Built-in Chinese names for 127 heroes\n5. Select the output language based on the language used in the user's question, use `--lang en` for English, `--lang zh` for Chinese\n6. **`search` command can be slow** because the OpenDota search endpoint may take a while. When invoking this command, remind the user that it may take some time. If the user already knows the player's Dota 2 account ID, suggest using `player <account_id>` directly for faster results\n","tags":{"latest":"1.0.5"},"stats":{"comments":0,"downloads":502,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":4},"createdAt":1778083029188,"updatedAt":1778492864292},"latestVersion":{"version":"1.0.5","createdAt":1778155644399,"changelog":"- API Compliance: Adjusted parameter passing for pro_matches, public_matches, and teams to align strictly with OpenDota OpenAPI definitions. Safely handled object/array schema parsing discrepancies for team endpoints.\n- Separation of Concerns: Extracted hardcoded game constants (ranks, game modes, lobby types, attributes) from translations.json into a dedicated dota_constants.json file.\n- Performance: Implemented local caching for English hero names (hero_en_names.json) to eliminate redundant network requests and improve command latency.\n- UX Improvement: Added automatic conversion of 64-bit Steam IDs to 32-bit Account IDs in the CLI entry point.\n- Localization: Replaced hardcoded UTC+8 time formatting with local system timezone calculations.\n- Resiliency: Centralized HTTP request logic and introduced an auto-retry mechanism for HTTP 429 Rate Limit responses.\n- Documentation: Updated SKILL.md and README files to reflect the new caching file and automated Steam ID support.\n- Improve skill documentation for agent usage","license":"MIT-0"},"metadata":null,"owner":{"handle":"ssunk","userId":"s17ds8x8ztcm1hfaq0nyw17mks867qdv","displayName":"Ssunk","image":"https://avatars.githubusercontent.com/u/22838310?v=4"},"moderation":null}