This skill uses a Python script to query Dota 2 data via the OpenDota API, focused on common player, match, hero, team, league and pro-scene workflows.
Use the script from the installed skill directory. Do not assume the current working directory is the skill root unless it has been verified.
bash
python ~/.claude/skills/dota2-stats-skill/scripts/dota2_query.py <command> [args]
bash
python ~/.openclaw/plugin-skills/dota2-stats-skill/scripts/dota2_query.py <command> [args]
When already inside this skill directory, the shorter form is also valid:
bash
python scripts/dota2_query.py <command> [args]
The 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.
search <name> first, then player <account_id> and usually recent <account_id>.match <match_id>.recent <account_id> for a quick view, or matches <account_id> --limit N for a filtered list.wl <account_id> with filters such as --days N, --hero_id N, or ranked lobby --lobby_type 7.heroes <account_id>.hero_matchups <hero_id>.hero_rankings <hero_id>.pro_matches, pro_players, teams, team <team_id>, or leagues.live.constants <resource>.bash
python scripts/dota2_query.py search <name> # Search for a player (SLOW: 1-2 min)
python scripts/dota2_query.py player <account_id> # Player info/rank/winrate
python scripts/dota2_query.py wl <id> [--days/--hero_id/--lobby_type] # Win/loss stats
python scripts/dota2_query.py recent <id> # Recent ~20 matches
python scripts/dota2_query.py matches <id> [--limit/--hero_id/--days] # Full match history
python scripts/dota2_query.py heroes <id> [--limit N] # Hero usage stats
python scripts/dota2_query.py peers <id> [--limit N] # Frequent teammates
python scripts/dota2_query.py totals <id> [filters] # Career totals (kills/assists etc)
python scripts/dota2_query.py counts <id> # Categorized stats
python scripts/dota2_query.py rankings <id> # Player hero rankings
python scripts/dota2_query.py ratings <id> # Rank history
python scripts/dota2_query.py refresh <id> # Refresh player data
bash
python scripts/dota2_query.py match <match_id> # Single match details (10 players)
bash
python scripts/dota2_query.py hero_list # All heroes list
python scripts/dota2_query.py hero_stats # Global hero stats
python scripts/dota2_query.py hero_matchups <hero_id> # Hero matchup winrates
python scripts/dota2_query.py hero_rankings <hero_id> # Hero leaderboard (Top players)
python scripts/dota2_query.py benchmarks <hero_id> # Hero performance benchmarks
bash
python scripts/dota2_query.py pro_players # Pro players list
python scripts/dota2_query.py pro_matches [--limit N] # Pro matches
python scripts/dota2_query.py public_matches [--min_rank] # Public matches
python scripts/dota2_query.py live # Live matches
python scripts/dota2_query.py teams [--limit N] # Teams list
python scripts/dota2_query.py team <team_id> # Team details+roster+matches
python scripts/dota2_query.py leagues # Leagues list
python scripts/dota2_query.py constants <resource> # Game constants (heroes/items etc)
python scripts/dota2_query.py find_matches --teamA 1,2 --teamB 3,4 # Search by hero lineup
--days N — Last N days--hero_id N — Specific hero ID--lobby_type N — Lobby type (7=Ranked)--game_mode N — Game mode--limit N — Limit results--lang zh|en — Output language (default Chinese)search <name> → Get account_idplayer <id> → View basic inforecent <id> → View recent matchesThe tool automatically converts 64-bit Steam IDs to 32-bit Account IDs. You can pass either format.
TierEnglish中文1Herald先锋2Guardian卫士3Crusader中军4Archon统帅5Legend传奇6Ancient万古流芳7Divine超凡入圣8Immortal冠绝一世
--lang en for English, --lang zh for Chinesesearch 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