chanlun

HKUDS/Vibe-Trading · Agent Skill

Analyzes price data using Chan Lun theory, automatically identifying patterns, entry/exit points, and trading signals across multiple timeframes.

Jump to install ↓

Overview

PublisherHKUDSOrganization
RepositoryHKUDS/Vibe-Trading ↗
Skill folderchanlun
Stars33,024
Bundled files7
LicenseMIT
Last updatedAugust 28, 2026
LinksSkill source ↗ · Repository ↗

Mozgi check

What we found in the skill files. Details come with a subscription.

Security
medium risk · 1 point needs attention
Compatibility
needs extra software
Similar skills
28 similar skills found
Also with subscription

Installation

A skill is a folder with a SKILL.md file. Pick your agent and run the commands in a terminal (macOS, Linux or Git Bash on Windows) from your project root.

Copy the prompt into Claude, Codex or another assistant: it will review the skill and install it for you.

Install the “chanlun” skill from mozgi.io (https://mozgi.io/skills/chanlun/) for me.

1. Download the archive: https://mozgi.io/skills/chanlun/download
   If it fails, take the skill folder from the source: https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/chanlun
2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me.
3. Put the “chanlun” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.).
4. Make sure <skills folder>/chanlun/SKILL.md exists.
5. Briefly tell me what this skill does and offer to try it on my task.

If you cannot do a step yourself, tell me what to click or type.

Review the source files

7 files Download Zip

Read SKILL.md and any companion files before deciding whether to install. Click a file to preview it.

SKILL.md contents

Original author text · read-only

缠论形态识别

用途

基于缠中说禅理论的价格形态识别。缠论是一套完全基于价格结构的技术分析方法,核心链路:

原始K线 → 去包含处理 → 分型识别 → 笔检测 → 中枢构建 → 买卖点判定

适用于任何有 OHLCV 数据的市场(A股、加密货币、期货等)。

核心概念

| 概念 | 说明 | 详细文档 |

| --- | --- | --- |

| 分型(FX) | 顶分型:中间K线最高;底分型:中间K线最低 | 分型 ↗ |

| 笔(BI) | 相邻顶底分型之间的一段走势,最小单元 | 笔 ↗ |

| 中枢(ZS) | 至少3笔构成的价格重叠区域,趋势的核心 | 中枢 ↗ |

买卖点体系

| 买卖点 | 含义 | 详细文档 |

| --- | --- | --- |

| 一买/一卖 | 趋势结束后的第一个反转信号(背驰点) | 一买一卖 ↗ |

| 二买/二卖 | 一买/一卖后回调不破底/顶的确认信号 | 二买二卖 ↗ |

| 三买/三卖 | 中枢上移/下移后回调不进入前中枢的信号 | 三买三卖 ↗ |

依赖安装

pip install czsc requests pandas

快速上手

from czsc import CZSC, RawBar, Freq
from datetime import datetime

# 准备 RawBar 列表(需按时间正序排列)
bars = [
    RawBar(symbol="BTC-USDT", id=0, dt=datetime(2026,1,1),
           freq=Freq.D, open=70000, close=71000,
           high=72000, low=69000, vol=1000, amount=71000000),
    # ... 更多K线
]

# 创建分析器,自动检测分型/笔/中枢
c = CZSC(bars)

# 访问结果
print(c.bi_list)    # 已完成的笔
print(c.bars_ubi)   # 未完成笔中的K线

可用信号函数(czsc.signals.cxt)

czsc 内置 43 个缠论信号函数,核心如下:

| 函数 | 说明 | 类型 |

| --- | --- | --- |

| cxt_first_buy_V221126 | 一买信号 | 买卖点 |

| cxt_first_sell_V221126 | 一卖信号 | 买卖点 |

| cxt_second_bs_V230320 | 均线辅助二买二卖 | 买卖点 |

| cxt_third_bs_V230318 | 均线辅助三买三卖 | 买卖点 |

| cxt_third_buy_V230228 | 笔三买辅助 | 买卖点 |

| cxt_double_zs_V230311 | 两中枢组合判断BS1 | 中枢 |

| cxt_three_bi_V230618 | 三笔形态分类 | 形态 |

| cxt_five_bi_V230619 | 五笔形态分类 | 形态 |

| cxt_seven_bi_V230620 | 七笔形态分类 | 形态 |

| cxt_nine_bi_V230621 | 九笔形态分类 | 形态 |

| cxt_eleven_bi_V230622 | 十一笔形态分类 | 形态 |

| cxt_bi_base_V230228 | BI基础信号(方向/转折) | 基础 |

| cxt_bi_end_V230312 | MACD辅助笔结束 | 辅助 |

| cxt_range_oscillation_V230620 | 区间震荡判断 | 辅助 |

| cxt_zhong_shu_gong_zhen_V221221 | 大小级别中枢共振 | 中枢 |

信号约定

  • 信号引擎输出:1=做多,-1=做空,0=观望
  • 做多条件:一买信号 或 三笔向上盘背 或 五笔类一买
  • 做空条件:一卖信号 或 三笔向下盘背 或 五笔类一卖
  • 中枢辅助:价格在中枢下沿附近做多优势,上沿附近做空优势

数据格式

czsc 接受 List[RawBar],每个 RawBar 包含:

| 字段 | 类型 | 说明 |

| --- | --- | --- |

| symbol | str | 标的代码 |

| id | int | 序号(从0开始) |

| dt | datetime | 时间 |

| freq | Freq | 频率:Freq.F1/F5/F15/F30/F60/D/W/M |

| open | float | 开盘价 |

| close | float | 收盘价 |

| high | float | 最高价 |

| low | float | 最低价 |

| vol | float | 成交量 |

| amount | float | 成交额 |

实现方式

使用 czsc ↗ 库(v0.9.68+),基于纯 Python 实现(可选 Rust 加速后端)。支持增量更新,适合实时分析。

Frequently asked questions

What does the chanlun skill do?

Analyzes price data using Chan Lun theory, automatically identifying patterns, entry/exit points, and trading signals across multiple timeframes.

How do I install chanlun?

Open the “Installation” block on this page and pick your agent — Claude Code, Codex, Cursor or Gemini CLI — for ready-made commands that copy the skill folder to the right place. Or copy the prompt from the “Via assistant” tab and let the assistant review and install the skill.

Which AI models work with chanlun?

Skills are plain Markdown instructions (the Agent Skills format), so chanlun works with any agent that reads SKILL.md: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and more. The model loads the instructions only when a task matches the skill's description.

Is chanlun free?

The skill is published openly by HKUDS under the MIT license. The skill itself costs nothing — you only pay your AI provider for the tokens you use.

Is it safe to install skills?

A skill is a set of instructions your agent will follow, so read SKILL.md and its companion files before installing. Scripts in the skill folder only run if your agent runs them — keep an eye on what it does and do not grant unnecessary permissions.

How is a skill different from an MCP server or a plugin?

An MCP server or plugin gives the model new tools — code that runs and returns a result. A skill gives it knowledge and process: how to approach a task, which steps to follow and what good output looks like. It needs no server or API key.

Related skills

All skills →