AI-Trader Market Intel
HKUDS/AI-Trader
Reads AI-Trader's read-only market snapshots, grouped financial news and events board through its market-intel endpoints, for context before trading or posting.
Reviews an investment portfolio holding by holding and as a whole: position health, concentration, overlap and opportunity cost, from a holdings list or saved portfolio file.
SKILL.md written in Chinese; this summary is our English description.
$ npx skills add xbtlin/ai-berkshire --skill portfolio-review -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install xbtlin/ai-berkshire portfolio-review --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/xbtlin/ai-berkshire.git skills-src && mkdir -p .claude/skills && cp -r skills-src/codex-skills/portfolio-review .claude/skills/portfolio-review && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "portfolio-review" agent skill from https://github.com/xbtlin/ai-berkshire/tree/main/codex-skills/portfolio-review into .claude/skills/portfolio-review/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "portfolio-review", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/xbtlin/ai-berkshire/tree/main/codex-skills/portfolio-reviewType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add xbtlin/ai-berkshire --skill portfolio-review -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install xbtlin/ai-berkshire portfolio-review --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xbtlin/ai-berkshire.git skills-src && mkdir -p .agents/skills && cp -r skills-src/codex-skills/portfolio-review .agents/skills/portfolio-review && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "portfolio-review" agent skill from https://github.com/xbtlin/ai-berkshire/tree/main/codex-skills/portfolio-review into .agents/skills/portfolio-review/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "portfolio-review", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add xbtlin/ai-berkshire --skill portfolio-review -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install xbtlin/ai-berkshire portfolio-review --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xbtlin/ai-berkshire.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/codex-skills/portfolio-review .cursor/skills/portfolio-review && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "portfolio-review" agent skill from https://github.com/xbtlin/ai-berkshire/tree/main/codex-skills/portfolio-review into .cursor/skills/portfolio-review/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "portfolio-review", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/xbtlin/ai-berkshire.git --path codex-skills/portfolio-review--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add xbtlin/ai-berkshire --skill portfolio-review -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install xbtlin/ai-berkshire portfolio-review --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xbtlin/ai-berkshire.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/codex-skills/portfolio-review .gemini/skills/portfolio-review && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "portfolio-review" agent skill from https://github.com/xbtlin/ai-berkshire/tree/main/codex-skills/portfolio-review into .gemini/skills/portfolio-review/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "portfolio-review", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install xbtlin/ai-berkshire portfolio-reviewInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add xbtlin/ai-berkshire --skill portfolio-review -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/xbtlin/ai-berkshire.git skills-src && mkdir -p .github/skills && cp -r skills-src/codex-skills/portfolio-review .github/skills/portfolio-review && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "portfolio-review" agent skill from https://github.com/xbtlin/ai-berkshire/tree/main/codex-skills/portfolio-review into .github/skills/portfolio-review/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "portfolio-review", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add xbtlin/ai-berkshire --skill portfolio-review -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install xbtlin/ai-berkshire portfolio-review --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/xbtlin/ai-berkshire.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/codex-skills/portfolio-review .opencode/skills/portfolio-review && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "portfolio-review" agent skill from https://github.com/xbtlin/ai-berkshire/tree/main/codex-skills/portfolio-review into .opencode/skills/portfolio-review/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "portfolio-review", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
portfolio-reviewReviews an investment portfolio holding by holding and as a whole: position health, concentration, overlap and opportunity cost, from a holdings list or saved portfolio file.
The skill starts from the holdings you give it, as percentages, as share counts with cost prices, or as a saved portfolio file at reports/portfolio-latest.md, and normalizes them into one table of position, code, quantity, cost, price, market value, weight and gain or loss. Background agents then fetch current price and valuation metrics, key financial changes from the latest quarter, recent events and analyst consensus for each holding, and a financial rigor script checks the valuation data.
Each position gets a quick health check on whether the buy logic has changed and how sound the thesis is, plus three questions: would you buy it today, would you be comfortable holding for five years if you could not trade, and is the original thesis intact. Portfolio-level analysis follows, starting with concentration, and holdings with scarce information are labeled low confidence.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit a221a20. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
python3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Portfolio Review loads about 1.2k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 404 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from xbtlin/ai-berkshire at commit a221a20, republished under its MIT licence (© xbtlin). 404 words, ~1,235 tokens.
.claude/skills/portfolio-review/SKILL.md (or your agent's skills folder).This skill is generated from skills/portfolio-review.md so Claude Code and Codex users share one canonical workflow.
$ARGUMENTS as the user's request in the current Codex thread.tools/ in this repository. Prefer running commands from the repository root with paths like python3 tools/financial_rigor.py ...; if the current thread starts outside the repo, locate the actual checkout path first instead of assuming a fixed home-directory path.date command to confirm today's date; treat it as the baseline for "latest" data and state the data cutoff date in the report header. Never assume the current date from training data.AGENTS.md: cross-check financial data, use exact arithmetic tools for valuation/math, and clearly label uncertainty and source gaps.对 $ARGUMENTS 执行投资组合审视与优化。
支持输入格式:
腾讯30%, 美团20%, 茅台20%, 英伟达15%, 现金15%腾讯 500股 @480港元, 美团 1000股 @130港元, ...我的持仓(如果已有保存的组合文件 reports/portfolio-latest.md)"分散投资是对无知的保护。如果你知道自己在做什么,分散投资就没有意义。" —— 巴菲特
"我这辈子见过的真正好的投资机会,十个手指就数得完。" —— 李录
研究公司只是投资的一半。另一半是组合层面的决策:
巴菲特从不孤立地看一只股票——他总是在想"这是不是我能做的最好的事?"
从输入中解析出当前持仓,标准化为以下格式:
| 标的 | 代码 | 持仓量 | 成本价 | 现价 | 市值 | 占比 | 盈亏 |
|---|
如果输入只有比例没有金额,按比例分析即可。
同时检查是否存在已有的组合文件(reports/portfolio-latest.md),如有则读取并更新。
使用 Task 工具启动后台 Agent,通过 WebSearch 为每个持仓并行获取:
对每个持仓使用 tools/financial_rigor.py verify-valuation 校验估值数据。对每只持仓标注信息丰富度(A/B/C级),C级持仓的分析结论标注低置信度。
对每个持仓进行快速健康检查:
| 标的 | 当前PE | 买入逻辑是否变化 | 论文健康度 | 仓位建议 |
|---|---|---|---|---|
| 腾讯 | 18x | 未变化 | 8/10 | 合理 |
| 美团 | 25x | 竞争加剧 | 6/10 | 偏高,考虑减仓 |
对每个持仓回答:
段永平:"如果你不想持有一只股票10年,那就一天也不要持有。"
| 指标 | 当前值 | 建议范围 | 判断 |
|---|---|---|---|
| 第一大持仓占比 | <40% | ||
| 前三大持仓占比 | 50-80% | ||
| 总持仓数量 | 5-15只 | ||
| 现金占比 | 10-30%(视市场环境) |
李录的标准:3-5只核心持仓,前3占80%+。但这要求每一只都研究透彻。
巴菲特的标准:核心持仓不超过10只,但允许更多卫星仓位。
识别持仓之间的隐性关联:
| 持仓A | 持仓B | 相关类型 | 风险 |
|---|---|---|---|
| 腾讯 | 快手 | 同属中国互联网 | 监管风险共振 |
| 英伟达 | 台积电 | AI供应链上下游 | AI Capex同向波动 |
| 美团 | 拼多多 | 同属中国消费 | 宏观消费同向波动 |
检查清单:
这是巴菲特最核心的思维方式——每一块钱都应该放在回报最高的地方。
将所有持仓按"预期年化回报"排序:
| 排名 | 标的 | 当前占比 | 预期年化回报 | 确定性 | 预期回报×确定性 |
|---|---|---|---|---|---|
| 1 | |||||
| 2 | |||||
| ... |
预期回报估算方法(使用 tools/financial_rigor.py three-scenario 计算):
关键问题:排名最后的持仓,预期回报是否高于现金(无风险利率~4%)?如果不是,应该卖出换成现金。
| 情景 | 假设 | 组合预计影响 | 最大回撤 |
|---|---|---|---|
| 全球衰退 | 企业盈利下降20-30% | ||
| 中美冲突升级 | 中概股折价50% | ||
| 利率飙升 | 10年期国债→6% | ||
| 科技泡沫破裂 | 科技股PE压缩40% |
对每个情景做定性+粗估评估(基于各持仓的行业属性和历史估值波动范围):
基于以上分析,给出具体的调仓建议:
| 动作 | 标的 | 当前占比 | 建议占比 | 理由 |
|---|---|---|---|---|
| 加仓 | ||||
| 减仓 | ||||
| 清仓 | ||||
| 新建仓 | ||||
| 不动 |
如果组合中有"不如现金"的仓位,或者现金占比过高,建议使用 /industry-research 或 /investment-checklist 对感兴趣的行业/公司进行系统筛选,而非在本Skill内直接推荐个股。
| 当前现金占比 | 建议现金占比 | 理由 |
|---|
巴菲特:目前持有$3,820亿现金,占比超过总资产的25%——当找不到好机会时,现金是最好的仓位。
一、组合概览(持仓表格+饼图描述)
二、单仓位体检(每个持仓的健康状态)
三、组合分析
- 集中度:是否过度分散/集中?
- 相关性:隐性关联和风险共振
- 机会成本:排名最低的仓位是否值得持有?
- 压力测试:极端情景下的回撤预估
四、调仓建议(具体操作+理由)
五、下次审视时间和关注重点将组合信息写入 reports/portfolio-latest.md,包含:
© xbtlin, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in codex-skills/portfolio-review of xbtlin/ai-berkshire.
Open the folder on GitHubat commit a221a20
Portfolio Review next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Portfolio Review this skillxbtlin/ai-berkshire | 17k | — | ~1.2k | Automated safety check: Pass | MIT | |
| AI-Trader Market IntelHKUDS/AI-Trader | 23k | — | ~1.1k | Automated safety check: Pass | None | |
| Eastmoney Market DataHKUDS/Vibe-Trading | 35k | — | ~1k | Automated safety check: Pass | MIT | |
| Stock Deep Analysis Workflowwbh604/UZI-Skill | 7.1k | — | ~9.1k | Automated safety check: Notes | MIT | |
| Zhengxi Fund Manager Views Librarylyra81604/zhengxi-views | 1.8k | — | ~1.6k | Automated safety check: Pass | MIT | |
| SEC EDGAR Filings FetcherHKUDS/Vibe-Trading | 35k | — | ~1.4k | Automated safety check: Pass | MIT |
HKUDS/AI-Trader
Reads AI-Trader's read-only market snapshots, grouped financial news and events board through its market-intel endpoints, for context before trading or posting.
HKUDS/Vibe-Trading
Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.
wbh604/UZI-Skill
Runs a staged deep analysis of a single stock on China A-share, Hong Kong and US markets, ending in an HTML report with valuation models and investor-panel scores.
lyra81604/zhengxi-views
Answers questions with sourced quotes from one Chinese fund manager's public writings, applies his stated investment method and compares his words with real fund holdings.
HKUDS/Vibe-Trading
Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.
helsome/folio
Earnings analysis — pre- and post-earnings. An agent skill from helsome/folio.
xbtlin/ai-berkshire
Scans a long-running industry trend for supply chain chokepoints, aiming to find second- and third-layer suppliers that the market has not yet priced in.
xbtlin/ai-berkshire
Plans and writes a three-to-eight-part long-form article series that breaks down one company, built on fact-checked financials, valuation and management analysis.
xbtlin/ai-berkshire
Reads a company's filings and earnings call material in depth, rates how complete the sources are and extracts the key figures into a structured review.
xbtlin/ai-berkshire
Runs four parallel analyst personas over one earnings report, then an editor and reader-review pass turn the findings into a publishable article.
xbtlin/ai-berkshire
A four-step research framework for finding and tracking high-growth core companies in one industry: map the sector, ask core questions, verify, then hold to the turning point.
xbtlin/ai-berkshire
A research rule set for pulling company financials from prioritized sources by market and cross-checking every key figure against two independent sources.
Categories
Reviews an investment portfolio holding by holding and as a whole: position health, concentration, overlap and opportunity cost, from a holdings list or saved portfolio file. md, and normalizes them into one table of position, code, quantity, cost, price, market value, weight and gain or loss. Background agents then fetch current price and valuation metrics, key financial changes from the latest quarter, recent events and analyst consensus for each holding, and a financial rigor script checks the valuation data.
Portfolio Review fits situations like: checking whether any holding has outgrown a sensible position size; deciding where new money should go versus swapping an existing position; running a periodic health check on every holding's thesis; spotting overlapping exposure between positions.
Run `npx skills add xbtlin/ai-berkshire --skill portfolio-review -a claude-code`. Or copy the skill folder (codex-skills/portfolio-review in xbtlin/ai-berkshire) into .claude/skills/portfolio-review in your project. Claude Code loads it when a task matches its description.
Run `npx skills add xbtlin/ai-berkshire --skill portfolio-review -a codex`. Or copy the skill folder (codex-skills/portfolio-review in xbtlin/ai-berkshire) into .agents/skills/portfolio-review in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add xbtlin/ai-berkshire --skill portfolio-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/portfolio-review, .gemini/skills/portfolio-review, .github/skills/portfolio-review and .opencode/skills/portfolio-review in your project.
Going by SKILL.md and its folder, Portfolio Review needs the command-line tools its instructions call (python3). Our summary lists: Web search access for current prices and data; Python 3 for the tools/financial_rigor.py script.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Portfolio Review is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Portfolio Review: AI-Trader Market Intel (HKUDS/AI-Trader, 23k stars), Eastmoney Market Data (HKUDS/Vibe-Trading, 35k stars), Stock Deep Analysis Workflow (wbh604/UZI-Skill, 7.1k stars) and Zhengxi Fund Manager Views Library (lyra81604/zhengxi-views, 1.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
xbtlin (a GitHub user) maintains it in xbtlin/ai-berkshire, which has 16,676 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 8, 2026.
Source: xbtlin/ai-berkshire on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.