Cricket Live OpenClaw Plugin & Skill | ClawHub
Looking to integrate Cricket Live into your AI workflows? This free OpenClaw plugin from ClawHub helps you automate coding agents & ides tasks instantly, without having to write custom tools from scratch.
What this skill does
# š Cricket Live **Live cricket scores, IPL tracking, and match alerts for OpenClaw.** Get real-time scores, upcoming schedules, detailed scorecards, and IPL standings ā all from your OpenClaw agent. Powered by [CricketData.org](https://cricketdata.org) API (endpoint: `api.cricapi.com`). --- ## ⨠Features - š“ **Live Scores** ā All currently live matches with real-time scores, overs, and status - š **Match Details** ā Full scorecards with batting and bowling stats - š **Upcoming Matches** ā Next 7 days of scheduled matches, filterable by team - ā **Recent Results** ā Completed matches from the last 3 days - š **IPL Hub** ā Standings, upcoming IPL matches, live scores, and results - š **Match Search** ā Find any match by team name (supports aliases like "MI", "CSK", "AUS") - š **Alerts** ā Cron-ready script for wicket, century, and result notifications - š¾ **Smart Caching** ā Respects API quota with configurable TTL per endpoint - š®š³ **IST by Default** ā All times displayed in Indian Standard Time --- ## š Quick Start ### 1. Get a Free API Key Sign up at [cricketdata.org](https://cricketdata.org) ā the free tier gives you **100 API calls/day**. (CricketData.org's API is served at `api.cricapi.com` ā they are the same service.) ### 2. Set the Environment Variable ```bash export CRICKET_API_KEY="your-api-key-here" # Add to your shell profile or ~/.openclaw/.env for persistence ``` ### 3. Run Any Script ```bash bash scripts/live-scores.sh # What's happening right now? bash scripts/upcoming-matches.sh # What's coming up? bash scripts/ipl.sh standings # IPL points table ``` --- ## š Usage ### Live Scores ```bash bash scripts/live-scores.sh ``` Shows all currently live matches with scores, overs, and match status. **Example output:** ``` š LIVE CRICKET SCORES āāāāāāāāāāāāāāāāāāāāā š“ India vs England ā 3rd Test, Day 2 š®š³ India: 285/6 (78.2 ov) š“ England: 312 (98.4 ov) š India trail by 27 runs š“ Australia vs South Africa ā 1st ODI š¦šŗ Australia: 156/3 (28.1 ov) š In Progress ``` ### Upcoming Matches ```bash bash scripts/upcoming-matches.sh # All upcoming bash scripts/upcoming-matches.sh --team India # Filter by team bash scripts/upcoming-matches.sh MI # Works with aliases ``` **Example output:** ``` š UPCOMING MATCHES (Next 7 Days) āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā š®š³ India vs England ā 4th Test š Ranchi š 16 Feb 2026, 09:30 AM IST š Mumbai Indians vs Chennai Super Kings ā IPL 2026 š Wankhede Stadium, Mumbai š 18 Feb 2026, 07:30 PM IST ``` ### Recent Results ```bash bash scripts/recent-results.sh ``` **Example output:** ``` ā RECENT RESULTS āāāāāāāāāāāāāāāāā š India won by 5 wickets India vs England ā 2nd Test š Visakhapatnam š Australia won by 73 runs Australia vs Sri Lanka ā 3rd ODI š Melbourne ``` ### IPL Hub ```bash bash scripts/ipl.sh standings # Points table bash scripts/ipl.sh upcoming # Upcoming IPL matches bash scripts/ipl.sh live # Live IPL scores bash scripts/ipl.sh results # Recent IPL results ``` ### Match Details (Scorecard) ```bash bash scripts/match-details.sh <match-id> ``` Get match IDs from live-scores or search results. ### Search Matches ```bash bash scripts/search-match.sh "India vs Australia" bash scripts/search-match.sh "MI vs CSK" ``` ### Cricket Alerts (Cron) ```bash bash scripts/cricket-alert.sh ``` Detects wickets, centuries, and match completions since last check. Outputs only when something notable happens ā perfect for cron. --- ## š£ļø Natural Language Mapping | User says | Script | |-----------|--------| | "What's the score?" / "Live scores" | `live-scores.sh` | | "Show me the scorecard for match X" | `match-details.sh <id>` | | "Upcoming matches" / "What's coming up?" | `upcoming-matches.sh` | | "Recent results" / "Who won?" | `recent-results.sh` | | "IPL table" / "IPL standings" | `ipl.sh standings` | | "IPL matches today" | `ipl.sh live` | | "India vs Australia" | `search-match.sh "India vs Australia"` | --- ## āļø Configuration ### `config/cricket.yaml` Main configuration file. API key can be set here or via `CRICKET_API_KEY` env var (env var takes priority). ```yaml api_key: "" # Set via env var recommended favorite_teams: # Teams for alert filtering - India - Mumbai Indians alert_events: # Events that trigger alerts - wicket - century - match_end cache_dir: /tmp/cricket-cache # Cache directory cache_ttl: # Cache TTL in seconds per endpoint live: 120 upcoming: 1800 results: 1800 series: 86400 scorecard: 300 ``` ### `config/teams.yaml` Team name aliases for fuzzy matching. Maps shorthand names (MI, CSK, IND, AUS) to canonical API names. See `config/README.md` for details. --- ## ā° Cron Integration Set up periodic match alerts: ```bash # Check for notable events every 5 minutes during match hours */5 9-23 * * * CRICKET_API_KEY="your-key" bash /path/to/skills/cricket-scores/scripts/cricket-alert.sh # Or use OpenClaw cron: # Schedule cricket-alert.sh to run during IPL match times (7-11 PM IST) ``` The alert script tracks state in `/tmp/cricket-alert-state.json` and only outputs when something new happens (wicket, century, match result). --- ## š API Quota Management | Tier | Calls/Day | Cost | |------|-----------|------| | Free | 100 | $0 | | Pro | 2,000 | $5.99/mo | ### How Caching Helps All scripts cache API responses locally in `/tmp/cricket-cache/`: - **Live scores:** 2 min TTL (fresh during matches) - **Upcoming/Results:** 30 min TTL - **Series info:** 24 hour TTL - **Scorecards:** 5 min TTL ### Budget During a Match Day ~10 list calls + ~50 score checks + 40 ad-hoc = **100 calls** (fits free tier) ### When Quota is Exhausted Scripts show a clear message: *"API quota exhausted (100 calls/day limit reached). Try again tomorrow or upgrade."* --- ## š Output Format All output is messaging-friendly: - No markdown tables (works on WhatsApp, Discord, Telegram) - Bullet point lists with emoji - Times converted to IST - Match IDs included for drill-down --- ## š Requirements - **bash** 4.0+ - **curl** (usually pre-installed) - **jq** ā `apt install jq` or `brew install jq` - **CricketData.org API key** (free) ā sign up at [cricketdata.org](https://cricketdata.org) --- ## š Security Notes - **API key in URL query parameter:** The CricketData.org API (`api.cricapi.com`) requires the API key to be passed as a URL query parameter (`?apikey=...`). This means the key may appear in shell history, process listings, server access logs, and any HTTP proxy/inspection logs. Mitigations: - Set the key via the `CRICKET_API_KEY` environment variable (not hardcoded in config files). - Use the **free tier key** for this skill ā it has limited scope and can be rotated easily. - Avoid running scripts in shared/multi-tenant environments where process arguments are visible to other users. - The CricketData.org API does **not** support header-based authentication, so query-param passing is unavoidable. --- ## š License MIT ā see [LICENSE](LICENSE)
Install
openclaw skills install @harshilmathur/cricket-livenpx clawhub@latest install cricket-liveFull SKILL.md
Open originalSKILL.md content below is scrollable.
š Cricket Live
Live cricket scores, IPL tracking, and match alerts for OpenClaw.
Get real-time scores, upcoming schedules, detailed scorecards, and IPL standings ā all from your OpenClaw agent. Powered by CricketData.org API (endpoint: api.cricapi.com).
⨠Features
- š“ Live Scores ā All currently live matches with real-time scores, overs, and status
- š Match Details ā Full scorecards with batting and bowling stats
- š Upcoming Matches ā Next 7 days of scheduled matches, filterable by team
- ā Recent Results ā Completed matches from the last 3 days
- š IPL Hub ā Standings, upcoming IPL matches, live scores, and results
- š Match Search ā Find any match by team name (supports aliases like "MI", "CSK", "AUS")
- š Alerts ā Cron-ready script for wicket, century, and result notifications
- š¾ Smart Caching ā Respects API quota with configurable TTL per endpoint
- š®š³ IST by Default ā All times displayed in Indian Standard Time
š Quick Start
1. Get a Free API Key
Sign up at cricketdata.org ā the free tier gives you 100 API calls/day. (CricketData.org's API is served at api.cricapi.com ā they are the same service.)
2. Set the Environment Variable
export CRICKET_API_KEY="your-api-key-here"
# Add to your shell profile or ~/.openclaw/.env for persistence
3. Run Any Script
bash scripts/live-scores.sh # What's happening right now?
bash scripts/upcoming-matches.sh # What's coming up?
bash scripts/ipl.sh standings # IPL points table
š Usage
Live Scores
bash scripts/live-scores.sh
Shows all currently live matches with scores, overs, and match status.
Example output:
š LIVE CRICKET SCORES
āāāāāāāāāāāāāāāāāāāāā
š“ India vs England ā 3rd Test, Day 2
š®š³ India: 285/6 (78.2 ov)
š“ England: 312 (98.4 ov)
š India trail by 27 runs
š“ Australia vs South Africa ā 1st ODI
š¦šŗ Australia: 156/3 (28.1 ov)
š In Progress
Upcoming Matches
bash scripts/upcoming-matches.sh # All upcoming
bash scripts/upcoming-matches.sh --team India # Filter by team
bash scripts/upcoming-matches.sh MI # Works with aliases
Example output:
š
UPCOMING MATCHES (Next 7 Days)
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
š®š³ India vs England ā 4th Test
š Ranchi
š 16 Feb 2026, 09:30 AM IST
š Mumbai Indians vs Chennai Super Kings ā IPL 2026
š Wankhede Stadium, Mumbai
š 18 Feb 2026, 07:30 PM IST
Recent Results
bash scripts/recent-results.sh
Example output:
ā
RECENT RESULTS
āāāāāāāāāāāāāāāāā
š India won by 5 wickets
India vs England ā 2nd Test
š Visakhapatnam
š Australia won by 73 runs
Australia vs Sri Lanka ā 3rd ODI
š Melbourne
IPL Hub
bash scripts/ipl.sh standings # Points table
bash scripts/ipl.sh upcoming # Upcoming IPL matches
bash scripts/ipl.sh live # Live IPL scores
bash scripts/ipl.sh results # Recent IPL results
Match Details (Scorecard)
bash scripts/match-details.sh <match-id>
Get match IDs from live-scores or search results.
Search Matches
bash scripts/search-match.sh "India vs Australia"
bash scripts/search-match.sh "MI vs CSK"
Cricket Alerts (Cron)
bash scripts/cricket-alert.sh
Detects wickets, centuries, and match completions since last check. Outputs only when something notable happens ā perfect for cron.
š£ļø Natural Language Mapping
| User says | Script |
|---|---|
| "What's the score?" / "Live scores" | live-scores.sh |
| "Show me the scorecard for match X" | match-details.sh <id> |
| "Upcoming matches" / "What's coming up?" | upcoming-matches.sh |
| "Recent results" / "Who won?" | recent-results.sh |
| "IPL table" / "IPL standings" | ipl.sh standings |
| "IPL matches today" | ipl.sh live |
| "India vs Australia" | search-match.sh "India vs Australia" |
āļø Configuration
config/cricket.yaml
Main configuration file. API key can be set here or via CRICKET_API_KEY env var (env var takes priority).
api_key: "" # Set via env var recommended
favorite_teams: # Teams for alert filtering
- India
- Mumbai Indians
alert_events: # Events that trigger alerts
- wicket
- century
- match_end
cache_dir: /tmp/cricket-cache # Cache directory
cache_ttl: # Cache TTL in seconds per endpoint
live: 120
upcoming: 1800
results: 1800
series: 86400
scorecard: 300
config/teams.yaml
Team name aliases for fuzzy matching. Maps shorthand names (MI, CSK, IND, AUS) to canonical API names. See config/README.md for details.
ā° Cron Integration
Set up periodic match alerts:
# Check for notable events every 5 minutes during match hours
*/5 9-23 * * * CRICKET_API_KEY="your-key" bash /path/to/skills/cricket-scores/scripts/cricket-alert.sh
# Or use OpenClaw cron:
# Schedule cricket-alert.sh to run during IPL match times (7-11 PM IST)
The alert script tracks state in /tmp/cricket-alert-state.json and only outputs when something new happens (wicket, century, match result).
š API Quota Management
| Tier | Calls/Day | Cost |
|---|---|---|
| Free | 100 | $0 |
| Pro | 2,000 | $5.99/mo |
How Caching Helps
All scripts cache API responses locally in /tmp/cricket-cache/:
- Live scores: 2 min TTL (fresh during matches)
- Upcoming/Results: 30 min TTL
- Series info: 24 hour TTL
- Scorecards: 5 min TTL
Budget During a Match Day
~10 list calls + ~50 score checks + 40 ad-hoc = 100 calls (fits free tier)
When Quota is Exhausted
Scripts show a clear message: "API quota exhausted (100 calls/day limit reached). Try again tomorrow or upgrade."
š Output Format
All output is messaging-friendly:
- No markdown tables (works on WhatsApp, Discord, Telegram)
- Bullet point lists with emoji
- Times converted to IST
- Match IDs included for drill-down
š Requirements
- bash 4.0+
- curl (usually pre-installed)
- jq ā
apt install jqorbrew install jq - CricketData.org API key (free) ā sign up at cricketdata.org
š Security Notes
- API key in URL query parameter: The CricketData.org API (
api.cricapi.com) requires the API key to be passed as a URL query parameter (?apikey=...). This means the key may appear in shell history, process listings, server access logs, and any HTTP proxy/inspection logs. Mitigations:- Set the key via the
CRICKET_API_KEYenvironment variable (not hardcoded in config files). - Use the free tier key for this skill ā it has limited scope and can be rotated easily.
- Avoid running scripts in shared/multi-tenant environments where process arguments are visible to other users.
- The CricketData.org API does not support header-based authentication, so query-param passing is unavoidable.
- Set the key via the
š License
MIT ā see LICENSE