Introduction¶
In hosts like OpenClaw and Cursor, a simple user request like “Give me five Double Color Ball tickets” or “Generate numbers again tomorrow morning” can easily trigger generic conversation: the model might invent numbers, guess the drawing time, or mistake a “scheduled time” for “immediate generation.” However, lottery games have fixed rules, and drawing data comes from public sources. If number selection, prize verification, and period binding are left to the large language model to improvise, it is neither reliable nor suitable for local bookkeeping or scheduled tasks.
The following is an introduction to the SkillHub community Skill lotto-agent (Coordinate @user_50aae3d0/lotto-agent, current version 1.2.0). It delegates intent understanding to the Agent, while handing over number selection, drawing data scraping, prize verification, and SQLite storage to Python scripts. It also defines scheduling rules for natural language and time expressions.
What is this¶
lotto-agent is an ai-agent category Skill (Source: community) listed on SkillHub by the publisher user_50aae3d0. The SkillHub page indicates requires_api_key=false, meaning no additional API Key is needed.
In terms of positioning, the README specifies it as a “personal use lottery Agent Skill” that can run under OpenClaw, custom hosts, or the command line. The Skill does not promise wins or make predictions; random number selection uses secrets.SystemRandom(), and prize verification and reporting are handled by rule-based code.
Core Features¶
Based on SKILL.md and README.md, the verified capabilities are as follows.
Lottery Types and Rules¶
Supports 8 lottery types: Double Color Ball, Super Lotto, Seven Star String, Seven乐彩 (Seven乐Color), Fucai 3D, P3 (Pailie 3), P5 (Pailie 5), and Happy 8. Generation and prize verification rules are maintained in config/rules.json.
CLI Entry and 13 Actions¶
Unified entry point:
python scripts/cli.py <action> [options]
| action | Description |
|---|---|
status |
Health check and database path |
generate |
Select numbers and store in DB (automatically binds to next period) |
check_prize |
Check prizes based on scraped drawing data |
fetch_draw |
Scrape public drawing data |
report |
Reports (--since N, default 30 days) |
cancel |
Cancel the most recent N bets |
record |
Manually enter numbers |
create_task / list_tasks / disable_task |
Create, list, and disable automatic tasks |
cron_run |
Cron entry point (recommended to call every 30 minutes) |
setup_notify |
Configure OpenClaw push notifications |
parse |
Parse natural language into action and parameters |
Natural Language and Time Iron Rules¶
The Skill requires: When lottery-related terms (such as Double Color Ball, Super Lotto, number selection, drawing, prize verification, reports, etc.) appear in a message, this Skill should be invoked.
Two hard rules are written at the beginning of the documentation:
- Future Time Words: When future time expressions like “tomorrow,” “Wednesday,” “evening,” or “X o’clock” appear, it must go through
create_task; do not usegeneratefor immediate number output. Only usegeneratewhen the user explicitly says “now,” “immediately,” “at once,” etc. - Ask Back First: When the date or time period is incomplete, first run
parse --text "<original text>". Ifneeds_clarification=trueis returned, ask the user back with themessage_text; do not default to filling in values like 09:00 or “today.”
The recommended flow is to first run parse, then dispatch to specific commands based on the returned action.
Data, Drawing Sources, and Push Notifications¶
- Default database path:
~/.openclaw/workspace/lotto-agent-data/lottery.db, can be overridden by theLOTTO_AGENT_DATA_DIRenvironment variable. - Default base URL for public drawing data:
https://raw.githubusercontent.com/wenjinliuu/lottery-data-repo/main/public_data, can be overridden byLOTTERY_PUBLIC_DATA_BASE_URL. - Push notifications only support OpenClaw CLI (
openclaw message send), configured viasetup_notifywritten into thenotifysection ofconfig/config.json.
requirements.txt notes that v2 uses only the Python standard library, with no third-party runtime dependencies.
Installation and Activation¶
Installing the Skill Package via SkillHub¶
The installation instructions provided on the SkillHub page are: Install the coordinate @user_50aae3d0/lotto-agent according to the SkillHub Installation Documentation.
Given that the skillhub CLI is already installed, the --dir flag must be used during installation to point to the current Agent’s skills directory; otherwise, the default installation to ./skills/ might not be recognized. Example from the documentation:
command -v skillhub && skillhub --version
skillhub install @user_50aae3d0/lotto-agent --dir <skills directory>
Common paths (excerpted from the installation documentation):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
If the CLI is not installed, the installation documentation provides:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
Python Environment and Dependencies¶
Enter the Skill directory and deploy the script environment:
pip install -r requirements.txt
python scripts/cli.py status
Typical Usage¶
Parse Natural Language Before Executing¶
python scripts/cli.py parse --text "明天早上给我5注双色球"
Documentation example: A complete time period will map to create_task; if only saying “give me 5 Super Lotto tickets tomorrow” without a time period, needs_clarification=true will be returned, and the user must be asked for clarification first.
Example of immediate number output (including immediate terms):
python scripts/cli.py generate --lottery ssq --count 5 --text "现在给我5注双色球"
Number Selection, Scraping, Prize Verification, and Reports¶
python scripts/cli.py generate --lottery dlt --count 5 --multiple 2 --text "给我5注大乐透2倍"
python scripts/cli.py fetch_draw --lottery all --message-text
python scripts/cli.py check_prize --message-text
python scripts/cli.py report --since 7 --message-text
python scripts/cli.py record --lottery dlt --text "01 05 12 18 30 + 02 09" --multiple 2 --additional
Scheduled Tasks and cron¶
Example of creating a one-time task (parameter format from documentation):
python scripts/cli.py create_task --task-action generate --schedule-kind once --schedule-spec 2026-05-15 --time-start 07:00 --time-end 12:00 --random-window --params '{"lottery":"ssq","count":5}'
It is recommended to wake up every 30 minutes on the server side (path needs to be modified according to the actual Skill installation location):
*/30 * * * * cd /root/.openclaw/workspace/skills/lotto-agent && python3 scripts/cli.py cron_run --push
Message Output Format¶
generate / record should split into two messages: the first containing only the number block; the second sending the hint from followup_messages. The number block format has a fixed template in SKILL.md (Lottery Type, Count, Multiple, Drawing Day, Investment, and Number Rows).
Applicable Scenarios and Notes¶
Who is it for: Users who need to manage personal lottery records within Agent conversations—random number selection, pulling public drawings, rule-based prize verification, weekly/monthly P&L reports, scheduled number generation, or automatic prize verification after drawings—and are willing to use local SQLite for ticket storage. The host side must be able to execute python scripts/cli.py and adhere to the triggering and time rules in the Skill.
Limitations and Notes:
- Number selection does not cross-reference bets, nor does it optimize for hot/cold numbers or “improving winning rates”; the documentation explicitly rejects claims of guaranteed wins or steady profits.
- Public drawing repositories may contain placeholder data before the drawing;
next_buy_end_timeis more reliable thannext_issue; drawing day determination should use thedrawstable and calendar logic as per documentation to avoid misusingnext_fallback. - Push notifications rely on the OpenClaw CLI, and only allow
openclawin the PATH; custom executable paths are not allowed. - SkillHub Statistics (based on scraped data): Rating 100000, Downloads 909, Category ai-agent; even after installation, you still need to configure cron, data directories, and notification channels yourself.
Conclusion¶
lotto-agent converges lottery-related conversations into a reproducible CLI and SQLite data flow: The Agent is responsible for understanding natural language and displaying results, while Python handles rules and data. If you are searching for ai-agent tools on SkillHub, you can install via the official coordinates and enable it in the skills directory of environments like Cursor.
- SkillHub Page: https://www.skillhub.cn/skills/user_50aae3d0/lotto-agent
- API Coordinate Page: https://api.skillhub.cn/user_50aae3d0/lotto-agent
- Installation Instructions: https://skillhub.cn/install/skillhub.md