Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 91
  • 39k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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/chanlun

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install chanlun in Claude Code

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

A

No 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 →

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.

chanlun Install

Add to stack

Loading.