Opportunity Cost logo

Opportunity Cost

Community
kangarooking
opportunity-cost

当用户纠结"要不要卖/换/止盈/止损"时激活。核心信号:用户用买入成本、浮盈浮亏、持仓时间作为卖出理由,或问"已经赚了X%该不该走"。也适用于纠结"持有A还是换B"的资产配置场景。不适用于:纯估值计算(交给 dcf-valuation)、判断公司好坏(交给 good-business)、情绪安抚(交给 equanimity-mindset)。本 skill 只解决一个问题——用机会成本统一买卖逻辑,消除"成本锚定"和"止盈止损"的伪决策。

Overview

Publisherkangarooking
Repositoryduan-yongping-skill
Skill nameopportunity-cost
Stars
57
Forks
13
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by kangarooking on GitHub. Read the source before you install it.

Installation

Install the Opportunity Cost AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/kangarooking/duan-yongping-skill/tree/main/investment-logic/opportunity-cost
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kangarooking/duan-yongping-skill.git /tmp/duan-yongping-skill
mkdir -p .claude/skills
cp -r /tmp/duan-yongping-skill/investment-logic/opportunity-cost .claude/skills/opportunity-cost
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Opportunity Cost in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Opportunity Cost on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Opportunity Cost is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

机会成本决策框架(含持有=买入)

R — 原文 (Reading)

"每天的收盘价就是我们的机会成本,没有卖就等于买了,否则可以买其他。" "无论什么时候卖都不要和买的成本联系起来。该卖的理由可能有很多,唯一不该用的理由就是'我已经赚钱了'。" "理论上讲持有=买入其实不是一个观点而是一个事实。" "投资投什么其实是基于机会成本的。"

— 段永平, 第五章 估值逻辑 · 第5-6节


I — 方法论骨架 (Interpretation)

  1. 持有=买入是一个事实,不是观点。 你今天没有卖出某只股票,等同于你按今天的市价重新买入了一遍。你的钱不是"被套在里面",而是你主动选择了当前价格继续持有。
  2. 成本是沉没的。 买入价格与卖出决策无关。不管你50元买的还是100元买的,今天的决策基准只有一个:当前价格下,这只股票是否仍然是你最好的选择。
  3. 机会成本是买卖的统一标准。 卖出不是因为"赚够了"或"亏怕了",而是因为找到了更好的替代选项。"够不够便宜"由你自己的机会成本决定——你还能在哪里获得更高的长期回报。
  4. 从10年后看回来。 短期股价波动造成的焦虑,用10年视角来过滤。如果10年后这家公司仍然很强,今天的涨跌无关紧要。
  5. "不卖"不等于"永远不卖"。 发现买错了立刻卖、找到明显更好的替代则换仓,但绝不能因为浮盈浮亏而决策。

A1 — 书中的应用 (Past Application)

案例 1: "没有卖就等于买了"——忠旺换茅台

  • 问题: 公司同事们买了中国忠旺(约3块),段永平实地调研后判断商业模式一般、企业文化一般,建议卖出换成茅台或苹果。
  • 方法论的使用: 大部分人听了建议很快换了,但有人不舍得卖,总觉得"会有机会的"——这是典型的沉没成本陷阱(不願承认已有的亏损)。
  • 结论: "一转眼这么多年过去了……,机会成本刚刚的。"忠旺跌到1.46块,而茅台、苹果同期涨幅巨大。
  • 结果: 不换的人不仅亏了本金,更损失了本可以投资好公司的巨大机会成本。

案例 2: 持有网易8-9年的100倍回报

  • 问题: 网易从约1块涨到100多块,过程中每天都有"止盈"诱惑。
  • 方法论的使用: 段永平"可能每天都会被卖价所诱惑",但用"卖股票和成本无关"的道理抵抗住。判断标准只有"公司及其业务的未来现金流",不看买入成本、不看PE/PB。网易涨到20-30倍时他还继续追加。
  • 结论: 卖网易不是因为"赚够了",而是"需要换GE和Yahoo"——机会成本驱动,而非止盈逻辑。
  • 结果: 100倍回报。

案例 3: 达美航空的反思——"卖了苹果去买航空"

  • 问题: 段永平用多出来的现金买了1%达美航空。
  • 方法论的使用: 用持有=买入视角反思——"从买入=持有或者持有=买入的角度看,我当时买入航空公司,其实等于卖了苹果去买入航空公司"。10年视角看,这不是好决策。
  • 结论: "看来是自己内心的投机小心思躁动了一下。"持有航空"难受"因为"不知道时间到底站在哪一边",而持有苹果"股价怎么掉都不会介意"。
  • 结果: 跟随巴菲特卖出航空公司,承认生意模式判断有误。

A2 — 触发场景 (Future Trigger) ★

用户会在什么情境下需要这个 skill?

  1. 止盈/止损纠结: 用户持有某只股票已经赚了(或亏了)一定比例,在犹豫要不要卖,思考的依据是浮盈浮亏比例而非公司价值。
  2. 换仓犹豫: 用户发现了一个可能更好的标的,但因为当前持仓"还没赚回来"或"已经赚了舍不得卖",迟迟不做决策。
  3. 持仓焦虑: 用户因为市场波动而对现有持仓感到不安,频繁关注股价,但没有从公司基本面和机会成本角度思考过。

语言信号 (用户的话里出现这些就应激活)

  • "我已经赚了X%了,该不该止盈"
  • "这只股票还亏着,舍不得割肉"
  • "卖了怕涨、不卖怕跌" / "不知道该不该换"

与相邻 skill 的区分

  • 与 dcf-valuation 的区别: DCF skill 解决"这家公司值多少钱",本 skill 解决"在当前价格下,持有它是不是我最好的选择"。DCF 给出价值判断,机会成本做出买卖决策。
  • 与 ownership-mindset 的区别: 企业所有者视角解决"买什么"(用什么心态看待股票),本 skill 解决"什么时候买卖"(用什么标准做决策)。
  • 与 equanimity-mindset 的区别: 平常心 skill 管情绪管理,本 skill 管决策逻辑。两者常同时触发,但本 skill 提供的是可执行的决策框架,不是情绪安抚。

E — 可执行步骤 (Execution)

当 skill 被激活后, agent 应按以下步骤执行:

  1. 剥离沉没成本

    • 要求用户完全忽略买入价格、持仓时间、浮盈浮亏比例
    • 完成标准: 用户能用"如果我现在手里有一笔等额现金"的视角重新审视决策
    • 提示话术: "假设你今天以市价卖出全部持仓,手里拿着现金,你会按当前价格重新买入吗?"
  2. 识别并比较机会成本

    • 列出用户当前持仓 vs 可替代的最佳选项,用10年视角比较长期回报预期
    • 完成标准: 用户能清晰说出"持有的预期回报"和"替代选项的预期回报"两个数字
    • 判停条件: 如果用户说不出任何替代选项(只持有一只且没有其他懂的公司),则跳到步骤3,建议继续持有并扩展能力圈
  3. 用持有=买入做最终决策

    • 问用户: "如果持有=按当前价格买入,你还愿意吗?"如果愿意→持有;如果不愿意→卖出或换仓
    • 完成标准: 用户给出明确的持有/卖出/换仓决定,且理由与公司价值和机会成本有关,而非浮盈浮亏

B — 边界 (Boundary) ★

不要在以下情况使用此 skill

  • 用户还无法判断公司价值时: 机会成本比较的前提是能判断"持有"和"替代选项"各自的长期回报。如果用户对公司一窍不通,机会成本框架无法落地——应先回到 good-business 或 capability-circle skill。
  • 纯粹的短期交易决策: 本框架假设10年视角。如果用户的目标是短期波段操作,本 skill 不适用。

作者在书中警告的失败模式

  • 赌徒式回本心态: "被套"之后用"长期投资"安慰自己——段永平明确说"很多人往往只是在被套的时候才想起长线来",这不是机会成本思维,而是沉没成本陷阱的伪装。
  • "坚持"的错觉: "如果你还有'坚持'的感觉你就还不是一个价值投资者"——需要"坚持"说明骨子里并不认同,机会成本框架救不了你。
  • 频繁重新审视导致投机: 段永平提醒,持有=买入不意味着"每时每刻都在想是不是高估了",过度关注市场反而变成投机。正确用法是偶尔审视(有新增资金时、发现新标的时),而非每天盯盘。

作者的盲点 / 时代局限

  • 框架假设投资者能清晰判断"最好的替代选项"——现实中能力圈边界模糊,很多投资者高估自己对替代选项的理解。
  • 资金体量差异:段永平的大资金操作(如"有现金流了就加仓")对小资金未必最优,小资金可能面临更高的机会成本。
  • 税务和交易成本在"持有=买入"的等式中被忽略——频繁按此逻辑调仓可能产生大量税费。

容易混淆的邻近方法论

  • 止盈止损纪律: 表面相似(都在决定何时卖出),但止盈止损以价格/比例为锚,机会成本以价值比较为锚,两者逻辑完全相反。
  • "越跌越买"的摊平策略: 段永平明确反对"加码因为前面买的亏了要摊低成本"——这不是机会成本思维,是沉没成本陷阱。

相关 skills (阶段 3 填充)

  • depends-on: [ownership-mindset, dcf-valuation]
  • contrasts-with: []
  • composes-with: [equanimity-mindset]

审计信息

  • 验证通过: V1 cross-domain / V2 predictive-power / V3 exclusivity
  • 测试通过率: 待阶段4
  • 蒸馏时间: 2026-04-16

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Opportunity Cost AI skill do?

当用户纠结"要不要卖/换/止盈/止损"时激活。核心信号:用户用买入成本、浮盈浮亏、持仓时间作为卖出理由,或问"已经赚了X%该不该走"。也适用于纠结"持有A还是换B"的资产配置场景。不适用于:纯估值计算(交给 dcf-valuation)、判断公司好坏(交给 good-business)、情绪安抚(交给 equanimity-mindset)。本 skill 只解决一个问题——用机会成本统一买卖逻辑,消除"成本锚定"和"止盈止损"的伪决策。

Why use Opportunity Cost on TypingMind?

Because you install it once and use it with any model. Opportunity Cost is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Opportunity Cost in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/kangarooking/duan-yongping-skill/tree/main/investment-logic/opportunity-cost. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Opportunity Cost?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Opportunity Cost?

As many as you like. As long as a model supports skills, you can use Opportunity Cost with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Opportunity Cost AI skill free?

Yes. It is published on GitHub by kangarooking under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇