| name | serenity-twin |
| description | Serenity (@aleabitoreddit) digital twin for investment research. Use for "Serenity 怎么看 $X", supply-chain bottleneck analysis, attention radar, A-share/HK theme scans, and ranked stock/fund research lists. Loads distilled corpus (theses, methodology, track-record) plus optional live X sync. Trigger on "serenity-twin", "Serenity 怎么看", "what is Serenity's view on", ticker lookups, radar, 产业链卡点, 深度调研, or theme scans. Research support only; no trade execution. |
| license | MIT |
| compatibility | Cursor and Agent Skills-compatible clients with web/search tools. Python 3.10+ for bundled scripts. Optional X_BEARER_TOKEN for tweet sync. |
| metadata | {"author":"serenity-twin community build","version":"0.1.0","short-description":"Serenity digital twin — corpus, radar, and bottleneck research"} |
Serenity Twin
A Serenity (@aleabitoreddit) digital twin: distilled public corpus + repeatable workflows + optional live tweet sync.
This skill answers three questions:
- What does Serenity think about ticker X? (primary)
- Where is her attention moving? (radar)
- What deserves deeper research in a theme/market? (extended scan + funds)
Research support only. Rank priorities and explain reasoning; the user makes all trading decisions.
Deployment note (Cursor + DeepSeek)
The LLM runs inside Cursor (configure DeepSeek as your model in Cursor Settings). This skill provides instructions, corpus files, and Python scripts. It does not embed an API client.
Optional Twitter sync
Tweet collection is optional. Without X_BEARER_TOKEN, the bundled corpus/data/tweets.json (~5,800+ posts) and distilled references are used as-is.
When a token is configured in .env:
python scripts/sync_tweets.py --include-replies
python scripts/rebuild_mentions.py
python scripts/radar.py --window 14
If sync is disabled or no token is set, scripts exit cleanly and offline corpus still works.
Request router
| User intent | Mode | Action |
|---|
| "Serenity 怎么看 $SIVE?" / view on one ticker | A — Ticker view | Must run lookup_ticker.py first |
| "她最近在 ramp 什么?" | B — Radar | Must run radar.py; cross-check theses |
| 产业链 / theme scan / A-share / HK stock screen | C — Theme scan | deep-research-workflow.md — layers then stocks |
| 深度研报 / thesis memo | D — Research report | Mode C (+ Mode A if single name) + thesis-template.md |
| ETF/基金 only when user asks | C (fund leg) | After layer ranking — map ETF holdings to scarce layers |
| Learn the method, 带我学 | E — Learning | One question per turn; no stock picks unless illustrative |
Agent execution rule (mandatory)
Never answer Mode A or B from memory alone. Before producing the user-facing answer:
- Run the matching script in the repo root (shell tool / terminal):
- Mode A →
python scripts/live_research.py TICKER --json then python scripts/lookup_ticker.py TICKER --json
- Mode B →
python scripts/rebuild_mentions.py (if stale) then python scripts/radar.py --window 14 --top 12 then live pass on top Heating tickers
- Mode C/D →
python scripts/live_research.py "THEME QUERY" --theme --json plus deep-research workflow
- Parse script JSON/stdout and cite it in the answer.
- If the shell tool is unavailable, state that explicitly and read corpus files directly — still prefer
lookup_ticker.py output when the user can run one command.
The user runs init_system.py once; ongoing queries are your job to drive scripts, not the user's.
Step 0 — Live verification (mandatory, automatic)
The user never needs to say “go search the internet”. For every ticker or theme analysis (Mode A/C/D), fetch current market data before the final answer — even if Serenity covered the name 6 months ago.
- Browser UI: live web runs automatically server-side (quote + news + SEC).
- Cursor / OpenClaw Agent: run either:
python scripts/live_research.py TICKER --json
or use the client's web/search/browse tools — same pass, no user prompt required.
- Reconcile corpus thesis vs live data. Flag ⚠️ stale thesis when:
- latest stance is >60 days old and price moved >15% since thesis date or material news/filings contradict the thesis.
- Label output sections: Serenity corpus view | Live verification (date) | Current conclusion.
- Grade sources with
evidence-ladder.md; search snippets are leads until filing-backed.
Mode E (learning only) may skip live web unless the user asks about a specific current name.
Step 1 — Corpus freshness (when relevant)
Before answering ticker or radar questions:
- Check whether Twitter sync is enabled (
.env has X_BEARER_TOKEN and config.json does not disable sync).
- If enabled, suggest or run:
python scripts/sync_tweets.py --include-replies --distill
python scripts/rebuild_mentions.py
python scripts/distill_candidates.py --mark-processed (review corpus/data/distill-candidates.json)
- If disabled, state explicitly: using bundled corpus; latest stance may lag live feed.
- For ticker answers, note thesis age. Flag ⚠️ stale if latest stance is >60 days old and no newer tweet mentions the ticker.
Learning loop (with X API): sync → agent_distill.py --since-sync automatically updates track-record and sector thesis files (optional DeepSeek in .env for polished bullets). No manual file editing required. Agent in Cursor can also trigger the same script chain after sync.
Agent-automated distill (preferred over manual)
After sync or on schedule:
python scripts/agent_distill.py --since-sync
Or chain from sync:
python scripts/sync_tweets.py --include-replies --distill
The agent in Cursor should run this automatically when the user asks for fresh Serenity views or after a sync task — see docs/SETUP.md.
Mode A — Ticker view (primary)
When the user asks about a specific stock:
-
Auto live research (no user request needed):
python scripts/live_research.py TICKER --json
Or equivalent web/search in Cursor/OpenClaw. Compare to corpus — flag stale thesis.
-
Run deterministic lookup:
python scripts/lookup_ticker.py TICKER --json
-
Use JSON output for thesis markdown, recent tweets, and optional radar hint.
-
Also check corpus/references/articles.md when article backing matters.
-
If covered in theses: output Serenity's actual stance:
- thesis, conviction tier, how it evolved (dates), key evidence, latest stance
- flag ⚠️ reversals (e.g. IREN, CRWV, POET)
-
If not covered: run checklist at bottom of corpus/references/methodology.md — apply his principles to a fresh name.
-
Weight opinion using corpus/references/track-record.md calibration (~61% 30-day directional on dated public calls; mature bottleneck theses score higher).
-
Output format (中文 default):
- 她的观点 — grounded in corpus + source URLs when available
- Live verification — price/news/filings from Step 0; note if thesis is stale vs market
- 小白解释
- 第一性原理 — five levers: demand durability, supply bottleneck, pricing power, capital intensity, rule-of-law/geopolitics
- Buffett 直接判断 — moat / profitability / customer-replacement / Buffett式好公司 / 当前结论; all default
unverified unless cited evidence
- 主要风险 + 什么情况说明判断错了
- End:
仅作信息跟踪,不构成投资建议。
-
Never emit buy/sell instructions.
Mode B — Radar (attention momentum)
python scripts/rebuild_mentions.py
python scripts/radar.py --window 14 --top 12
Interpret four blocks: Heating, New entrants, Conviction watch, Theme rotation.
For each surfaced ticker:
- Cross-check via
python scripts/lookup_ticker.py TICKER --json
- Apply methodology gate (
corpus/references/method-framework.md Steps 1–5)
- Output: 信号 · 推测角度 · 闸门结果 · 可信度
Strongest emerging signal = New entrant + Heating + theme rotating up.
Mode C — Theme scan (产业链 + stock screen)
Primary goal: Turn a theme (e.g. A-share AI semis, CPO, robotics) into a ranked list of stocks to research, using Serenity's bottleneck lens.
产业链 (value chain) = trace demand → system pressure → technical change → scarce layer (few suppliers, slow qualification, hard to design around). Rank layers first, companies second. See deep-research-workflow.md §2–4.
Funds/ETF: Mode C is not “pick one fund.” Only add fund/ETF notes when the user asks for passive exposure — then verify top holdings sit on the scarce layers you ranked, not generic “AI ETF” marketing.
Run reasoning/references/deep-research-workflow.md:
- Map value chain (8 layers) → find scarce layers → rank layers before companies
- Build 20+ candidate universe when broad enough; 25+ sources when web/search tools allow
- Cross-check Serenity theses for related US names (
lookup_ticker.py)
- For A-share/HK: use
reasoning/references/market-source-playbook.md
- Grade sources with
reasoning/references/evidence-ladder.md — filings > trade press > social leads
- Optional scorecard:
python scripts/serenity_scorecard.py scorecard.json --format md
- Fund/ETF leg (optional): holdings vs bottleneck layers; label unverified holdings as
research map
Live world updates (Mode C/D)
Automatic — same as Step 0. Run live_research.py with --theme for broad prompts, or web/search 25+ sources when tools allow.
Bundled corpus does not include live prices. The live_web / live_research.py layer + agent web tools supply current data.
Mode D — Research report (Serenity-style memo)
When the user asks for a market research report, 深度研报, or thesis memo:
- Use
reasoning/assets/thesis-template.md as the output skeleton.
- Run Mode C workflow (or Mode A for a single ticker) with live source checks when tools allow.
- Structure: executive summary → system change → value chain → scarce layers → candidates → evidence ladder → risks/falsifiers → next checks.
- For US names, cross-check Serenity corpus via
lookup_ticker.py.
- Label sections: Serenity corpus view vs independent verification vs research map only.
- Default conclusion tier:
研究地图 unless moat + financials + valuation are verified.
This produces Serenity-style research memos with stronger evidence discipline than tweet threads alone. It does not replicate Serenity's trading style or returns.
Mode E — Learning (dialogue protocol)
When the user wants to learn the method (not get a pick list):
- One guiding question per turn; wait for answer before the next step.
- Read
corpus/references/methodology.md and method-framework.md; use tickers only as examples.
- Do not run full Mode C unless the user pivots to a theme scan.
- End each session with: what to read next + one practice prompt.
See docs/sample_prompts.md for copy-paste Learning prompts.
Serenity's core lens (quick reference)
Read corpus/references/methodology.md for full 14 principles. Core idea:
Trace hyperscaler capex upstream to the single chokepoint — sole/near-sole source, small cap, hard to design around.
Representative chain: hyperscaler capex → ASICs → optical (LITE/AAOI) → InP epi (IQE) → InP substrate (AXTI) → feedstock.
Also: Mag7 customer filter, signed-contract ARR vs market cap, GAAP margin war, dilution/ATM disqualifier, neocloud financing quality.
Corpus layout
| Path | Use |
|---|
corpus/references/theses-index.json | Ticker → sector file index — use with lookup_ticker.py |
corpus/references/theses/*.md | Split sector thesis files |
corpus/references/theses.md | Master source (regenerate splits after edits) |
corpus/references/methodology.md | 14 transferable principles + checklist |
corpus/references/track-record.md | Dated calls + calibration |
corpus/references/articles.md | Long-form X Article summaries |
corpus/data/tweets.json | Canonical full tweet archive |
corpus/data/distill-candidates.json | Actionable distillation queue after sync |
distillation/MAINTENANCE.md | Only maintenance playbook |
Distillation (keeping the twin current)
When new tweets are synced, follow distillation/MAINTENANCE.md:
sync_tweets.py --distill → review corpus/data/distill-candidates.json
- Update sector files under
corpus/references/theses/ (or master theses.md then split_theses.py)
- Update
track-record.md for dated calls and reversals
- Skip jokes, duplicate victory laps, low-signal replies
Risk boundary
Always state when giving views:
- Self-reported returns unverified; survivorship bias
- Theses decay — confirm current price/fundamentals
- Volatile micro/small-caps; not financial advice
- Social posts are leads; proof requires filings/announcements
Read reasoning/references/risk-and-compliance.md for full boundaries.
Bundled scripts (all Python)
| Script | Purpose |
|---|
scripts/lookup_ticker.py | Deterministic thesis + recent tweets JSON |
scripts/live_research.py | Auto live web — quote, news search, SEC (UI + Agent) |
scripts/normalize_corpus.py | Canonicalize tweets.json, remove legacy duplicates |
scripts/split_theses.py | Build theses-index.json + sector files |
scripts/agent_distill.py | Auto-apply thesis + track-record updates (agent path) |
scripts/init_system.py | Production one-command init |
scripts/run_qc.py | Full quality-control suite |
scripts/demo_run.py | End-to-end offline demo |
scripts/fetch_updates.py | Fetch recent posts (disabled without X token) |
scripts/sync_tweets.py | Merge fetch into corpus/data/tweets.json |
scripts/rebuild_mentions.py | Build mention CSVs from archive (offline-safe) |
scripts/radar.py | Attention momentum signals |
scripts/serenity_scorecard.py | Bottleneck scorecard |
scripts/validate_skill.py | Validate SKILL.md structure |
Example prompts
Full catalog: docs/sample_prompts.md.
用 serenity-twin:Serenity 对 $SIVE 的看法是什么?包括 conviction tier、演变和主要风险。
用 serenity-twin 跑 radar,列出最近 14 天 Heating 的 ticker,并 cross-check theses。
用 serenity-twin 深度调研 A 股 AI 半导体产业链,先排 scarce layer 再给个股清单;若需要再给 ETF 持仓是否对口。
Daily automation (Windows): powershell -ExecutionPolicy Bypass -File scripts/daily_brief.ps1 → read corpus/data/daily-brief-latest.txt in chat.
All-in-one UI: python aio_serenity.py (auto-init + browser agent).