opendota-api
2
总安装量
2
周安装量
#63148
全站排名
安装命令
npx skills add https://github.com/seanandmengjia/openclaw-skills --skill opendota-api
Agent 安装分布
cline
2
github-copilot
2
codex
2
kimi-cli
2
gemini-cli
2
cursor
2
Skill 文档
OpenDota API Skill ð®
Query Dota 2 hero item builds and stats from the OpenDota API.
Features
- Hero Item Builds – Get best items for any hero by win rate from recent matches
- Hero Stats – View recent match performance
- Hero List – Browse all 127 Dota 2 heroes
- Real-time Data – Live data from OpenDota API
Usage
Query Hero Item Builds (Main Feature)
const opendota = require('./opendota.js');
// Get item builds for a hero (analyzes recent matches)
const builds = await opendota.getHeroItemBuilds('Anti-Mage', 5);
console.log(opendota.formatBuilds(builds));
Example Output:
ð¯ **Anti-Mage** - Item Build Analysis
ð Matches Analyzed: 5
ð Record: 3W - 2L (60.0% WR)
**Core Items (Top 10 by Win Rate):**
1. **butterfly** - 100.0% WR | âââ 40.0% (2)
2. **battle_fury** - 75.0% WR | ââââââââ 80.0% (4)
3. **manta** - 66.7% WR | ââââââââââ 100.0% (5)
...
Get Hero Stats
const stats = await opendota.getHeroStats('Pudge');
console.log(stats);
List All Heroes
const heroes = await opendota.getHeroes();
heroes.forEach(h => console.log(h.localized_name));
Get Hero ID by Name
const heroId = await opendota.getHeroId('Crystal Maiden');
console.log(heroId); // Returns hero ID number
API Endpoints Used
GET /heroes– List all heroesGET /heroes/{hero_id}/matches– Get recent matches for a heroGET /matches/{match_id}– Get match details with item data
Rate Limits
OpenDota API limits:
- 1 request per second for anonymous users
- Free tier: 3000 calls/day
- Consider getting an API key: https://www.opendota.com/api-keys
Examples
Best Items for Juggernaut
const result = await opendota.getHeroItemBuilds('Juggernaut', 10);
console.log(opendota.formatBuilds(result));
Check Hero Existence
const heroId = await opendota.getHeroId('FakeHero');
if (!heroId) console.log('Hero not found!');
Get All Carry Heroes
const heroes = await opendota.getHeroes();
const carries = heroes.filter(h => h.roles.includes('Carry'));
carries.forEach(h => console.log(h.localized_name));
Configuration
No configuration required! The skill works out of the box.
Optional: Add API key to skill.json for higher rate limits:
{
"config": {
"apiKey": "your-opendota-api-key"
}
}
Notes
- Item data is analyzed from recent professional/public matches
- Win rates are calculated from the sampled matches
- More matches analyzed = more accurate recommendations
- Default: 10 matches (takes ~1-2 seconds due to rate limiting)
Author
Created for OpenClaw by Assistant
License
MIT