{"slug":"us-stock-analysis","title":"us-stock-analysis","summary":"Workspace-aware US stock analysis for kcn. Routes through `clawock analyze-us` / `clawock us-quotes` instead of generic web search, then layers fundamental/technical/news analysis on top. Use when user asks to analyze a US ticker (e.g. \"analyze AAPL\", \"look at RKLB\", \"compare TSL","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-08-23T09:00:39.38179Z","repo":{"url":"https://github.com/KCNyu/clawock","stars":15,"forks":0,"license":"MIT","updatedAt":"2026-09-25T07:36:11Z"},"bodyHtml":"<hr>\n<p>name: us-stock-analysis\ndescription: Workspace-aware US stock analysis for kcn. Routes through <code>clawock analyze-us</code> / <code>clawock us-quotes</code> instead of generic web search, then layers fundamental/technical/news analysis on top. Use when user asks to analyze a US ticker (e.g. \"analyze AAPL\", \"look at RKLB\", \"compare TSLA vs NVDA\"), check earnings, run technicals, or write an investment report on a US name.\ntriggers:</p>\n<ul>\n<li>\"analyze \"</li>\n<li>\"美股 \"</li>\n<li>\"look at AAPL/NVDA/...\"</li>\n<li>\"compare X vs Y\"</li>\n<li>\"stock report\"</li>\n</ul>\n<hr>\n<h1>US Stock Analysis</h1>\n<p>Workspace-native US stock analyst. Always uses kcn's local pipeline for price/RSI/MA/signal — uses web search only for news, peer data, fundamentals.</p>\n<h2>Required reads before answering</h2>\n<p>In this order:</p>\n<ol>\n<li><code>/root/.openclaw/workspace/MEMORY.md</code> — data rules and traps (especially the \"禁止用 portfolio.json 缓存价\" rule)</li>\n<li><code>/root/.openclaw/workspace/TOOLS.md</code> — script paths, provider fallback chains, skill routing table</li>\n<li><code>/root/.openclaw/workspace/INVESTMENT_SOP.md</code> — standard startup sequence for investment questions</li>\n<li><code>/root/.openclaw/workspace/portfolio.json</code> — if the ticker is in the active book, cost basis and PnL matter</li>\n</ol>\n<h2>Data source rule (non-negotiable)</h2>\n<p><strong>Default path — use the workspace script, not web search:</strong></p>\n<pre><code># Full analysis: refreshes price + RSI-14 / MA20 / MA50 + Finnhub news + signal\n/root/.local/bin/clawock analyze-us {TICKER}\n/root/.local/bin/clawock analyze-us {TICKER} --no-news    # skip news (save Finnhub quota)\n\n# Price-only refresh\n/root/.local/bin/clawock us-quotes {TICKER}\n</code></pre>\n<p>The script internally runs the 7-route fallback (Nasdaq API → Eastmoney → Finnhub → Yahoo v8 → yfinance → Alpha Vantage → Polygon), pulls <code>prev_close</code> independently from Polygon's <code>/prev</code> endpoint (so <code>today_change</code> is trustworthy after close), and writes back to <code>portfolio.json</code> if the ticker is held. Bypassing it re-introduces every bug it was written to fix.</p>\n<p><strong>Web search is only for:</strong> earnings transcripts, SEC filings, analyst notes, sector news, peer fundamentals, qualitative thesis material — never primary price quotes.</p>\n<p><strong>Forbidden:</strong> Sina US quotes API (境外 403), raw Yahoo scraping when the script already covers it, reading <code>portfolio.json</code> cached <code>current_price</code> without first refreshing.</p>\n<h2>Four analysis modes</h2>\n<p>Pick the smallest mode that answers the question. Default to <strong>Quick Read</strong> unless the user explicitly asks for deep analysis.</p>\n<h3>Mode 1 — Quick Read (most common)</h3>\n<p><strong>When:</strong> \"What's RKLB at?\" / \"How's NVDA doing today?\"</p>\n<ol>\n<li>Run <code>clawock analyze-us {TICKER} --no-news</code> for price + RSI/MA/signal</li>\n<li>If in active book, pull cost basis + PnL from <code>portfolio.json</code></li>\n<li>One short paragraph: price, today's move, RSI/MA stance, one-line verdict</li>\n</ol>\n<h3>Mode 2 — Technical Read</h3>\n<p><strong>When:</strong> \"Is X oversold?\" / \"Where's resistance on Y?\"</p>\n<ol>\n<li>Run <code>clawock analyze-us {TICKER} --no-news</code></li>\n<li>Load <code>references/technical-analysis.md</code> for indicator interpretation</li>\n<li>Output: trend (up/down/sideways), MA20/50 stance, RSI-14 reading (oversold &lt;30, overbought &gt;70), recent support/resistance from price action, one-line risk note</li>\n</ol>\n<h3>Mode 3 — Fundamental Read</h3>\n<p><strong>When:</strong> \"Is X overvalued?\" / \"Analyze Y's business\"</p>\n<ol>\n<li>Run <code>clawock analyze-us {TICKER}</code> for fresh price baseline</li>\n<li>Run <code>clawock filings {TICKER}</code> — pulls SEC EDGAR: latest 10-K/10-Q/8-K + 13 key XBRL concepts (revenue/net income/cash/EPS/assets/equity, 4 most recent periods). <strong>Use this before web search</strong> — primary source, structured, no scraping.</li>\n<li>(Optional) <code>clawock filings {TICKER} --form4</code> if insider activity is material to thesis</li>\n<li>(Optional 中文速查) <code>clawock fundamentals {TICKER} --indicators</code> — 东财 GMAININDICATOR 一次给齐 ROE/毛利率/净利率/资产负债率（比从 XBRL 自算比率快）；数字与 SEC 冲突时以 SEC 为准</li>\n<li>Web search only for what SEC EDGAR can't give: peer multiples, analyst consensus, qualitative thesis, sector context</li>\n<li>Load <code>references/fundamental-analysis.md</code> for framework, <code>references/financial-metrics.md</code> for ratio definitions</li>\n<li>Output: business overview, financial trends from XBRL, valuation vs peers/history, insider signal, key risks, fair value range</li>\n</ol>\n<h3>Mode 4 — Full Report</h3>\n<p><strong>When:</strong> \"Give me a full report on X\" / \"Should I add X?\"</p>\n<ol>\n<li>Run script (Mode 1 baseline)</li>\n<li>Do fundamentals (Mode 3)</li>\n<li>Do technicals (Mode 2)</li>\n<li>Do sentiment (Mode 5)</li>\n<li>Web search for catalysts (next earnings date, upcoming product/regulatory events)</li>\n<li>Load <code>references/report-template.md</code> for structure</li>\n<li>Output: executive summary + bull case + bear case + valuation + technical setup + sentiment read + risk + catalyst calendar + concrete entry/exit levels</li>\n</ol>\n<h3>Mode 7 — Intraday Check-in (cron-driven, every 30 min, harness 化 ✨)</h3>\n<p><strong>When:</strong> US 盘中由 evening + overnight 两个 HKT cron 拼接，比 Mode 6 更轻量、更高频。\n精确 EDT/EST 表达式只读 <code>config/cron-schedules.json</code> / 生成的 <code>docs/operations/cron-schedules.md</code>；\n每日 DST 同步器会同时调整 live cron 与 watchdog。隔夜始终最晚 02:30 HKT，给 03:00\ndreaming 留独占窗口，所以 EST 季比 EDT 季少两个 slot。</p>\n<p><strong>Harness 4-step</strong>：</p>\n<h4>Step 1: preflight</h4>\n<pre><code>clawock intraday preflight --market us\n</code></pre>\n<p>输出 <code>memory/.tmp/intraday-context-us-latest.json</code>，并把<strong>同一份 JSON</strong> 打到 stdout（含 <code>context_id</code> —— Step 3 要原样回传）。关键字段：<code>should_alert</code> + <code>alert_reasons</code>，另有 <code>peer_scan</code>（本腿持仓的板块+同业涨跌，已排序）和 <code>plan_context</code>（08:00 简报为本腿定下、尚未成交的决策）。</p>\n<ul>\n<li><code>active_information_candidates</code> — 框架已完成一手披露扫描、底层去重、<code>candidate|wait|reject</code> 与探索上限计算；这里只消费结构化结果，不在 skill 里重算阈值、方向或股数。三态都不是下单授权。</li>\n<li><code>mover_thesis</code> — <strong>只对本轮异动票</strong>的 thesis 只读快照：<code>state</code>、<code>triggered</code>/<code>watch</code> 红线（含 severity 与 required_action）、下次 review trigger；最新一次 entry gate 判 <code>reject</code> 也会标出来。没有基线就是 <code>unknown</code>，不许靠记忆补。<strong>这是归因语境不是催化剂</strong>：红线解释「这个跌为什么要紧、当初说好要怎么做」，但能不能动手仍由 catalyst-gate 决定（软消息/情绪不构成主动操作依据）。</li>\n<li><code>mover_news</code> — <strong>只对本轮异动票</strong>、有限预算抓回来的「刚发生了什么」：<code>tier=primary</code> 是交易所/监管一手文件（港股=港交所公告，美股=SEC filing，带 <code>age_minutes</code>），<code>tier=supporting</code> 是券商研报/媒体/7×24 快讯。<strong>只有 primary 才可能构成硬催化</strong>（仍要过 catalyst-gate）；supporting 只能当色彩，不能作为主动操作依据。\n<ul>\n<li><code>known_catalysts</code> 是当天 08:00 brief 已核过、且只按本轮异动票裁剪的结构化催化。它回答「此前已知什么」，<code>mover_news</code> 回答「这个分钟窗口新发生什么」；两者不能混为一谈，也不因此扩大新闻窗口。</li>\n<li><code>status=no_recent_filing</code> 是<strong>明确的空</strong>：写「窗口内无一手公告」，不要改口编一个理由；<code>status=degraded</code> 说明源没抓到，同样如实写。</li>\n<li>用法铁律：异动票必须给出归因或明写「无法归因」。<strong>不要把 <code>mover_news</code> 整块抄进报告</strong>——最多引 1–2 条最相关的标题+时间。</li>\n<li>一手文件都没有、而异动又很大时，才允许用<strong>内置 web search</strong> 补一次（禁止 Tavily：盘中不烧额度）。</li>\n<li>三级分流（<code>config/filing-triage.json</code>）：<code>signal=interrupt</code>（8-K/13D/配售/盈警/停牌/业绩…）才可能算硬催化；<code>context</code> 只作背景；<code>noise</code>（Form 3/4/144/13G、翌日披露报表、月报表、法律意见书）<strong>直接不进上下文</strong>，只留 <code>suppressed_noise</code> 计数。没见过的标题一律 <code>context</code>，不会被悄悄丢掉。</li>\n<li>基金看穿：2x 单票 ETF 查的是<strong>它跟踪的公司</strong>（<code>target.kind=look_through</code>，如 PLTU→PLTR）；指数/板块基金没有发行人，直接标 <code>index_fund_no_issuer</code>，不会假装「公司没公告」。</li>\n<li><code>halts</code>（仅美股，每 slot 一次共享请求）：持仓或其标的被停牌时给出 <code>reason_code</code>（LULD 的 <code>LUDP</code> 最常打到 2x ETF）与复牌时间；港股停牌走公告（已在 triage 里判 interrupt）。</li>\n</ul>\n</li>\n</ul>\n<p>若 <code>delivery_mode=unchanged_receipt</code>：和上一次实际送达相比，风险档位、异动档位、盘中 setup、未成交计划和一级披露均无语义变化。<strong>不要生成散文、不要写 prose/sidecar</strong>，直接运行 <code>clawock intraday postflight --market us --context-id {context_id}</code>。harness 会发送带行情覆盖和一级源检查状态的一行回执；每档仍然可见，不是跳过。成功后输出 <code>wechat_prefix</code> + <code>raw_wechat_block</code> 并结束。下面 Step 2–2.5 只适用于 <code>delivery_mode=full_delta</code>。</p>\n<h4>Step 2: 只写 <code>▎我的看法</code> 散文（数据块归 harness）</h4>\n<ul>\n<li>❌ <strong>不要抄 <code>raw_wechat_block</code>，不要重画那张表</strong> —— postflight 在发送时自己把它拼在你的散文前面。\n你抄一遍只会引入排版误差：2026-07-28 00:30 就因为一格多打了一个空格，整段分析被丢掉只发了数据块。\n数据块里的市值/持仓表/亏损持仓行<strong>已经在消息里了</strong>，你的输出从 <code>▎我的看法</code> 开始。</li>\n<li>你交付的就是这一段：<strong>至少 60 字（postflight 软下限），目标 2-3 行</strong>\n<ul>\n<li>若 <code>anomalies</code> 非空，<strong>必须</strong>提其中至少一个票；主动一级信息本身也会令 <code>should_alert=true</code>，此时不能虚构一个价格异动。</li>\n<li><code>active_information_candidates.candidates</code> 非空时，至少写最相关一条：Bull 只陈述一手细节及预期传导，Bear 检查是否已 price-in/方向是否仍未知，Judge 照抄 harness 的 <code>candidate|wait|reject</code>、falsifier 与 next evidence；只能降级，不能自行补方向、价格、股数或授权。<code>degraded_issuers</code> 必须说“一级源降级”，不能说“没有消息”。</li>\n<li>\uD83D\uDCC8 <strong>加仓侧读数(<code>add_side_reads.rows</code> 非空时必写 1 行)</strong>:harness 已经把异动、机会雷达\n(接近 20 日高)、早期趋势三条 lane 连同 thesis 红线和未了结的纪律动作 join 成\n<code>candidate|wait|reject</code>。<strong>照抄 <code>verdict</code> + <code>why</code> + <code>needs</code>,数字照抄 <code>evidence</code></strong>\n(<code>move_pct</code> / <code>pct_from_high</code> / <code>prior_20d_high</code>),写成\n「{票} : → 」。多条就写最急的 1-2 条(rows 已按 candidate→reject→wait\n排序)。纪律铁律不变:<strong>三态都不是下单授权</strong>,不许自行补方向、价格、股数;\n软消息/情绪只能停在 <code>wait</code>;技术突破态(收盘站上前 20 日高且未过热)本身即促成\n<code>candidate</code>,一手公告只是升级措辞;\n<code>reject</code> 说明有纪律动作没走完,这时不要把它写成「可以加仓」。\n带 <code>evidence.proxy_label</code> 的行,它的位是<strong>代理标的</strong>的位(恒科指数之于 07226、\nSPCX 之于 SPCH),<code>needs</code> 已经把指名写进句子了——<strong>照抄那句,别把\n<code>proxy_prior_20d_high</code> 当成这只票自己的价位</strong>(4948.5 是指数点位,07226 现价个位数)。</li>\n<li><strong>异动归因（<code>should_alert=true</code> 时必写，占 1 行）</strong>：从 <code>mover_news.tickers[票].items</code> 里挑 <strong><code>signal=interrupt</code></strong> 的第一条，写成\n「{票} {幅度}% ← {标题要点}（ 分钟前 / ）」。多只异动票就各写一行，最多 3 行。\n<ul>\n<li><code>halts</code> 里有这只票 → <strong>先写停牌</strong>（<code>reason_code</code> + 复牌时间），它比任何标题都能解释一次跳动。</li>\n<li>只有 <code>context</code> 没有 <code>interrupt</code> → 写「无一手催化，{context 标题}仅作背景」。</li>\n<li><code>status=no_recent_filing</code> → 先查 <code>known_catalysts[票]</code>：有则写「窗口内无新公告；沿用今早已知催化：（）」；没有才写「窗口内无新公告，且无已知催化，暂无法归因」。<code>index_fund_no_issuer</code> → 写「指数基金无发行人公告，看成分/板块」。</li>\n<li><code>status=degraded</code> → 写「催化源未取到」，别把它说成「没有消息」。</li>\n<li>引用<strong>至多两条</strong>、每条一行；<code>suppressed_noise</code> / <code>more_interrupts</code> 只是计数，不要写进报告。</li>\n</ul>\n</li>\n<li>必须包含：今天该看/该等/该减 + 引用至少 1 个具体数字（票现价 / 异动幅度 / 信号 / RSI）</li>\n<li>\uD83D\uDCCB <strong>计划对账（<code>plan_context</code> 非空时必写 1 行）</strong>：08:00 定下、还没成交的决策就在 <code>plan_context.open[]</code> 里——<strong>不要再去 <code>cat</code> plan.json 或 decisions.jsonl</strong>（2026-07-27 10:05 那样手刨 6 次还把 swap 股数说错，issue #119/#120）。写「{票}   股仍挂着 / 已成交」，股数<strong>照抄 <code>shares</code> 字段</strong>；<code>driven_by=risk_rule</code> 的纪律动作不许被改写成「等回踩再做」；<code>carried_over&gt;0</code> 要点名往日挂单。</li>\n<li>\uD83D\uDD22 <strong>数字铁律</strong>：金额/股数一律<strong>照抄 context</strong>，不换算不心算；<strong>别在 <code>▎我的看法</code> 里重述持仓股数或市值</strong>（数据块里已经有了，但 <code>plan_context.open[].shares</code> 这种「本单动多少股」是要写的）；前瞻性数字要么给算式要么不写。postflight 的 <code>check_numeric_claims</code> 会把 context 里没有的数字和自相矛盾的区间标成 warn（issue #120）。</li>\n<li>⚡ <strong>板块全景</strong>：数据<strong>已由 preflight 备好</strong>在 context.json 的 <code>peer_scan</code> 里（每个 active ticker 一项：<code>theme</code> 板块名、<code>listed_peers</code> 已按今日涨幅降序、含 <code>pct_1d</code>/<code>pct_5d</code>、<code>divergence_signal</code>、<code>self_pct_1d</code>）。<strong>直接引用它,不要自己去读 peer-map.json、也不要自己调 <code>clawock fetch-peers</code></strong>；给对应主题成分今日 Top 5 + 你持仓位置 + 1 句归因;<code>peer_scan</code> 为空或缺项时才回退 web search。若某条带 <code>name_mismatch</code>,以 feed 名为准并在报告里提一句。持仓自己的数字仍从 context.json。板块行情<strong>优先用内置 web search</strong>；<code>tavily-search</code> 仅在<strong>开盘/收盘报告</strong>或盘中真事件时才用，且必带 <code>--bucket report</code>/<code>--bucket intraday</code>（见 Mode 5 的 Budget rule）——盘中每 30 分钟的常规盯盘<strong>不要</strong>烧 Tavily</li>\n<li>禁止\"无异动，观望\"这种敷衍 1 句话</li>\n</ul>\n</li>\n<li>不设字数目标；postflight 只有一道防复读死循环的天花板：&gt;5000 warn，&gt;6000 fail（算的是拼装后的整条消息）</li>\n</ul>\n<h4>Step 2.5: 写 dashboard 状态横幅 sidecar</h4>\n<p><strong>规范见 <code>skills/_shared/intraday-status-sidecar.md</code></strong>（hk/us 共用单一来源）—— 写 <code>memory/.tmp/intraday-insights-{date}.json</code>（status_banner + 每个异动票 movers 归因，只文本无 key）。</p>\n<ul>\n<li>本市场杠杆 ETF：<strong>ROBN/PLTU/MSFU/SOXL/TQQQ</strong> 等（2x 标的），归因要点明\"杠杆放大\"、区分标的真涨还是纯 beta。</li>\n</ul>\n<h4>Step 3: postflight（先写文件，再调用 —— 禁用 heredoc / here-string 重定向）</h4>\n<p><strong>必须两步、按顺序</strong>：先用文件写入工具把 Step 2 的散文写到\n<code>memory/.tmp/intraday-prose-us.md</code>，确认写入成功后再调用（命令写成一行）：</p>\n<pre><code>clawock intraday postflight --market us --context-id {Step 1 的 context_id} --text-file /root/.openclaw/workspace/memory/.tmp/intraday-prose-us.md\n</code></pre>\n<p><code>--context-id</code> 必须是 Step 1 打印的那个：不匹配说明 context 已被换代（散文和数据不同代），\npostflight 拒绝拼装、只发数据块。</p>\n<p>❌ <strong>不要用 here-string / heredoc 重定向把散文塞进 stdin</strong> —— 内容含 emoji、<code>$</code> 和换行，\nshell 引号极脆；2026-07-23 10:00 就因为模型漏喂 stdin，postflight 读到空串后吐出\n4 条\"报告写错了\"的假 issue，run 被标红（实际重试后投递正常）。\npostflight 现在把空输入/旧文件单独判成 <code>status: input_error</code>（不是 <code>fail</code>），并要求\n文件 20 分钟内更新过 —— <strong>忘了重写文件就会被拒</strong>，不会把上一个 slot 的旧散文重发。</p>\n<p>⏱ <strong>看到 SIGTERM / exec 超时 ≠ 报告没发出去，别原样再跑一遍。</strong> exec 的 overall-timeout\n只杀命令外壳，postflight 子进程还在继续跑，通常微信早发出去了。先读\n<code>memory/.tmp/intraday-sent-us.json</code>：<code>ts</code> 是本 slot 的、且有 <code>sent_ok</code> / <code>tg_ok</code>\n就是已投递。（2026-08-13 09:30 港股开盘那次双发的机制，#508；postflight 现在有发送前\nclaim 会挡住第二次真发，但那一跑仍然是白跑。）</p>\n<p>校验段标记 + 长度 + 异动票提及（都只校验你写的那段，不校验拼进来的数据块）。\n<strong>不提交 <code>portfolio.json</code></strong>；若 dashboard 有语义变化，postflight 会重建并提交\n<code>assets/data/dashboard.json</code>。每个 slot 的完成/投递状态另写 heartbeat，由 single\npublisher 发布。</p>\n<h4>Step 4: 输出报告（仅存档；微信已由 postflight 主发，禁用 message 工具）</h4>\n<p>微信投递已在 <strong>Step 3 的 <code>intraday_postflight</code> 用 fresh-token 短连接发出</strong>（cron <code>--no-deliver</code>，不 announce）——唯一路径。拼 <code>wechat_prefix</code> + 你的散文，<strong>无标题</strong>，作为<strong>本回合最终文本回复</strong>直接输出（仅存档）。</p>\n<ul>\n<li>❌ <strong>禁止调用 <code>message</code>/send 工具</strong> — postflight 已发，手动再调会<strong>双发</strong>；<code>intraday_watchdog</code> 只在 Telegram marker 缺失/失败时补投 Telegram，不重发微信。整轮只输出一次，发完即停。</li>\n</ul>\n<p><strong>和 Mode 6 的区别</strong>：单段 <code>▎我的看法</code> 取代三段；无 ▎风险提示；不提交\n<code>portfolio.json</code>（但会发布 dashboard 语义变化 + slot heartbeat）；holdings 用 markdown 表格。\n<strong>相同点</strong>：两者都是散文模式 —— 数据块由 postflight 拼装，你只写分析。</p>\n<h3>Mode 6 — WeChat Briefing (cron-driven, harness 化 ✨)</h3>\n<p><strong>When:</strong> 美股开盘 / 美股收盘 两个 cron 走这个 mode。</p>\n<p><strong>Harness 4-step</strong>：</p>\n<h4>Step 1: 跑 preflight</h4>\n<pre><code>clawock report preflight --market us --phase {open|close}\n</code></pre>\n<p>跑 <code>clawock analyze-us --wechat --md-table</code> + 抽信号 + 异动，写 context 文件，并把<strong>同一份 JSON</strong> 打到 stdout（含 <code>context_id</code>；末行是 <code>context_path:</code>）。若输出 <code>market_closed</code>，本回合到此结束。</p>\n<h4>Step 2: 只写分析散文</h4>\n<p><strong>你不写数据块、不写表格、不写标题</strong> —— postflight 自己从 context 拼。2026-07-24 之前是让模型 verbatim 拷贝数据块，结果模型读错 context 就把一天前的数字发了出去；现在那条回路已经拆掉，数字在发送时刻直接取自 context 文件。</p>\n<p>用 stdout 里的字段：<code>signal_count</code> / <code>anomalies</code> / <code>index_direction</code> / <code>needs_risk_section</code> / <code>peer_scan</code> / <code>plan_context</code>（08:00 简报还没执行完的决策，见下）/ <code>mover_news</code>（异动票的一手催化）/ <code>mover_thesis</code>（异动票的 thesis 与红线）（板块 + 同业 Top 5 今日/5日涨跌 + 背离信号，板块全景段直接用它）；<code>raw_wechat_block</code> 是给你参考数字用的，<strong>不要抄进散文</strong>。</p>\n<p>⚠️ <strong><code>plan_context</code> 对账（非空时 ▎操作建议 必写，写在该段最前）</strong>：里面是 08:00 简报为本腿定下、<strong>还没成交</strong>的决策（<code>open[]</code>：<code>ticker</code>/<code>action</code>/<code>shares</code>/<code>pct</code>/<code>condition</code>/<code>confidence</code>/<code>driven_by</code>/<code>rationale</code>，外加 <code>exec_mode</code> 当日执行方式、<code>carried_over</code> 有几条是往日挂到今天的）。</p>\n<ul>\n<li><strong>不许给同一只票提相反的建议</strong>。<code>driven_by=risk_rule</code> 的是<strong>纪律动作不是择时</strong>——给它加「等回踩 / 等反弹 / 等站稳」这类条件就是推翻简报（issue #119）。要推翻必须明写理由和新证据。</li>\n<li><code>exec_mode.today_override</code> 说了 MOO 就不许改写成限价单口径。</li>\n<li>股数/比例<strong>照抄 <code>shares</code>/<code>pct</code>，不许换算也不许心算</strong>；<code>carried_over&gt;0</code> 时点一句「 条昨日挂单仍未成交」。</li>\n<li><code>plan_context</code> 为 <code>{}</code> 说明今天本腿没有未完成决策，按正常写，不要编一个计划出来。</li>\n<li><code>plan_context</code> 里带 <code>error</code> 字段说明<strong>计划没读出来，不是今天没有计划</strong>（issue #136）。此时必须在 ▎操作建议 开头写一行「今日计划未取到（），以下建议未与 08:00 简报对账」，并且<strong>不许</strong>顺势断言「今天没有未完成决策」。</li>\n<li>可选键（#605/#609）：<code>overridden_by_user</code> = 用户已 override 的 risk_rule 砍单（已隐藏并结案，<strong>不要再提「该砍未砍」</strong>）；<code>reinvest_candidates</code> = 砍/trim 的弹药去向候选（仅当 <code>open[]</code> 真有 cut/trim 时出现；是观察不是授权，配对话术照抄候选 ticker 与 trigger，不许虚构「砍 X 的弹药」当 <code>open[]</code> 里没有 X）。</li>\n</ul>\n<p>\uD83D\uDD22 <strong>数字铁律（postflight 会查，见 <code>check_numeric_claims</code>）</strong>：散文里出现的每个金额/股数<strong>必须是 context 里已有的数字</strong>，照抄不换算。</p>\n<ul>\n<li><strong>禁止重述持仓股数、持仓市值、浮盈金额</strong> —— 这些 postflight 已经拼在消息开头了，重述一遍只会多一次说错的机会（2026-07-27 就把 6200 股的仓位写成 1000 股）。<strong>例外且仅此一个</strong>：<code>plan_context.open[].shares</code> 是「这一单要动多少股」，照抄它是被要求的；被禁的是「这只票我持有多少股」。两者不是一回事——07226 持仓 6200 股、当日 swap 单 1000 股，同一天同一只票。</li>\n<li>前瞻性数字（「再跌 2% 会亏多少」）要么<strong>别写</strong>，要么写出算式让人能验；拍一个量级出来是 2026-07-27「再伤 1.5-2 万 HK$」（真实约 1 千）那条 issue #120 的原型。</li>\n<li>区间必须真实存在：<code>+0.3~-0.4%</code> 这种正负打架的区间是编的，postflight 会直接标出来。</li>\n</ul>\n<p>▎情绪面 里的<strong>异动归因</strong>（<code>anomalies</code> 非空时必写，最多 2 行，写在该段最前）：</p>\n<ul>\n<li>每只异动票一行：「{票} {幅度}% ← {mover_news 里 signal=interrupt 的标题要点}（ 分钟前 / ）」。</li>\n<li><code>halts</code> 命中该票 → 先写停牌（<code>reason_code</code> + 复牌时间）。</li>\n<li><code>mover_thesis</code> 里该票有 <code>triggered</code>/<code>watch</code> 红线 → 追一句「触及红线：」——<strong>这是归因语境，不是操作许可</strong>，能不能动手仍由 catalyst-gate 与风控契约决定。</li>\n<li>没有 interrupt：<code>no_recent_filing</code> 先查 <code>known_catalysts[票]</code>；有则写「窗口内无新公告；沿用今早已知催化：…」，没有才写「窗口内无新公告，且无已知催化，暂无法归因」；<code>index_fund_no_issuer</code> 写「指数基金无发行人公告，看成分/板块」；<code>degraded</code> 写「催化源未取到」（<strong>不等于「没有消息」</strong>）。一律不许编理由。</li>\n<li>空间不够时<strong>先砍板块全景的细节，不砍归因</strong>——一次异动没解释，比少列两个同业更贵。</li>\n</ul>\n<p>写这几段，<strong>存成 <code>memory/.tmp/report-prose-us-{phase}.md</code></strong>：</p>\n<pre><code>▎情绪面\n{Finnhub news + 纳指 tone → market direction；⚡ **板块全景**：用 peer_scan 写对应主题今日 Top 5 + 你持仓位置 + 1 句归因。行情优先内置 web search；tavily 仅开盘/收盘或真事件用，带 `--bucket report`，盘中常规盯盘不烧 Tavily}\n\n▎技术面\n{RSI / MA stance → overbought/oversold/breakout}\n\n▎操作建议\n{plan_context 非空时先写计划对账（哪条已成交/仍挂着 + 今天怎么执行），再写具体票 + 价位}\n\n▎风险提示（仅当 needs_risk_section=true）\n</code></pre>\n<p><strong>长度由你自己判断</strong>：不设字数目标，把该说的说完，不为凑数注水也不为省字砍内容。\n必须写到的：<code>peer_scan</code> 的 Top 5、持仓在同行里的位置、今日/5 日涨跌和归因、异动归因、\n计划对账、三段必需标记、证据，以及 <code>needs_risk_section=true</code> 时的风险提示。\n自然要避免的是重复而不是长度——同一组合风险数字不要在技术面、操作建议和风险提示三段\n重复；财报/lockup 日期只在最相关的一段写一次；情绪面的异动归因和同行对比不要在技术面复述。</p>\n<h4>Step 3: 跑 postflight</h4>\n<pre><code>clawock report postflight --market us --phase {phase} --context-id {Step 1 的 context_id} --text-file /root/.openclaw/workspace/memory/.tmp/report-prose-us-{phase}.md\n</code></pre>\n<p><code>--context-id</code> 必须是 Step 1 打印的那个：不匹配说明 context 已被换代（散文和数据不同代），postflight 拒绝拼装、只发数据块。散文文件超过 30 分钟没更新同样拒发（防重发上个 slot 的旧文本）。\npass/warn 自动刷新 snapshot/dashboard，提交 scoped 产物并经 <code>ops/publish/safe_push.sh</code> 推送。</p>\n<p>⏱ <strong>看到 SIGTERM / exec 超时 ≠ 报告没发出去，别原样再跑一遍。</strong> exec 的 overall-timeout 只杀命令外壳，postflight 子进程还在继续跑，通常微信早发出去了。先读 <code>memory/.tmp/report-sent-us-{phase}-{今天}.json</code>：有 <code>sent_ok</code> / <code>tg_ok</code> 就是已投递，直接把它当 Step 3 的结果输出。（2026-08-13 09:30 港股开盘就是这么让微信收到两条的，#508。postflight 现在有发送前 claim 会挡住第二次真发，输出里会写 <code>send_claim</code>，但那一跑仍然是白跑。）</p>\n<h4>Step 4: 输出报告（仅存档；微信已由 postflight 主发，禁用 message 工具）</h4>\n<p>微信投递已在 <strong>Step 3 的 <code>report_postflight</code> 用 fresh-token 短连接发出</strong>——这是\n<strong>唯一微信路径</strong>（cron 设 <code>--no-deliver</code>，不再 announce），同时会镜像 Telegram。\n把 postflight 返回的 <code>status</code> + <code>issues</code> 作为<strong>本回合最终文本回复</strong>输出即可（仅留痕）。\n<strong>不要自己调 <code>message</code>/send 工具</strong>；<code>report_watchdog</code> 只在 Telegram marker 缺失/失败时\n补投 Telegram，不重发微信。</p>\n<p><strong>Title template</strong>（preflight 已生成）：</p>\n<ul>\n<li>开盘 09:30 ET：<code>\uD83C\uDF05 美股开盘快报｜{date} 09:30 ET</code></li>\n<li>收盘 16:00 ET：<code>\uD83C\uDF19 美股收盘日报｜{date}</code></li>\n</ul>\n<p><strong>Hard rules:</strong></p>\n<ul>\n<li>⚠️ data gaps must be stated explicitly, never fabricate (postflight 扫敷衍词)</li>\n<li>❌ <strong>禁止调用 <code>message</code>/send 工具发报告</strong> — 微信由 Step 3 的 <code>report_postflight</code> 用 fresh-token 主发（cron <code>--no-deliver</code>，不 announce），手动再调 message 会<strong>和 postflight 撞成双发</strong>（2026-06-03 美股开盘连发两次的根因：模型在\"已完成\"叙述的同一 turn 又调了一次 send）。整轮只输出一次，发完即停；<code>report_watchdog</code> 只在 Telegram marker 缺失/失败时补投 Telegram，不重发微信。</li>\n<li>No simple number recitation — model must add interpretation</li>\n<li>异动票 (anomalies) <strong>必须在报告里提到</strong> (postflight 强制)</li>\n<li>不设字数目标；拼装全文只有一道防复读死循环的天花板（&gt;5000 warn，&gt;6000 fail）</li>\n</ul>\n<h3>Mode 5 — Sentiment Read</h3>\n<p><strong>When:</strong> \"市场情绪怎么样\" / \"推上怎么说 X\" / \"Reddit 怎么聊 X\" / before a sizing decision</p>\n<p>Sources, in order:</p>\n<ol>\n<li><strong>Finnhub news (in script)</strong> — <code>clawock analyze-us {TICKER}</code> without <code>--no-news</code> already pulls last 7 days with keyword sentiment scoring. <strong>This is the first source — read it before anything else.</strong></li>\n<li><strong>Tavily (news + X)</strong> — for trending discussions, analyst notes, X/Twitter sentiment. ⚠️ <strong>Budget rule</strong> (免费档 1000 credits/月，全局共享): 盘中盯盘(每 30 分钟)<strong>默认不调 Tavily</strong>，用 Finnhub + Reddit JSON 就够；只有<strong>开盘/收盘报告</strong>、或盘中出现<strong>真事件</strong>(异常波动跑输基准 / 停牌 / 财报预警 / 监管公告 / 有大标题但价格无法解释)才用。调用必须带 <code>--bucket</code>：开盘/收盘用 <code>--bucket report</code>，盘中事件用 <code>--bucket intraday</code>(不带 bucket 会落 60/月的 default 桶很快被挡):\n<pre><code>node /root/.openclaw/workspace/skills/tavily-search/scripts/search.mjs \"{TICKER} stock sentiment\" --topic news --days 3 --bucket report\nnode /root/.openclaw/workspace/skills/tavily-search/scripts/search.mjs \"{TICKER} reddit wallstreetbets\" --bucket report\n</code></pre>\n护栏是硬闸：额度用尽脚本返回 \"Web search unavailable\" 且 exit 0，别当报错，退回 Reddit/内置搜索。</li>\n<li><strong>Reddit JSON (no auth needed)</strong> — direct fetch:\n<pre><code>curl -sH \"User-Agent: openclaw/1.0\" \\\n  \"https://www.reddit.com/r/wallstreetbets/search.json?q={TICKER}&amp;restrict_sr=1&amp;sort=new&amp;limit=25\" \\\n  | jq '.data.children[].data | {title, score, num_comments, created_utc}'\ncurl -sH \"User-Agent: openclaw/1.0\" \\\n  \"https://www.reddit.com/r/stocks/search.json?q={TICKER}&amp;restrict_sr=1&amp;sort=new&amp;limit=15\" \\\n  | jq '.data.children[].data | {title, score}'\n</code></pre>\nr/wallstreetbets is retail momentum; r/stocks is more measured. Both together give the retail temperature.</li>\n<li><strong>scrapling fallback</strong> — if Reddit JSON 429s or content needs comment-level depth, use <code>StealthyFetcher</code> (see <code>../scrapling/SKILL.md</code>). Same for X if Tavily misses.</li>\n</ol>\n<p>Output:</p>\n<ul>\n<li><strong>Sentiment score</strong>: -1 (extremely fearful) to +1 (euphoric); call out divergence from price action (\"price up but Reddit fearful — short squeeze setup\" or vice versa)</li>\n<li><strong>Key narratives</strong> (2-3 bullets): what people are actually saying / focused on</li>\n<li><strong>Catalyst chatter</strong>: earnings expectations, upcoming events, FUD threads</li>\n<li><strong>Volume signal</strong>: ↑ post count vs prior week = topic heating up</li>\n</ul>\n<h2>Comparison mode</h2>\n<p>For \"X vs Y\" requests:</p>\n<ol>\n<li>Run script for both tickers</li>\n<li>Build side-by-side metric table (price, today_change, RSI, MA50 stance, P/E, revenue growth, margins, market cap)</li>\n<li>Verdict in one paragraph — which has the cleaner setup and why; don't hedge</li>\n</ol>\n<h2>Output style (kcn-tuned)</h2>\n<p>The user is aggressive, table-first, and hates filler. Match that:</p>\n<ul>\n<li><strong>Direct verdicts.</strong> \"RKLB looks toppy at $118, RSI 73, would trim on strength\" beats \"RKLB shows signs of being overbought; consider monitoring.\"</li>\n<li><strong>Tables for any 3+ data points.</strong> Price/PnL/RSI/MA/signal lives in a table, not prose.</li>\n<li><strong>No hedging boilerplate.</strong> Skip \"This is not financial advice\" — the user knows, and <code>MEMORY.md</code> has the trading style on record.</li>\n<li><strong>Cite the data freshness.</strong> End with \"数据: clawock analyze-us \" so the user knows price is live, not cached.</li>\n<li><strong>Flag stale data loudly.</strong> If the script's fallback chain failed all 7 routes, lead with \"⚠️ 数据获取失败，以下为旧缓存数据\" before any analysis.</li>\n</ul>\n<h2>Special handling — leverage ETFs</h2>\n<p>When the ticker is a leveraged ETF (SOXL, TQQQ, RKLX, MSFU, ROBN — anything with the <code>is_leveraged_etf=true</code> flag in <code>portfolio.json</code> or 2x/3x in the name):</p>\n<ul>\n<li>Always note decay risk for multi-day holding periods</li>\n<li>Verdicts must reference the underlying's direction, not just the ETF's chart</li>\n<li>1-day RSI on these is noisy; weight MA20/50 stance higher</li>\n</ul>\n<h2>Examples</h2>\n<p><strong>User:</strong> \"RKLB 怎么样\"\n<strong>Approach:</strong> Mode 1 — <code>clawock analyze-us RKLB --no-news</code>, read its position from portfolio.json, output table + one-line verdict.</p>\n<p><strong>User:</strong> \"compare AAPL vs MSFT\"\n<strong>Approach:</strong> Comparison mode — script both, side-by-side table, paragraph verdict.</p>\n<p><strong>User:</strong> \"Give me a deep report on PLTU\"\n<strong>Approach:</strong> Mode 4 — full pipeline with references/report-template.md structure.</p>\n<h2>Reference files (lazy-load)</h2>\n<ul>\n<li><code>references/technical-analysis.md</code> — indicator definitions, chart patterns, support/resistance methodology</li>\n<li><code>references/fundamental-analysis.md</code> — business quality, financial health, valuation frameworks, red flags</li>\n<li><code>references/financial-metrics.md</code> — every ratio formula needed for valuation work</li>\n<li><code>references/report-template.md</code> — full-report skeleton for Mode 4</li>\n</ul>\n<p>These are market-agnostic; <code>hk-stock-analysis</code> also references them.</p>\n<h2>Companion tools</h2>\n<ul>\n<li><code>../scrapling/SKILL.md</code> — when all 7 script-internal fallbacks fail, or when Reddit/social needs comment-level depth past the public JSON</li>\n<li><code>../tavily-search/SKILL.md</code> — primary web search tool for news/sentiment/research (do not let the model improvise with Yahoo/Google scraping)</li>\n<li><code>portfolio-swarm-review</code> skill — deep bull/bear/judge debate framework (analysts → researchers → risk debators → trader), inspired by TauricResearch/TradingAgents design; use when single-shot analysis isn't enough</li>\n</ul>\n","files":[{"path":"_meta.json","sizeBytes":136,"isText":true},{"path":"references/financial-metrics.md","sizeBytes":5073,"isText":true},{"path":"references/fundamental-analysis.md","sizeBytes":3153,"isText":true},{"path":"references/report-template.md","sizeBytes":4874,"isText":true},{"path":"references/technical-analysis.md","sizeBytes":2614,"isText":true},{"path":"SKILL.md","sizeBytes":24390,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-25T07:40:03.462353Z","sha256":"4BE13F38E08EEF3D065E2BB6BE1C7D9A0FE38C443ECB2A4EA05C2AB13E4CCABA","sizeBytes":20113},"review":null,"source":{"repositoryUrl":"https://github.com/KCNyu/clawock","path":"skills/us-stock-analysis","license":"MIT","commit":"d504fce9bd4bf8b44a0239a21f94978319394c5e","subtreeSha":"13CCC04EE7260A851B05EF33840843F60A578842189295662583D78DFAA8C955","lastSyncedAt":"2026-09-25T07:38:16.512244Z"},"reviewedAt":"2026-09-25T07:43:43.822638Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/KCNyu/clawock/tree/master/skills/us-stock-analysis"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install kcnyu-clawock@llmmart"},{"target":"git","command":"git clone https://github.com/KCNyu/clawock.git"}]}