lean-framework-pipeline

lean-framework-pipeline is a skill for Claude Code, Codex from Travisun/Opptrix. It costs 97 tokens per session (1,696 once invoked), scanned A, original, Apache-2.0.

A guide to the layers of the QuantConnect LEAN Algorithm Framework: choosing investments, generating signals, setting portfolio weights, managing risk, and executing orders. It explains which workflow belongs to which layer.

In plain words
What is it for?
Use it to understand the role of each framework layer and select a more specific workflow for indicators, signals, portfolio construction, or risk rules in the Chinese market.
Why use it?
It gives a clear route through a complex trading-system structure and prevents analysis, portfolio decisions, and order execution from being treated as the same task. The guide does not run LEAN or simulate trades.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/travisun/opptrix/lean-framework-pipeline
Any agent
npx skills add Travisun/Opptrix --skill lean-framework-pipeline
Clone the repo
git clone --depth 1 https://github.com/Travisun/Opptrix

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lean-framework-pipeline

README.md
[![agentmods](https://agentmods.dev/badge/skills/travisun/opptrix/lean-framework-pipeline.svg)](https://agentmods.dev/skills/travisun/opptrix/lean-framework-pipeline)
Your own site
<a href="https://agentmods.dev/skills/travisun/opptrix/lean-framework-pipeline"><img src="https://agentmods.dev/badge/skills/travisun/opptrix/lean-framework-pipeline.svg" alt="Measured on agentmods" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,696 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00097 $0.01696
Opus 5 $0.00048 $0.00848
Sonnet 5 $0.00019 $0.00339
Haiku 4.5 $0.00010 $0.00170

Measured 2d ago against content hash d1f9e4bb31ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

lean-framework-pipeline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/agent-skills/builtin/lean-framework-pipeline/SKILL.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LEAN 框架流水线

方法溯源 QuantConnect LEAN Algorithm Framework(Universe → Alpha → Portfolio Construction → Risk Management → Execution)。本技能是分层导航与路由图禁止假装跑完整 LEAN 引擎,也禁止在本技能内模拟 Execution 成交

何时使用

用户想理解「LEAN 式流水线各层做什么」(默认 CN / A股与场内 ETF)或要把问题路由到对应 lean-* 技能(LEAN 方法溯源,非美股原版照搬)。

边界:具体指标用 @skill:lean-indicator-playbook;均线/RSI/动量用 @skill:lean-ma-cross-trend / @skill:lean-rsi-reversion / @skill:lean-returns-momentum;组合权重用 @skill:lean-equal-weight-pcm / @skill:lean-mean-variance / @skill:lean-risk-parity;回撤规则用 @skill:lean-drawdown-risk;通用宇宙筛选用 @skill:universe-screen。本技能只做导航,不在本层硬算信号或权重。默认交付网页路由图。

A股适配(默认)

  • 导航图须注明:默认 CN 适配层(Universe/Alpha/PCM/Risk 路由到的 lean-* 均按 A股微观结构解读)。
  • Execution 仍 Must-skip;且 A股还有涨跌停、T+1、融券限制,不得按美股可自由做空假设路由「多空执行」。
  • 用户点名美股策略时再声明切换。
  • 不可硬适配或数据缺口时:首页横幅写清完整度(partial 或更严)+ 必要时 ask_user

分析架构(投研方法)

  • 问题/假设:用户目标落在 Framework 哪一层?应激活哪条 lean-*?
  • 证据清单:用户意图描述(事实输入)、层映射表(方法假设)、推荐技能路径(推断)
  • 多维交叉验证:一层一事;禁止把 Exec 层当成可交易建议
  • 结论与不确定:平台能力 ≠ LEAN Runtime 对等
  • 风险与缺口:意图模糊时先 ask_user
  • 微观/制度风险:涨跌停钝化、T+1、ST/停牌、融券受限(及相关会计口径差异);不得按美股连续可成交或自由做空假设叙事
  • 事实 | 假设 | 推断 分栏强制

Exec 层 Must-skip(硬性)

含义 本平台映射 动作
Universe 选股宇宙 @skill:lean-ema-cross-universe / @skill:universe-screen 可路由
Alpha 信号/洞察 @skill:lean-indicator-playbook / @skill:lean-ma-cross-trend / @skill:lean-rsi-reversion / @skill:lean-returns-momentum / @skill:lean-etf-ibs-reversion / @skill:instrument-signals 可路由
Portfolio Construction 组合权重 @skill:lean-equal-weight-pcm / @skill:lean-mean-variance / @skill:lean-risk-parity / @skill:lean-etf-global-rotation 可路由
Risk 风控 @skill:lean-drawdown-risk / @skill:stress-test 可路由
Execution 下单/成交/滑点撮合 无对等「实盘执行」技能 Must-skip:只说明跳过原因;可指向 @skill:execution-cost(成本估算)或 @skill:rebalance(方案差额,非下单)

数据维度

维度 取数方向 缺失时
用户目标 对话 / ask_user 先澄清层
层映射 本技能内置表
交付 list_web_vendorcreate_web 可跳过口头要点
默认CN适配层 路由至各 lean-* 的 CN 专节

Read the full file on GitHub · 95 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 95 lines · 97 tokens per session scan A d1f9e4bb31ec

Subscribe to this mod's changes

lean-framework-pipeline is a skill published in the GitHub repository Travisun/Opptrix (231 stars, last pushed today), licensed Apache-2.0. It adds 97 tokens to every session and 1,696 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

national-team-position

估计中国 A 股"国家队"(中央汇金)的宽基 ETF 持仓变动趋势——追踪上交所沪深300/上证50/中证500/中证1000/中证A500/科创50 的 ETF 份额变化,叠加各自指数走势,生成六合一总图与各指数单图。Estimates China's "national team" (Central Huijin) broad-base ETF positioning by tracking Shanghai Stock Exchange ETF share changes. Use when the user asks about 国家队持仓 / 国家队仓位 / 中央汇金持仓 / 国家队加仓 / 国家队减仓 /…

Xiaoyuan-Liu/national-team-position · 161 tokens

caijing-ipo-hk

财经·港股打新——完整打新顾问 + 发行体检。回答"这只港股新股怎么打、打多少、破发统计风险多大"。内置:可配置用户档案(券商/资金/风险偏好)、主流券商费率预设、申请档位与历史配售证据、绝对孖展金额、因子体检(保荐人/基石/定价四分位/结构/热度/情绪/18A/18C)、三档条件性方案与执行清单。含招股期与数据时效 gate;默认自用模式可给条件性申购建议,对客输出仍按 compliance-rendering 降级。触发:"分析这个新股""XX招股了""怎么打""打多少手""港股打新""孖展""暗盘";命令 /caijing:ipo-hk。.

nekopunch11/rodya-caijing-studio · 209 tokens

caijing-fundamental

财经·基本面——产出一份分析师级、全面、详细、前瞻、论点驱动的深度研究文档。对 A股/港股上市公司:立核心论点与分歧视角(市场信什么、我哪里不同),在 2–3 个决定命运的胜负手上量化钻透(带估算区间与置信度),十四段全面框架每段有真分析与子项,配三情景前瞻盈利、估值矩阵、多投资哲学对撞、Pre-Mortem 反偏见与长期跟踪清单。默认产出研报级 docx;客户合规版按需。触发:"全面分析XX""XX基本面怎么样""这公司质地如何";命令 /caijing:fundamental。.

nekopunch11/rodya-caijing-studio · 188 tokens

caijing-earnings

财经·财报——只回答"这季财报行不行/财报前该看什么"。财报发布后的事件驱动快评:最新期核验 gate、同比环比速览、超预期三层基准判定(一致预期优先于公司指引,公司指引优先于历史季节性)、扣非与现金流含金量验证、前瞻指标(合同负债/订单/资本开支)、对投资逻辑支柱的增强/削弱/中性影响;财报发布前可做 earnings preview(关键指标、三情景、催化清单)。默认产出专业版财报点评 docx;客户版财报速览卡+文案按需。触发:"XX出财报了""点评XX年报/中报/季报""这季业绩怎么样""财报前看什么""业绩预览";命令 /caijing:earnings。.

nekopunch11/rodya-caijing-studio · 215 tokens

rodya-caijing-studio

财经内容台——面向个人投资者、研究人员与券商投顾/客户经理的 A股+港股专业研究和内容生产工具包。用于全面分析公司基本面、点评财报、判断估值位置、排查财务风险、梳理产业链、体检 A股/港股新股;所有使用者默认获得同一专业研究内核和研报级 docx,客户合规版按需生成,卡片/文案/PPT 按用户点名触发。稳定命令:/caijing:fundamental、/caijing:earnings、/caijing:valuation、/caijing:risk、/caijing:industry、/caijing:ipo-a、/caijing:ipo-hk。.

nekopunch11/rodya-caijing-studio · 171 tokens

caijing-industry

财经·产业链——只回答"题材链条怎么分、代表公司有哪些"(题材层,不是个股层)。覆盖题材驱动、行业指标、渗透率 S 曲线、上下游图谱、利润池五因子、竞争方式和代表公司纯度;客户合规版保留利润沉淀与供给约束判断,但不做推荐排序。默认产出专业版产业链梳理 docx;客户版图谱卡+文案按需。触发:"XX题材梳理""XX产业链""受益标的有哪些""这个概念怎么看";命令 /caijing:industry。.

nekopunch11/rodya-caijing-studio · 150 tokens