I turned Warren Buffett's investing checklist into an AI agent skill
Buffett's 6-question checklist as a SKILL.md for AI agents, with a verify script that blocks made-up quotes and numbers before you see a score.
Kevin PatelAI Solutions Engineer· 6 min read

Warren Buffett died on 1 December 2026, aged 96. He left something unusual for an investor: 60 years of public letters that explain exactly how he thought. Berkshire Hathaway's per-share market value grew 19.7% a year from 1965 to 2025, against 10.5% for the S&P 500 with dividends (2025 letter (opens in a new tab)).
Most of his rules fit in a checklist. And a checklist is the easiest thing in the world to hand to an AI agent. So I did that, and then spent most of the time on the part that matters: making sure the AI can't make up the evidence.
This post walks through how an open-source "Buffett agent" is built, why that design worries me, and the skill I built instead. The skill is free to download here as a zip, and the guide button above has all his rules plus a printable 1-page checklist.
How the open-source Buffett agent works
The best-known version is virattt/ai-hedge-fund (opens in a new tab), about 65,000 stars on GitHub, MIT licence. It ships AI "investors" modelled on Buffett, Munger, Graham and others. I read the Buffett agent's source (opens in a new tab) expecting complicated finance code. It's a system prompt.
The file says it plainly: "The persona is ONLY a system prompt", and all the data comes from a point-in-time snapshot of the company's fundamentals. The prompt lists six checks (circle of competence, moat, management, financial strength, valuation, ten-year prospects) and asks for JSON only:
{ "signal": "bullish | bearish | neutral", "confidence": 0-100, "reasoning": "2-4 sentences" }Two choices in there are good engineering and worth copying:
- Point-in-time data. The agent treats the latest filing date as "today" and is told not to use anything it knows from after it. That's what stops a backtest from cheating with hindsight.
- A strict output schema. JSON with fixed fields is easy to parse, compare and test.
The project is also honest about limits: it says it's for educational purposes only, not for real trading, and that the personas "are not the actual individuals and not endorsements".
The problem: nothing checks the reasoning
The weak spot is the reasoning field. It's free text, and nothing checks it against the source. A model can write "durable moat, consistent free cash flow" in a confident Buffett voice whether or not the numbers say so.
With long documents like annual reports, the failure to design for isn't a wrong opinion. It's a made-up quote or a slightly wrong number that sounds exactly like the report. You only notice if you go and check, and nobody checks every line.
So I flipped the design. The model still does the reading and scoring. Plain code decides whether its evidence is real.
The skill: extract, score, verify, report
An agent skill is a folder with a SKILL.md file: a short description the agent uses to decide when to load it, then the instructions. Mine also carries the rules as a reference file and a Python script the agent has to run.
buffett-checklist/
├── SKILL.md # when to use it + the 5-step workflow
├── reference/rules.md # the 6 checks, each with Buffett's exact words and letter year
└── scripts/verify.py # the harness: checks every quote and number against the PDFThe workflow in SKILL.md:
- Extract. Pull the figures from the report with page numbers: revenue, margins, debt, cash, free cash flow.
- Score. Each of the six checks gets a score from 1 to 5, one sentence of reasoning, and an exact quote copied from the report.
- Write
scores.json. - Verify. Run
scripts/verify.py. Any check whose quote or numbers aren't in the report fails, and the agent has to redo that check from the source. - Report. Only after verify passes: scores with quotes, the 3 biggest risks, what to check next, and "what would make this a NO".
The six checks come straight from his letters. Two examples from rules.md:
"You only have to be able to evaluate companies within your circle of competence. The size of that circle is not very important; knowing its boundaries, however, is vital." (1996 letter (opens in a new tab))
"It's far better to buy a wonderful company at a fair price than a fair company at a wonderful price." (1989 letter (opens in a new tab))
The harness: code the model can't talk its way past
The verify script is deliberately boring. It pulls the report's text, normalises it (lowercase, straight quotes, single spaces, words joined across line breaks), and then does substring checks. No AI involved, so it can't be persuaded.
for c in checks:
quote = norm(c.get("quote", ""))
if len(quote) < 12:
problems.append(f"{label}: quote is missing or too short to prove anything")
elif quote not in report:
problems.append(f'{label}: quote not found in the report')
for n in c.get("numbers", []):
if digits(norm(str(n))) not in report_digits:
problems.append(f"{label}: number {n!r} not found in the report")I tested it on Buffett's own 1996 letter. A real quote and a real figure pass. A made-up moat quote and an invented number fail with a clear message, and the exit code is 1, so the agent knows it isn't done:
VERIFY FAILED. Fix these checks from the report and run again:
- check 2 (Moat): quote not found in the report: "Our moat is the widest in the history of commerce."
- check 4 (Financial strength): number '99,999' not found in the reportSubstring matching has limits, and I'd rather say so. It proves a quote exists, not that it supports the score. A model could quote a real sentence that says something else. That's why the final step tells you to read the quoted lines yourself. They're short, and they're the whole case.
The gate: a research list, not a buy button
Once every claim checks out, the script turns the six scores into one of three results. It follows Buffett's own order: quality first, then price.
I kept buy and sell language out on purpose. A model scoring a PDF is not a reason to buy anything. What it's good at is the slow part: reading 150 pages and pointing you to the dozen lines that matter.
Try it
- Download the skill and unzip it.
- For Claude Code, put the
buffett-checklistfolder in~/.claude/skills/. Other agents that read theSKILL.mdformat load it the same way. - Download a company's latest annual report from its investor relations page, attach it, and ask: "Run the Buffett checklist on this report."
- To read PDFs, the script needs
pdftotext(poppler) orpip install pypdf. A.txtreport works as it is.
No agent? The guide has a copy-paste version of the checklist for any AI chat. You lose the automatic verify step, so check every number it quotes yourself.
If you'd rather read the source, start with his letters from 1986 (opens in a new tab) (fear and greed), 1989 (opens in a new tab) and 1996 (opens in a new tab). All of them since 1977 are on Berkshire's site (opens in a new tab).
Not financial advice. This is about building reliable AI tools, not picking stocks.
Quick answers
What is Warren Buffett's investing checklist?
Six questions drawn from his shareholder letters: do you understand the business, does it have a moat, is management good, is it financially strong, is the price fair, and would you hold it for ten years.
How does the ai-hedge-fund Buffett agent work?
It's a system prompt that tells a language model to reason like Buffett over a point-in-time snapshot of company fundamentals, then return JSON with a bullish, bearish or neutral signal, a confidence score and short reasoning.
What is an agent skill?
A folder with a SKILL.md file that tells an AI agent when to use it and how, plus any reference files and scripts it needs. Claude Code loads skills from ~/.claude/skills/.
Why does an AI stock analysis need a harness?
Language models can produce quotes and numbers that sound right but aren't in the document. A harness is plain code that checks every quote and figure against the source and makes the agent redo anything it can't find.
Can AI tell me which stock to buy?
No. Use it to read faster and find the lines that matter in an annual report, then check them yourself or speak to a licensed advisor.


