Introduction¶
When reviewing ETF market data, a common approach is to open a trading terminal and flip through each ETF one by one, or to write your own script to call data APIs and stitch together tables. Once the data volume grows, you also need to handle concurrency, caching, and empty (invalid) batches, which makes maintenance costs non-trivial. This article introduces a SkillHub community Skill: “ETF Daily Report V2.4” (locator @user_861fb6c9/etf, version 2.4.0). It encodes querying, sorting, exporting, and an optional scheduled daily-report workflow into SKILL.md plus accompanying Python scripts, so that Agents that support Skills (such as Cursor or Claude Code) can execute according to the documentation instead of requiring you to restate requirements from scratch every time.
What Is It¶
“ETF Daily Report V2.4” is a SkillHub-listed, community-sourced Skill (source: community) published by user_861fb6c9. It is categorized under data-analysis, with subcategories including “data visualization” and “report generation.” The SkillHub page does not provide a Chinese overview body (hasOverview: false, and the summary field is empty); capabilities are determined by SKILL.md, INSTALL_CRON.md, and scripts/ inside the archive.
Official entry points:
- API URL: https://api.skillhub.cn/user_861fb6c9/etf
- SkillHub page: https://www.skillhub.cn/skills/user_861fb6c9/etf
Tags indicate requires_api_key=false, meaning installing this Skill does not require configuring a third-party API key. However, fetching market quotes still depends on a network environment that can access Tencent Finance’s data endpoints.
Core Features¶
Based on the contents of the v2.4.0 archive, the current deliverables mainly include:
| Path | Purpose |
|---|---|
scripts/etf_ranking_v2.4.py |
Primary query: concurrent fetching, filtering, and gainers/losers ranking |
scripts/etf_daily_report_v2.4.py |
Invokes the ranking script; supports --send-email to send a daily report via email |
scripts/extended_etf_codes.py |
ETF code list |
etf.sh |
Shell entry point wrapping calls to etf_ranking_v2.4.py |
SKILL.md |
Usage and performance notes that Agents should follow |
INSTALL_CRON.md |
Cron/scheduled-task setup and email environment variables |
Market data and filtering (etf_ranking_v2.4.py)
- Starting from the codes in
extended_etf_codes, it filters down to roughly 830 mainstream ETFs usingMAINSTREAM_PREFIXES, reducing unnecessary requests. - It queries Tencent Finance endpoints (
qt.gtimg.cn) in batches (the documentation states GBK encoding and fields including price change % and turnover, etc.). - By default, it filters out instruments with turnover below 5 million (currency units implied by the data source). It supports an empty-batch record file
empty_batches.jsonto skip historically empty batches. - Concurrency (the documentation example uses
concurrency=20), retry-on-failure, and a cache with approximately 5-minute TTL are configurable.
Output
Each run can generate timestamped text reports, as well as csv and json files (filename patterns are specified in SKILL.md, e.g., etf_ranking_YYYYMMDD_HHMMSS.txt).
Daily report and automation
etf_daily_report_v2.4.pyinvokesetf_ranking_v2.4.pyvia a subprocess and supports--top Nto control the length of the ranking list.- Email depends on environment variables
EMAIL_TO,SMTP_USER, andSMTP_PASS, with optionalSMTP_SERVER(defaultsmtp.qq.com) andSMTP_PORT(default465). If not configured, the script skips sending and prints a reminder. INSTALL_CRON.mdprovides a crontab example to run at 14:30 on trading days, as well as an OpenClaw-stylescheduled_tasksJSON example (whether it applies depends on whether the Agent you use supports that configuration).
Performance data in the documentation
SKILL.md reports that in a test environment on Linux with Python 3.11 and roughly 830 mainstream ETFs, v2.4 completes a single query in about 0.79 seconds—orders of magnitude faster than v2.1’s ~25.36 seconds. This is a target for local reproduction, not a performance guarantee provided by the SkillHub platform.
Installation and Activation¶
The installation method recommended by SkillHub is to have your Agent read the official installation instructions and install the specified Skill locator:
Please follow https://skillhub.cn/install/skillhub.md to install @user_861fb6c9/etf.
If you already have the SkillHub CLI installed, follow skillhub.cn/install/skillhub.md to install the Skill into your Agent’s skills directory (--dir is required; otherwise the default ./skills/ may not be recognized):
command -v skillhub && skillhub --version
skillhub install @user_861fb6c9/etf --dir ~/.cursor/skills/
Common directories (excerpted from the same documentation):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
The SkillHub detail page also provides a direct Zip download link (the page lists version 2.4.0):
https://api.skillhub.cn/api/v1/download?slug=@user_861fb6c9/etf
After extracting, place the directory into one of the skills paths above, or keep it inside your project and ask your Agent to read SKILL.md in that directory during conversation.
Runtime dependencies
The scripts use Python 3 and import libraries such as requests and pandas. etf.sh and some examples include a prefix like PYTHONPATH=/mnt/workspace/lib/python3.11/site-packages, which is a path from the author’s environment. On your own machine, change it to a Python environment where dependencies are installed, or run pip install to install the required packages yourself.
Most example paths in the documentation are under /root/.openclaw/skills/etf-analysis/. After installing into Cursor, replace the paths in commands with your actual Skill directory.
Typical Usage¶
1. Query top gainers/losers via command line (default TOP 15)
Run from the Skill root directory (replace SKILL_ROOT with your installation path):
export SKILL_ROOT="$HOME/.cursor/skills/@user_861fb6c9/etf"
python3 "$SKILL_ROOT/scripts/etf_ranking_v2.4.py"
python3 "$SKILL_ROOT/scripts/etf_ranking_v2.4.py" --top 10
Or use the included launch script:
cd "$SKILL_ROOT"
./etf.sh --top 20
2. Generate a daily report and attempt to send it via email
Configure mailbox environment variables first (do not commit real passwords):
export EMAIL_TO="your@example.com"
export SMTP_USER="your@example.com"
export SMTP_PASS="your_smtp_auth_code"
python3 "$SKILL_ROOT/scripts/etf_daily_report_v2.4.py" --top 10 --send-email
3. Scheduled task on trading days (excerpted from INSTALL_CRON.md)
crontab -e
Add the following (paths must be adjusted for your machine):
30 14 * * 1-5 cd /path/to/skill && python3 scripts/etf_ranking_v2.4.py --top 10 >> /tmp/etf_daily.log 2>&1
4. Usage in an Agent conversation
After installation and after your Agent loads the Skill, you can describe your request in natural language, for example: “Follow SKILL.md to run the v2.4 ranking once, TOP 10, and tell me the path of the generated CSV.” The Agent should select etf_ranking_v2.4.py and its parameters based on SKILL.md, rather than inventing script names not present in the package.
Use Cases and Notes¶
Who it’s for
- People who need to quickly view mainstream ETF gainers/losers rankings and export txt/csv/json for further analysis.
- Developers who want to reuse query logic through a fixed workflow in an Agent conversation instead of rewriting crawlers each time.
- Users on Linux/macOS-like environments who can run Python 3 and cron (Windows requires adapting paths and scheduled tasks yourself).
Limitations and cautions
- The SkillHub overview is empty; on first use you should read the package’s
SKILL.md. Some older filenames mentioned inSKILL.md(such asetf_ranking_pro.py) do not appear in the current 2.4.0 Zip manifest; treat the actual files in the package as authoritative. - Market data comes from Tencent Finance’s public endpoints. On non-trading days, before market open, or when the interface is abnormal, data may be empty; this is also mentioned in the troubleshooting section of
INSTALL_CRON.md. - Email functionality depends on SMTP and an authorization code; if not configured, it only outputs locally.
- This is a community Skill, and the publisher is not marked on SkillHub as an officially certified author. The page’s security scan result is “safe, no risk,” but you are still advised to review the scripts yourself before use.
- SkillHub statistics (sidebar data on the page): approximately 2,715 downloads, approximately 15 installs, 3 favorites; scraped metadata score 100000. These numbers reflect platform statistics only and do not represent investment returns or data accuracy.
Conclusion¶
“ETF Daily Report V2.4” consolidates mainstream ETF batch queries, turnover filtering, gainers/losers ranking, file export, and an optional emailed daily report into a single Skill plus scripts, making it suitable for mounting onto an Agent that supports Skills for repeatable market summaries. Installation and the Skill locator should follow SkillHub:
https://www.skillhub.cn/skills/user_861fb6c9/etf
API: https://api.skillhub.cn/user_861fb6c9/etf