chanlun
Skill by HKUDS
Detects Chan theory (缠论) price structures in OHLCV data, including fractals, bi strokes and pivot zones, and generates buy and sell point signals. It is for traders and developers who want structure-based technical analysis in Python using the czsc library.
Install chanlun
Built from the published package, never by AI.
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.claude/skills && cp -r /tmp/Vibe-Trading/agent/src/skills/chanlun ~/.claude/skills/chanlunRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Vibe-Trading/agent/src/skills/chanlun ~/.gemini/antigravity-cli/skills/chanlunAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a pattern recognition guide for Chan theory, based on the work of Chan Zhongshuo (缠中说禅). It describes a pipeline that runs from raw candlestick bars through inclusion handling, fractal detection, bi (笔) detection and pivot (中枢) construction, then buy and sell point judgment. The source says it applies to any market with OHLCV data, such as A-shares, crypto and futures.
The skill uses the czsc Python library (v0.9.68+), which can use an optional Rust backend and supports incremental updates for real-time analysis. It lists 43 built-in signal functions, including first, second and third buy and sell points, and pattern classifiers for 3, 5, 7, 9 and 11 bi formations. Signals are coded as 1 for long, -1 for short and 0 for no action. The skill is aimed at quantitative analysts and developers who work with price data.
Written from the project's SKILL.md and checked against it.
What it can do
- Fractal detectionIdentifies top and bottom fractals (分型) from candlestick bars.
- Bi and pivot detectionBuilds bi strokes and pivot zones (中枢) from the detected fractals.
- Buy and sell point signalsFlags first, second and third buy and sell points, such as cxt_first_buy_V221126.
- Pattern classificationClassifies 3, 5, 7, 9 and 11 bi formations with cxt_three_bi through cxt_eleven_bi signals.
- Multi-period analysisSupports analysis across multiple timeframes, from 1-minute to monthly frequencies.
- Pivot resonanceChecks alignment of large and small level pivots with cxt_zhong_shu_gong_zhen_V221221.
- Incremental updatesUpdates the analysis as new bars arrive, suited to real-time use.
What you need
- Python
- czsc library (pip install czsc)
- requests and pandas packages
Try asking
- Use the chanlun skill to find first buy signals in this BTC-USDT daily data.
- Classify the recent bi formations in these bars as 3, 5 or 7 bi patterns.
- Explain where the current pivot zone sits and what the third buy point needs.
Good to know
- Bars must be passed as a list of RawBar objects in time order.
- The source describes these methods as signal rules, not as trading advice or guaranteed results.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: agent/src/skills/chanlun/SKILL.md, agent/src/skills/chanlun/example_signal_engine.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md4 KB -
example_signal_engine.py7 KB -
references/买卖点/一买一卖.md2 KB -
references/买卖点/三买三卖.md2 KB -
references/买卖点/二买二卖.md1 KB
Show all 8 files
-
references/核心概念/中枢.md2 KB -
references/核心概念/分型.md1 KB -
references/核心概念/笔.md2 KB
Alternatives to chanlun
All alternatives →Lists live launchpad token feeds and AI-detected hot topics for meme tokens on BSC, Solana and Base. Covers new, finalizing and just-migrated tokens on launchpads such as Pump.fun and Four.meme.
The okx-market skill lets an AI assistant retrieve cryptocurrency market data from the OKX V5 REST API. It is aimed at users who want spot, derivatives and index data in Python without an account.
Calculates key SaaS health metrics such as ARR, churn, LTV and CAC from raw business numbers, then gives prioritized advice. Built for founders and finance leads who share revenue or customer figures.
Fetches U.S. SEC EDGAR data for research. It resolves a ticker to its CIK, lists recent filings with primary-document URLs, and pulls XBRL financial series. Built for analysts who need free, U.S.-only filing data.
Provides free, no-auth access to Eastmoney market data for A-shares, Hong Kong stocks and US stocks. It covers fund flows, dragon-tiger lists, financial statements and stock screening.
Reads and manages a user's QuickBooks business through Intuit's official MCP server. It answers finance questions from reports, invoices, customers, products and benchmarks, and completes approved actions.
Compare with meme-rush, okx-market or saas-metrics-coach
chanlun: common questions
What markets does the chanlun skill work with?
The source says it works with any market that has OHLCV data, such as A-shares, crypto and futures.
Which library does the chanlun skill use?
It uses the czsc Python library, version 0.9.68 or later, with an optional Rust acceleration backend.
What do the signal values mean?
The source defines 1 as long, -1 as short and 0 as wait.
How do I install chanlun?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is chanlun free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is chanlun safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to chanlun?
Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.
