CLAUDE.mdA

CLAUDE.md from longsizhuo/openinvest is a CLAUDE.md file: the standing instructions Claude Code reads in that repo.

Install it, pinned
mdr add longsizhuo/openinvest/CLAUDE.md@git:20261018.a84632e

Pins git:20261018.a84632e in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
CLAUDE.md file
Repository
longsizhuo/openinvest
Path
CLAUDE.md
Versions recorded
7
Latest version
git:20261018.a84632e, committed Oct 18, 2026
First version recorded
Jul 12, 2026
Size
15,828 bytes
Repository stars
139
License
MIT

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# CLAUDE.md — openInvest 项目级指引

> 这份文件给 Claude(或任何 AI agent)改代码时看。**核心产品哲学先看完,再动手**。

## 核心产品哲学

openInvest 有三个调用层,每层服务不同对象:

| 层 | 服务对象 | 目的 |
|----|---------|------|
| ~~GUI~~(已退役 2026-07-05,等重做) | ~~小白用户~~ | 前端不再由后端 serve;重做时走独立前端直连 MCP |
| **CLI / Skill**(`src/openinvest/cli.py`〔console script `openinvest`;`scripts/skill.py` 只是兼容 shim〕+ `skills/invest/scripts/run.sh`)| **AI agent**(Claude / Codex / Hermes / OpenClaw / Gemini / Cursor / Cline / 任意脚本)| Agent 跑全链路:查询 + 记账 + 改持仓 + 触发委员会 |
| **Web API**(deprecated)| remote hub 模式 | 存量端点服务 INVEST_API_BASE 转发与内部触发;不再新增端点,待 MCP 覆盖 remote 后退役 |

### 关键原则

1. **Agent 必须拥有全部功能**——CLI 不能"只能读不能写"。任何用户能用 GUI 做的事,agent 都能用 CLI 做。
2. **GUI 只是面对用户的展示层**——不是必需。fork 用户可以完全不部署 GUI,只用 CLI 走 agent 路径。
3. **CLI / GUI 都共用 Web API 底层**——所有写操作走 `with_portfolio_tx`(fcntl 锁 + atomic write)保证一致性。

### 写代码时

- 加新功能,问自己:**agent 怎么调?** 如果只是给 GUI 加按钮,没补 CLI 子命令 / Web API 端点,**你做错了**——agent 用不上
- CLI 子命令缺写操作时,**优先补 CLI 子命令**而不是只让 agent 调 web API curl
- 不要在 SKILL.md 写"CLI 只读 / 写操作走 web API"——这是反产品哲学的措辞

## 测试纪律

- **CI 自动跑**(`.github/workflows/ci.yml`)—— pytest 全套 + smoke import + 脱敏字段 grep
- **不要靠 dev 自己想起来跑 pytest**——commit 前 CI 会跑,红就别合
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add longsizhuo/openinvest/CLAUDE.md@sha256:adb73964cb8ed5fa

The line at the top of this page pins the label git:20261018.a84632e, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_ljxrd5gk6dw72m4e.svg)](https://markdownregistry.com/a/art_ljxrd5gk6dw72m4e)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 7 versions of this file, between Jul 12, 2026 and Oct 18, 2026, about one every 16 days.

versioncommittedcommitsizeaudit
git:20261018.a84632e latest2026-10-18 a84632e 15,828 BA view · diff
git:20261015.e745ab52026-10-15 e745ab5 15,752 BA view · diff
git:20261010.3017df52026-10-10 3017df5 15,150 BA view · diff
git:20261008.6c52e6f2026-10-08 6c52e6f 15,107 BA view · diff
git:20260717.b0bf60a2026-07-17 b0bf60a 14,068 BA view · diff
git:20260712.028d64e2026-07-12 028d64e 13,484 BA view · diff
git:20260712.6c7cbef2026-07-12 6c7cbef 13,351 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (15828 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

longsizhuo/openinvest · 139 stars · license MIT · pushed 2026-11-05 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_ljxrd5gk6dw72m4e
GET https://markdownregistry.com/api/v1/resolve?ref=longsizhuo/openinvest/CLAUDE.md
GET https://markdownregistry.com/api/v1/blob/adb73964cb8ed5fa2b3c53ff3588c223a7a111070b7520c0366aa7cfe070a924

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: what a CLAUDE.md file is · keeping AGENTS.md and CLAUDE.md in sync · which agent file does what.

More from longsizhuo/openinvest

AGENTS.md AGENTS.md file
longsizhuo/openinvest · AGENTS.md
git:20260712.ae1e4b3 · audit A · 139 stars
CLAUDE.md@experiments CLAUDE.md file
longsizhuo/openinvest · experiments/CLAUDE.md
git:20260709.7aa4ee0 · audit A · 139 stars
invest-backup SKILL.md skill
longsizhuo/openinvest · plugin/skills/invest-backup/SKILL.md · Back up / restore openInvest's local state — memory/ (holdings, strategy, user profile, committee records, dream logs)…
v0.3.0 # x-release-please-version · audit A · 139 stars
invest-ibkr SKILL.md skill
longsizhuo/openinvest · plugin/skills/invest-ibkr/SKILL.md · **BETA — not recommended for anyone.** Operator notes for openInvest's experimental IBKR live autopilot: an LLM picks…
v0.2.0 # x-release-please-version · audit A · 139 stars
invest-setup SKILL.md skill
longsizhuo/openinvest · plugin/skills/invest-setup/SKILL.md · First-time openInvest installation and onboarding. **ONLY use when** user explicitly says "set up invest" / "init…
v0.6.0 # x-release-please-version · audit B · 139 stars
invest SKILL.md skill
longsizhuo/openinvest · plugin/skills/invest/SKILL.md · openInvest multi-asset AI investment committee — **daily use**. Read portfolio / live prices / strategy / decision…
v0.34.1 # x-release-please-version · audit B · 139 stars
okf-frontmatter SKILL.md skill
longsizhuo/openinvest · skills/okf-frontmatter/SKILL.md · Maintain openInvest's docs (docs/wiki chapters + docs/wiki/adr) under Google's Open Knowledge Format (OKF). Two jobs…
v0.3.0 # x-release-please-version · audit A · 139 stars

Every file in longsizhuo/openinvest

Other files named CLAUDE.md

CLAUDE.md CLAUDE.md file
affaan-m/ecc · CLAUDE.md
git:20261020.9471ef4 · audit A · 299,696 stars
CLAUDE.md CLAUDE.md file
firecrawl/firecrawl · CLAUDE.md
git:20261008.5a75dca · audit A · 199,595 stars
CLAUDE.md CLAUDE.md file
garrytan/gstack · CLAUDE.md
git:20261107.ef99eb5 · audit A · 140,694 stars
CLAUDE.md CLAUDE.md file
juliusbrussee/caveman · CLAUDE.md
git:20261106.af560e1 · audit B · 118,366 stars
CLAUDE.md CLAUDE.md file
addyosmani/agent-skills · CLAUDE.md
git:20260720.8fd2081 · audit A · 113,383 stars
CLAUDE.md CLAUDE.md file
nexu-io/open-design · CLAUDE.md
git:20260430.9b57c22 · audit B · 106,541 stars
CLAUDE.md CLAUDE.md file
pbakaus/impeccable · CLAUDE.md
git:20261105.71dfd50 · audit A · 106,186 stars
CLAUDE.md CLAUDE.md file
debpalash/voicestudio · CLAUDE.md
git:20261104.c2998f6 · audit A · 102,675 stars

Browse by kind, by grade A, or by owner.