portfolio-diagnosis

portfolio-diagnosis is a skill for Claude Code, Codex from huangrichao2020/pretty-skills. It costs 115 tokens per session (1,704 once invoked), scanned A, original, MIT.

A diagnosis process for Chinese stock portfolios that combines the holdings, current market prices, industry information, recent events, money flows, and market sentiment. It can use a screenshot, text list, or spoken description of the holdings.

In plain words
What is it for?
Use it to review holdings, retrieve current quotes, research sectors and catalysts, assess trend and fund flows, and group positions into four risk or opportunity ratings with short- and medium-term suggestions.
Why use it?
It brings together portfolio details and changing market evidence instead of judging each stock in isolation. It also identifies when broad market or investor sentiment may outweigh a company’s industry story.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to review holdings, retrieve current quotes, research sectors and catalysts, assess trend and fund flows, and group positions into four risk or opportunity ratings with short- and medium-term suggestions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/huangrichao2020/pretty-skills/portfolio-diagnosis
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 huangrichao2020/pretty-skills --skill portfolio-diagnosis
Clone the repo
git clone --depth 1 https://github.com/huangrichao2020/pretty-skills

Made for: Claude Code, Codex.

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-diagnosis

README.md
[![agentmods](https://agentmods.dev/badge/skills/huangrichao2020/pretty-skills/portfolio-diagnosis/github.svg)](https://agentmods.dev/skills/huangrichao2020/pretty-skills/portfolio-diagnosis)
Your own site
<a href="https://agentmods.dev/skills/huangrichao2020/pretty-skills/portfolio-diagnosis"><img src="https://agentmods.dev/badge/skills/huangrichao2020/pretty-skills/portfolio-diagnosis/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-diagnosis

Your own site · 80×15
<a href="https://agentmods.dev/skills/huangrichao2020/pretty-skills/portfolio-diagnosis"><img src="https://agentmods.dev/badge/skills/huangrichao2020/pretty-skills/portfolio-diagnosis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,704 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00115 $0.01704
Opus 5 $0.00057 $0.00852
Sonnet 5 $0.00023 $0.00341
Haiku 4.5 $0.00012 $0.00170

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

Security

Grade A, and why

portfolio-diagnosis scanned grade A with 1 finding 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 12d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s "https://qt.gtimg.cn/q=<股票代码列表>" | iconv -f GBK -t UTF-8
金融投资/portfolio-diagnosis-持仓诊断/SKILL.md · 150 lines

How it starts

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

持仓诊断

核心理念

持仓诊断不是逐只点评,而是用四层融合框架对整个组合做一次"体检":

L0 人性层(最高否决权):群体信念在形成还是在崩塌?住相信号亮了几灯?
L1 情绪层:市场表面温度适合交易吗?情绪周期在哪个阶段?
L2 产业层:持仓标的所在行业有真实逻辑吗?催化剂是什么?
L3 证据层:证据够硬吗?是 Tier A(趋势确认)还是 Tier C(情绪修复)?

否决权层级:L0 > L1 > L3 > L2。当群体信念崩塌时,再好的产业逻辑都会被恐惧碾压。

使用流程

1. 接收持仓

用户可能提供:

  • 截图(券商App持仓页面):从图片中提取股票名称、市值、成本、现价、盈亏、持股数量
  • 文本列表:直接列出持仓标的
  • 口头描述:提到几只股票名称

如果信息不完整,主动询问:成本价、持股数量、是否两融账户。

2. 获取实时行情

用腾讯行情 API 批量获取持仓标的的最新数据:

curl -s "https://qt.gtimg.cn/q=<股票代码列表>" | iconv -f GBK -t UTF-8

股票代码映射规则:

  • 沪市主板:sh + 6位代码(如 sh600326)
  • 深市主板/中小板:sz + 6位代码(如 sz000917)
  • 创业板:sz + 300xxx
  • 科创板:sh + 688xxx

如果用户只给了股票名称,需要先搜索对应代码。

同时获取大盘指数:sh000001,sz399001,sz399006,sh000688,sh000300

3. 搜索板块与催化剂

对每只持仓股票,搜索:

  • 所属板块/概念(军工、半导体、新能源等)
  • 近期是否有独立催化剂(政策、业绩、事件)
  • 近期主力资金流向
  • 板块整体热度

4. 四层融合逐只诊断

对每只持仓标的进行四层评估:

L0 人性层检查(对整体持仓):

  • 住相信号链五维检测:龙头乏力?跟风先跑?扩散停止?情绪背离?资金转向?
  • 当前执念阶段:确认→发酵→分歧→高潮→衰退→退潮
  • 住相信号 ≥ 3 = 减仓信号生效

L1 情绪层:

  • 当前市场情绪周期:冰点→复苏→高潮→退潮
  • 持仓标的所在板块的情绪温度

L2 产业层(逐只):

  • 行业有真实因果逻辑吗?(政策催化/业绩兑现/供需拐点)
  • 还是只有相关性/题材炒作?

L3 证据层(逐只):

  • 技术面:趋势、支撑位、压力位
  • 资金面:主力资金流向、北向资金
  • 证据等级:Tier A(趋势确认)/ B(有逻辑待验证)/ C(情绪修复)/ D(高风险)

5. 分级评级

按机会大小将持仓分为四级:

评级 含义 操作建议
A 有题材+有逻辑+有催化 持有,关注催化兑现
B 有逻辑但短期降温 观察,等二次启动信号
C 无独立催化,随大盘波动 考虑趁反弹减仓
D 高风险(ST/立案/退市) 优先处理,止损或观望

6. 输出诊断

使用 widget 渲染诊断结果(qoder_show_widget),包含:

Widget 结构:

标题:持仓诊断 · 四层融合分析
├── 汇总区:总市值 / 总浮亏 / 总亏损率 / 今日变动
├── 持仓全景表:按A/B/C/D分级排列
│   ├── 每只:股票名 / 市值 / 亏损% / 成本→现价 / 今日涨跌 / 板块 / 评级
│   └── 分类标题行(有题材 / 无催化 / 高风险)
├── 逐只诊断卡片:
│   ├── 短期(下周)判断 + 逻辑
│   └── 中期(下月)判断 + 风险
├── 操作建议:下周策略 + 下月策略
├── 特别警示(两融账户/高风险标的)
└── 免责声明

Widget 设计规范:

  • 暗色主题(--bg:#0f1117)
  • 涨跌用红/绿色标识
  • 评级用 tag 样式(tier-a=绿, tier-b=黄, tier-c=红, tier-d=灰)
  • 分类行用蓝色背景突出

文字总结(widget 之外):

  • 用大白话讲清楚核心问题
  • 指出组合最大的结构性缺陷
  • 给出最优先的1-2个操作建议
  • 结尾加免责声明

7. 回应风格

  • 说人话,不说空话——每条判断都要有"因为什么"的逻辑
  • 不回避坏消息——深套就说深套,高风险就说高风险
  • 用交易宪法的语言:执念阶段、住相信号、否决权、确信度
  • 不荐股、不指导买卖,只做诊断和建议
  • 结尾必须加:以上仅为复盘交流,不构成投资建议

Read the full file on GitHub · 150 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 150 lines · 115 tokens per session scan A 364c5d76ee51

Subscribe to this mod's changes

portfolio-diagnosis is a skill published in the GitHub repository huangrichao2020/pretty-skills (54 stars, last pushed today), licensed MIT. It adds 115 tokens to every session and 1,704 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

german-elster-tax-filing

Use this skill to run a complete intake for a german personal income tax return in elster for tax years 2024 onward, estimate the tax result, and map the final values into the correct official forms and fields.

jawwadfirdousi/agent-skills · 123 tokens

cn-check

Install and run the Continue CLI (cn) to execute AI agent checks on local code changes. Use when asked to "run checks", "lint with AI", "review my changes with cn", or set up Continue CI locally.

continuedev/continue · 49 tokens

aomi-transact

Build natural-language crypto/DeFi agents and EVM MCP plugins (Claude Code, Cursor, Codex, Gemini). Aomi turns prompts into wallet-signed txs on Ethereum, Base, Arbitrum, Optimism, Polygon, Linea — non-custodial, fork-simulated. 40+ apps: Uniswap, Aave, Lido, Morpho, GMX, Hyperliquid, Polymarket.

sickn33/agentic-awesome-skills · 95 tokens

fred-economic-data

Query FRED (Federal Reserve Economic Data) API for 800,000+ economic time series from 100+ sources. Access GDP, unemployment, inflation, interest rates, exchange rates, housing, and regional data. Use for macroeconomic analysis, financial research, policy studies, economic forecasting, and academic research requiring…

synthetic-sciences/openscience · 75 tokens

tinker-training-cost

Calculates training costs for Tinker fine-tuning jobs. Use when estimating costs for Tinker LLM training, counting tokens in datasets, or comparing Tinker model training prices. Tokenizes datasets using the correct model tokenizer and provides accurate cost estimates.

synthetic-sciences/openscience · 55 tokens

story-long-write

A Chinese-language coaching workflow for creating a long online novel from the initial idea through the outline and chapter text. It starts by defining the intended emotion, then uses research and story-planning stages to guide writing.

uu201/character-arc · 81 tokens