Introduction¶
In Agent workflows, performing “conditional stock screening” typically involves letting users construct filters themselves or breaking down requirements into multiple rounds of structured fields. When conditions become numerous (Industry + Financials + Technicals + Market Data), conversations easily become lengthy, and it is easy to overlook timeframes, sorting logic, and combinatorial logic found in the user’s original statement.
Below is an introduction to AI涨乐–Conditional Stock Selection (Coordinate @user_d9eea1c5/zhangle-select-stock, current version 1.0.2) on SkillHub. It condenses “conditional stock selection” into a single natural language query, which is parsed by the Huatai Securities AI涨乐 backend to return results. It is suitable for use within coding assistants that support Skills or environments like OpenClaw.
What is this¶
AI涨乐–Conditional Stock Selection is a community-sourced (community), professional-classified financial Skill: it queries financial targets such as stocks, ETFs, and funds based on natural language filtering conditions.
- Maintainer: Huatai Securities (Both SKILL metadata and README indicate Huatai Securities).
- SkillHub Page: https://www.skillhub.cn/skills/user_d9eea1c5/zhangle-select-stock
- Installation API Endpoint: https://api.skillhub.cn/user_d9eea1c5/zhangle-select-stock
It differs from deep analysis tools like “how is a specific stock doing” or “is it worth buying.” The official description explicitly states it should not be used for individual stock analysis; such needs should be directed to Skills like financial-analysis.
Core Features¶
The verified capability boundaries are as follows.
Applicable Trigger Scenarios¶
Activate this Skill when the user wants to filter targets such as stocks / ETFs / funds by conditions, including but not limited to:
- Industry / Sector: Such as Baijiu (White liquor), Semiconductors, AI Concepts, New Energy, etc.
- Financial Indicators: P/E Ratio, Net Profit Growth, ROE, etc.
- Technical Indicators: Expressions like Moving Average Golden Cross, MACD, Consecutive Limit-ups, etc.
- Market Data: Price Change %, Main Capital Net Inflow, Turnover Rate, etc.
- Earnings Exceeding Expectations: Filters regarding financial reports or performance exceeding expectations.
- Combined Multi-conditions: Any combination of the above dimensions.
- Subjective Recommendations: Such as “Recommend a few good stocks” or “What are some good ETFs.”
Example questions provided by the official SKILL description include:
- Top 10 stocks in the tech sector with the highest gains last week
- Which stocks have a main capital net inflow exceeding 100 million
- Stocks with a P/E ratio below 20 and revenue YoY growth exceeding 30%
- Which stocks have performance exceeding expectations
- Recommend a few good stocks
Execution Method¶
The Skill convention is for the Agent to call the local script select_stock.py using the tool name selectStock, passing the user’s question as query:
python3 select_stock.py selectStock --query "<natural language of filtering conditions>"
Invocation Strategy (from SKILL.md):
- For the first attempt, use the user’s original question without modification.
- If there are no results, complete the semantics according to the “Query Rewriting Rules” in the appendix and try once more.
- If still no results, stop and inform the user that no targets meeting the conditions were found.
- Display no more than 10 targets to the user; the returned Markdown must not be reformatted by the Agent.
Upon success, the JSON will look like { "ok": true, "data": { "result": "..." }, "error": null }, where data.result is the Markdown result of the stock selection.
Dependencies & Environment¶
- Requires local
python3. The README requires Python 3.9+ and depends onrequests. - SkillHub tag
requires_api_key=true: A Huatai AI涨乐 API Key must be configured to call the backend.
Installation and Activation¶
Install via SkillHub (Recommended)¶
The SkillHub page suggests: Let the Agent install this Skill following https://skillhub.cn/install/skillhub.md. For manual operation, first confirm that the skillhub CLI is installed, then use --dir to point to the current Agent’s skills directory (installing to the wrong directory will result in the Skill not being loaded).
command -v skillhub && skillhub --version
skillhub install @user_d9eea1c5/zhangle-select-stock --dir <your Agent skills directory>
Common skills directories (excerpted from SkillHub installation documentation):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
After installation, refresh or restart according to the requirements of each client so the Skill is recognized.
Configure API Key (Required)¶
Register / Log in at https://ai.zhangle.com/nzl/skill-manage/skills.html, create and copy a Key in [API KEY Management].
Method A: Environment Variable
export HT_APIKEY=YOUR_API_KEY
Method B: Configuration File (Persistent across shells)
mkdir -p ~/.htsc-skills
printf "HT_APIKEY=%s\n" "YOUR_API_KEY" > ~/.htsc-skills/config
chmod 600 ~/.htsc-skills/config
Read priority: HT_APIKEY environment variable → ~/.htsc-skills/config.
Optional Environment Variables¶
| Variable | Required | Description |
|---|---|---|
HT_APIKEY |
Yes | Authentication key |
SELECT_STOCK_SERVICE_URL |
No | Backend URL, defaults to https://ai.zhangle.com |
SELECT_STOCK_TIMEOUT_SEC |
No | Timeout (seconds), defaults to 300 |
SKILL.md requires: When semantics are ambiguous, execute directly according to rewriting rules and do not interrupt the user with counter-questions; upon receiving a stock selection request, the script should be called immediately instead of asking follow-up questions first.
Typical Usage¶
Use in Conversation¶
Users can describe filtering conditions in natural language, for example:
In the semiconductor sector, which stocks have a P/E ratio below 30 and are in the top 5 for gains over the past week?
The Agent should enter the installed select-stock Skill and execute:
python3 select_stock.py selectStock --query "In the semiconductor sector, which stocks have a P/E ratio below 30 and are in the top 5 for gains over the past week?"
Display the data.result from stdout when ok: true to the user as-is.
Command Line Self-Test¶
You can debug directly after entering the Skill installation directory:
python3 select_stock.py selectStock --query "Top 10 stocks in the tech sector with the highest gains last week"
python3 select_stock.py selectStock --help
In case of failure, distinguish based on error.category: network may prompt to retry later; business indicates no data or restrictions on the business side, and repeating the same query immediately is not advisable.
Applicable Scenarios & Notes¶
Who it is for
- Developers or quantitative/research students already using Skills in the Cursor, Claude Code, Codex, or OpenClaw ecosystems who need to quickly hand over colloquial stock selection conditions to a professional data source.
- Teams that need a unified “conditional stock selection” entry point but do not want to hand-write filtering DSLs in their Agents.
Limitations & Notes
- Must be connected to the internet and have
HT_APIKEYconfigured, otherwise the AI涨乐 backend cannot be accessed; do not commit keys to repositories. - Not an investment research report tool: Questions regarding single-stock fundamentals or valuation narratives should switch to Skills like
financial-analysis. - Number and format of results: Display a maximum of 10 targets, and do not alter the returned Markdown.
- Time consumption: Default timeout is 300 seconds. The stock selection interface may be slow, so the Agent side needs to have the expectation of waiting for completion.
- Data & Compliance: Stock selection results come from the Huatai Securities server. Please comply with platform agreements and local regulatory requirements before use; this article does not constitute investment advice.
The current rating on SkillHub is 100000, with 1260 downloads (based on page display, subject to change over time).
Conclusion¶
AI涨乐–Conditional Stock Selection unifies needs such as “Industry, Financials, Technicals, Market Data, Earnings Surprises, Combined Conditions, and Recommendations” into natural language queries. The Huatai Securities backend returns Markdown results, and the Agent is only responsible for calling the script according to the contract and displaying the results. If your scenario is filtering targets by conditions rather than deep analysis of single stocks, you can try it out by installing and configuring HT_APIKEY as described above.
Official SkillHub Address: https://www.skillhub.cn/skills/user_d9eea1c5/zhangle-select-stock