portfolio-review

portfolio-review is a skill for Claude Code from xbtlin/ai-berkshire. It costs 29 tokens per session (2,441 once invoked), scanned A, original, MIT.

A workflow for researching companies and managing a group of investments. It uses shared research rules and checks the date and data sources before reporting.

In plain words
What is it for?
Use it to study companies, compare investments, review a portfolio, and produce reports with valuation calculations, source gaps, and uncertainty clearly marked.
Why use it?
It reduces the risk of using outdated, unchecked, or unclear financial information when reviewing investments.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions subagents; positional $N argument; mentions Claude Code.

Good fit Use it to study companies, compare investments, review a portfolio, and produce reports with valuation calculations, source gaps, and uncertainty clearly marked.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xbtlin/ai-berkshire/portfolio-review
About the project

AI Berkshire is a collection of Claude Code and Codex skills that structures investment research around the methods of four value-investing thinkers and uses multiple agents for adversarial analysis. It is intended for investors who want a disciplined process for researching companies and making valuation-based decisions.

xbtlin/ai-berkshire · 16,289 stars · on GitHub

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.

Any agent
npx skills add xbtlin/ai-berkshire --skill portfolio-review
Clone the repo
git clone --depth 1 https://github.com/xbtlin/ai-berkshire

Made for: Claude Code.

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 portfolio-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/xbtlin/ai-berkshire/portfolio-review/github.svg)](https://agentmods.dev/skills/xbtlin/ai-berkshire/portfolio-review)
Your own site
<a href="https://agentmods.dev/skills/xbtlin/ai-berkshire/portfolio-review"><img src="https://agentmods.dev/badge/skills/xbtlin/ai-berkshire/portfolio-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for portfolio-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/xbtlin/ai-berkshire/portfolio-review"><img src="https://agentmods.dev/badge/skills/xbtlin/ai-berkshire/portfolio-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,441 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00029 $0.02441
Opus 5 $0.00015 $0.01221
Sonnet 5 $0.00006 $0.00488
Haiku 4.5 $0.00003 $0.00244

Measured 13d ago against content hash 7261b78e857f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

portfolio-review 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 13d 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.

codex-skills/portfolio-review/SKILL.md · 206 lines

How it starts

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

Codex adapter note

This skill is generated from skills/portfolio-review.md so Claude Code and Codex users share one canonical workflow.

  • Treat $ARGUMENTS as the user's request in the current Codex thread.
  • When the source mentions Claude-only surfaces such as Task, Agent, WebSearch, Bash, Read, or Write, use the closest Codex capability available in this session: subagents when available, web search when needed, shell commands for local tools, and normal file edits for workspace files.
  • Use shared project tools from 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.
  • Before starting research, run the 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.
  • Preserve the research quality rules from 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 为每个持仓并行获取:

  1. 当前股价和估值指标(PE、PB、股息率)
  2. 最近一个季度的关键财务变化
  3. 近期重大事件
  4. 分析师一致预期(前瞻PE、目标价)

Read the full file on GitHub · 206 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. 13d ago First seen · 206 lines · 29 tokens per session scan A 7261b78e857f

Subscribe to this mod's changes

portfolio-review is a skill published in the GitHub repository xbtlin/ai-berkshire (16,289 stars, last pushed yesterday), licensed MIT. It adds 29 tokens to every session and 2,441 once invoked, about $0.0001 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-08-30.