← Back to Skills Marketplace
stevenho1394

Hong Kong Horse Racing

by Steven Ho · GitHub ↗ · v1.2.0 · MIT-0
cross-platform ✓ Security Clean
205
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install hk-horse-racing
Description
Fetches Hong Kong Jockey Club race cards with horse details, odds, and up to 4 recommended picks per race including reasoning and win probability; supports E...
README (SKILL.md)

HK Horse Racing Skill

This skill provides two core functions:

  • Race card data - Fetches Hong Kong Jockey Club race cards for a given date, including meeting details, race conditions, and complete horse data (jockey, trainer, barrier, weight, past runs, gear, win/place odds).
  • Recommended picks - Analyzes the field and returns up to 4 recommended horses per race with reasoning (win odds, barrier, weight, recent form, gear), plus an estimated win probability.

English output only. Additional features: exclude by horse number or barrier, single-race fetch (raceNo), 15‑minute caching, and 60‑second rate limiting between fresh API fetches. Advanced scoring includes trainer/jockey bonuses, barrier effectiveness, and weight penalty.

Repository: https://github.com/StevenHo1394/openclaw/tree/main/skills/hk-horse-racing

Tools

fetchRaceCard(params)

Fetch race card for a given date (default: today in HKT). Includes race details, per-horse win/place odds, and recommendations for each race.

Parameters (object):

  • date (string, optional): Date in YYYY-MM-DD format. Default: today (HKT).
  • classFilter (array of strings, optional): Filter races by class (e.g., ["Class 4"]).
  • excludeHorseNos (array of numbers, optional): List of horse numbers to exclude from the horses array and from recommendations (e.g., [7]).
  • excludeBarriers (array of numbers, optional): List of barrier numbers to exclude from the horses array and from recommendations (e.g., [7]).
  • raceNo (number, optional): If provided, returns only this specific race. Omit to get all races for the date.
  • advancedScoring (boolean, optional): Enable advanced scoring that includes trainer/jockey bonuses, barrier effectiveness, weight penalty, and light weight bonus. Default: false.
  • tjBonusWeight (number, optional): Weight for trainer/jockey combo bonus when advancedScoring=true. Range 0-0.3. Default: 0.15.
  • barrierBonusWeight (number, optional): Weight for barrier effectiveness bonus when advancedScoring=true. Range 0-0.2. Default: 0.12.
  • newsBoost (boolean, optional): When advancedScoring=true, also include news sentiment boost (stub, not implemented). Default: false.
  • lightWeightBonus (number, optional): Bonus for horses with weight \x3C 120lb when advancedScoring=true. Range 0-0.2. Default: 0.05.

Returns (object):

{
  "meeting": {
    "venue": "Happy Valley",
    "date": "2026-03-18",
    "weather": null,
    "trackCondition": "GOOD"
  },
  "races": [
    {
      "raceNo": 2,
      "distance": 1650,
      "class": "Class 4",
      "going": "GOOD",
      "horses": [
        {
          "horseNo": 1,
          "horseName": "MIGHTY STEED",
          "horseId": "HK_2023_J384",
          "weight": 135,
          "jockey": "Z Purton",
          "jockeyAllowance": null,
          "trainer": "K W Lui",
          "pastRuns": [7,7,3,3,7,1],
          "gear": ["CP"],
          "winOdds": 3.2,
          "placeOdds": 1.5
        }
        // ... other runners (SB horses excluded)
      ],
      "recommendations": [
        {
          "horseName": "MIGHTY STEED",
          "reason": "Win odds 3.2; barrier 7; weight 135; recent form avg 4.7; gear: CP; TJ bonus +10.0%; Barrier +2.0%",
          "winProbability": 17.2
        }
        // ... up to 4 best horses
      ]
    }
    // ...
  ],
  "source": "hkjc-api",
  "timestamp": "2026-03-17T17:58:31.793Z"
}

Notes:

  • Stand-by (SB) horses are excluded from the horses list.
  • recommendations are derived from win odds and recent form; only horses with both are considered.
  • Probabilities are normalized implied probabilities from market odds, adjusted by form.
  • When advancedScoring=true, additional bonuses may be applied: top jockey + top trainer combo (+tjBonusWeight), barrier effectiveness (+/- depending on distance class), and weight penalty for horses carrying significantly above average weight.
  • Chinese names: Chinese horse/trainer/jockey names (name_ch fields) may be present in the source data but are not guaranteed to exist. The skill returns English names by default; if an English name is missing, the field shows (no English name). Chinese names are not used in output.

Prerequisites

  • Node.js environment (Node 18+ recommended)
  • Internet access to reach HKJC API (no authentication required)
  • The skill depends on hkjc-api npm package, which will be installed automatically.

Installation

  1. Ensure the skill directory exists: /home/node/.openclaw/workspace/skills/hk-horse-racing/
  2. Run npm install inside that directory to install dependencies. OpenClaw will typically run npm install automatically when the skill is loaded if you set installCommand in the plugin manifest.
  3. Add the skill to the desired agent's allowed skills via openclaw configure or agent config.

Rate Limiting

To avoid overloading the HKJC source, the skill enforces a 1-minute cooldown between fresh API fetches. Cached data (within 15 minutes) is served without delay. If you attempt a fresh fetch sooner than 60 seconds after the previous one, the skill throws an error: Rate limit: please wait Xs before fetching new data.

Notes

  • The HKJC API is unofficial and may have rate limits or downtime.
  • Odds are fetched separately per race (WIN and PLA by default). Additional odds types can be added by modifying the skill.
  • If the API does not return past performance data, that field will be empty.
  • The skill caches results for 15 minutes to reduce load.
  • advancedScoring features are experimental and use heuristics; tune tjBonusWeight, barrierBonusWeight, and lightWeightBonus as needed. Weight penalty and light weight bonus apply automatically when advancedScoring=true.

Troubleshooting

If the skill fails to install or run:

  • Check Node.js version (node --version).
  • Ensure npm install completed without errors (look for hkjc-api in node_modules).
  • Verify outbound network connectivity.
  • Check agent logs for errors.

Version History

v1.2.0

  • Added weight penalty in advanced scoring: horses carrying >2 lb above average weight incur a small score penalty.
  • Added class‑drop bonus stub (requires historical class data to activate).
  • Refined advanced scoring defaults: tjBonusWeight 0.15, barrierBonusWeight 0.12.
  • Added lightWeightBonus (default 0.05) to reward horses under 120 lb in advanced scoring.
  • Expanded top jockey and trainer sets.
  • Clarified Chinese name handling and removed agent‑specific examples.
  • Added disclaimer about betting risk.

v1.1.0

  • Added advanced scoring: trainer/jockey top‑pair bonus, barrier effectiveness by distance, news sentiment placeholder.
  • New parameters: advancedScoring, tjBonusWeight, barrierBonusWeight, newsBoost.
  • Changed license from ISC to MIT.
  • Removed agent‑specific examples (e.g., Jonah).
  • Clarified Chinese name handling: may exist but not guaranteed; English‑only output.

v1.0.0

  • Initial stable release with race card fetch, top 4 recommendations, strict English output, exclusions, single‑race fetch, rate limiting, and caching.

Disclaimer

This skill is provided for informational purposes only. It does not constitute financial or betting advice. The author makes no guarantees regarding the accuracy, completeness, or timeliness of the data and recommendations. You are solely responsible for any betting decisions and any resulting losses. Use this skill at your own risk.


Author: Steven Ho License: MIT

Usage Guidance
This skill appears to do what it says: fetch HKJC race data and compute recommendations. Before installing: (1) Confirm you are comfortable granting the skill outbound network access to fetch HKJC data; (2) Review the hkjc-api npm package (and its recent versions) for reputation and any recent advisories (run 'npm audit'); (3) Note the plugin metadata mentions a Brave-search newsBoost but the code's newsBoost is currently a no-op — be cautious if that feature is later implemented since it could introduce additional network destinations; (4) If you need stricter control, run the skill in a restricted environment (eg. network egress rules) and inspect the installed node_modules after npm install.
Capability Analysis
Type: OpenClaw Skill Name: hk-horse-racing Version: 1.2.0 The HK Horse Racing skill is designed to fetch race card data and provide horse recommendations using the `hkjc-api` library. The implementation in `skill.js` follows the stated purpose, incorporating legitimate features such as 15-minute caching, 60-second rate limiting, and heuristic-based scoring. There is no evidence of data exfiltration, malicious execution, or prompt injection; even the 'newsBoost' feature is a harmless stub that does not perform unauthorized network calls.
Capability Assessment
Purpose & Capability
Name/description match the implementation: skill loads hkjc-api, fetches race data, filters SB horses, computes recommendations with optional advanced scoring. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md and skill.js confine runtime behavior to fetching HKJC race data, caching, rate-limiting, and computing picks. The only minor mismatch: plugin metadata mentions fetching news sentiment via Brave search, while the code's newsBoost is a stub that currently returns 0 (no external web-search performed). Otherwise instructions do not ask to read system files or environment secrets.
Install Mechanism
No special install script besides 'npm install' for declared dependency hkjc-api. package-lock.json shows packages pulled from the public npm registry (no direct downloads from arbitrary URLs or IPs).
Credentials
The skill declares no required environment variables or credentials and the code does not access env vars or config paths. Network access to fetch HKJC data is required and documented.
Persistence & Privilege
Skill does not request 'always: true' or other elevated persistent privileges. It uses an in-memory cache and a local rate-limit timestamp; it does not modify other skills or global agent settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install hk-horse-racing
  3. After installation, invoke the skill by name or use /hk-horse-racing
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.0
v1.2.0 introduces new scoring features and refined recommendations. - Added weight penalty in advanced scoring for horses carrying >2 lb above average weight. - Introduced `lightWeightBonus` parameter (default 0.05) to reward horses under 120 lb when advanced scoring is enabled. - Set new default values: `tjBonusWeight` at 0.15 and `barrierBonusWeight` at 0.12 in advanced scoring. - Added a stub for class-drop bonus (not active without historical class data). - Expanded the sets of top jockeys and trainers. - Updated documentation: clarified Chinese name handling, removed agent-specific examples, and included a betting risk disclaimer.
v1.1.0
**Version 1.1.0 Changelog** - Added advanced scoring for recommendations, including trainer/jockey combo bonuses, barrier effectiveness, and optional news sentiment. - Introduced new parameters: `advancedScoring`, `tjBonusWeight`, `barrierBonusWeight`, and `newsBoost`. - Now English output only; Chinese fields may exist in source but are not used. - Changed license to MIT. - Removed agent-specific references from documentation.
v1.0.0
HKJC Race Card Skill v1.0.0 - Initial stable release. - Provides Hong Kong Jockey Club race card data including meeting details, race conditions, horse info, odds, and up to 4 recommended picks per race with reasoning and win probability. - Supports both English and Chinese modes with strict language adherence. - Features include: filtering/excluding by horse number or barrier, fetching a single race, 15-minute caching, and 60-second rate limiting. - Recommendations are based on win odds, recent form, barrier, weight, and gear. - Barrier info is kept internally and appears in recommendation reasoning; summary display omits barrier per requirements.
Metadata
Slug hk-horse-racing
Version 1.2.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Hong Kong Horse Racing?

Fetches Hong Kong Jockey Club race cards with horse details, odds, and up to 4 recommended picks per race including reasoning and win probability; supports E... It is an AI Agent Skill for Claude Code / OpenClaw, with 205 downloads so far.

How do I install Hong Kong Horse Racing?

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

Is Hong Kong Horse Racing free?

Yes, Hong Kong Horse Racing is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Hong Kong Horse Racing support?

Hong Kong Horse Racing is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Hong Kong Horse Racing?

It is built and maintained by Steven Ho (@stevenho1394); the current version is v1.2.0.

💬 Comments