Agent skill

Portfolio Health Check

by Geeksfino in Geeksfino/finskills

诊断现有投资组合的风险和低效问题。当用户要求审查、审计或压力测试其当前持仓,评估组合集中度,检查因子暴露,评估相关性风险,识别隐性偏移,或获取其已有组合的改进建议时使用此技能。

Apache-2.0Auto-check passedBusiness, Finance & HR

Install Portfolio Health Check

skills CLI
$ npx skills add Geeksfino/finskills --skill portfolio-health-check -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Geeksfino/finskills portfolio-health-check --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Geeksfino/finskills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/China-market/portfolio-health-check .claude/skills/portfolio-health-check && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
portfolio-health-check
GitHub stars
282
Token cost
~758 tokens
SKILL.md length
205 words
Files
4 (incl. references)
Skills in repo
30
Repo updated
First seen
Licence
Apache-2.0

At a glance

诊断现有投资组合的风险和低效问题。当用户要求审查、审计或压力测试其当前持仓,评估组合集中度,检查因子暴露,评估相关性风险,识别隐性偏移,或获取其已有组合的改进建议时使用此技能。

  • Works in 4 steps: 估算所有权益持仓之间的两两相关系数 → 识别相关性聚集——3只及以上持仓平均两两相关系数 > 0.7 → 计算有效分散比率——组合包含多少真正独立的投注 → …
  • Business, Finance & HR work in your project
  • SKILL.md covers 工作流程, 数据增强 and 重要注意事项
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Portfolio Health Check is an agent skill from Geeksfino/finskills. 诊断现有投资组合的风险和低效问题。当用户要求审查、审计或压力测试其当前持仓,评估组合集中度,检查因子暴露,评估相关性风险,识别隐性偏移,或获取其已有组合的改进建议时使用此技能。

Its SKILL.md is about 760 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/diagnostic-framework.md` and `references/output-template.md`).

It sits in Business, Finance & HR. The repository describes itself as: Financial engineering and risk/compliance skills for agents. The licence is Apache-2.0.

When your agent uses it

  • Business, Finance & HR work in your project

Example prompts

  • “/portfolio-health-check”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. 估算所有权益持仓之间的两两相关系数
  2. 识别相关性聚集——3只及以上持仓平均两两相关系数 > 0.7
  3. 计算有效分散比率——组合包含多少真正独立的投注
  4. 标记表面看似分散但实际高度相关的持仓(如多只白酒股、新能源产业链上下游)

What it can do on your machine

Read from SKILL.md and the folder at commit 8722415. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Portfolio Health Check loads about 758 tokens when it runs, and up to ~4k if it reads all its reference files. Until then it costs about 28 tokens; SKILL.md has 205 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~28
When it runs · the whole SKILL.md, loaded when a task matches
~758
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Geeksfino/finskills at commit 8722415, republished under its Apache-2.0 licence (© Geeksfino). 205 words, ~758 tokens.

Download SKILL.mdSave it as .claude/skills/portfolio-health-check/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
portfolio-health-check
description
诊断现有投资组合的风险和低效问题。当用户要求审查、审计或压力测试其当前持仓,评估组合集中度,检查因子暴露,评估相关性风险,识别隐性偏移,或获取其已有组合的改进建议时使用此技能。
license
Apache-2.0

组合健康诊断

扮演投资组合风险诊断师。评估用户现有的投资组合,识别隐性风险、集中度问题、因子偏移、相关性聚集、流动性缺口和压力测试脆弱性——并提供可操作的改进建议。

工作流程

第一步:导入组合

收集用户当前持仓信息:

输入必需格式
持仓清单是代码 + 股数/金额 或 百分比
现金仓位是金额或百分比
账户类型否普通证券账户 / 含个人养老金 / 两融账户
基准否默认:沪深300(000300)
风险偏好否保守 / 稳健 / 积极
投资期限否年数

如用户提供的数据不完整,请追问确认。将所有仓位统一换算为组合总值的百分比。

第二步:集中度分析

从多个维度评估集中度。详细阈值参见 references/diagnostic-framework.md。

维度检查内容红灯阈值
单只个股任何仓位占比 > 10%> 15% 为严重
前5大集中度前5大持仓合计权重> 50% 偏高
行业申万一级行业权重 vs 基准单行业 > 30%
市场沪市/深市/北交所/港股通分布> 90% 单一市场
市值大盘/中盘/小盘/微盘> 85% 单一区间
资产类别权益/固收/另类/现金> 90% 单一类别
风格成长 vs 价值偏移> 75% 单一风格
第三步:相关性聚集检测

识别走势趋同的持仓群组:

  1. 估算所有权益持仓之间的两两相关系数
  2. 识别相关性聚集——3只及以上持仓平均两两相关系数 > 0.7
  3. 计算有效分散比率——组合包含多少真正独立的投注
  4. 标记表面看似分散但实际高度相关的持仓(如多只白酒股、新能源产业链上下游)
第四步:因子暴露分析

将组合分解为因子暴露:

因子指标基准中性
市场Beta组合Beta vs 沪深3001.0
价值加权平均PE、PB基准平均值
成长加权平均营收/盈利增速基准平均值
规模加权平均市值基准中位数
动量加权平均12-1月收益率基准平均值
质量加权平均ROE、资产负债率基准平均值
波动率加权平均已实现波动率基准平均值
股息率加权平均股息率基准平均值

标记任何偏离基准超过1个标准差的因子暴露。

第五步:风险指标

计算组合层面的风险指标:

指标说明
组合波动率年化标准差
Beta相对基准的敏感度
跟踪误差相对基准的主动收益波动率
主动份额组合与基准的差异比例
风险价值(95%)1年期95%置信度下的最大损失
条件风险价值(CVaR)超过VaR的平均损失
最大回撤估计基于历史配置分析
夏普比率估计超额收益 / 波动率
索提诺比率估计超额收益 / 下行偏差
第六步:压力测试

在历史压力情景下检验组合。详细情景参见 references/diagnostic-framework.md。

情景时期关键特征
2015年股灾2015年6–8月杠杆牛崩盘,上证从5178跌至2850
2018年贸易摩擦2018年中美贸易战,沪深300跌-25%
2020年疫情冲击2020年1–3月快速下跌后V形反弹
2022年市场调整2022年地产危机+疫情封控,成长股大幅回调
2008年金融危机2007–2008A股从6124跌至1664,跌幅-73%
第七步:流动性评估

评估组合流动性:

指标检查内容
变现天数以日均成交量20%计算,每个仓位完全退出需多少天
低流动性仓位完全退出需要 > 5个交易日的持仓
涨跌停风险A股10%/20%(创业板/科创板)涨跌停限制对流动性的影响
小盘股占比日均成交额低于5000万元的个股占组合比例
第八步:诊断与建议

将发现综合为健康报告。格式参见 references/output-template.md:

  1. 健康评分 — 0–100综合评分
  2. 严重问题 — 需要立即关注的问题
  3. 警示事项 — 需要监控或择机处理的问题
  4. 组合优势 — 组合做得好的方面
  5. 改进建议 — 按优先级排列的具体建议及理由
  6. 调仓方案 — 具体的改进交易建议

数据增强

如需实时市场数据支撑分析,请使用金融数据工具包技能(findata-toolkit-cn)。该工具包提供A股实时行情、财务指标、董监高增减持、北向资金、宏观数据等功能,所有数据源免费,无需API密钥。

重要注意事项

  • 诊断而非重建:本技能评估现有组合。如需从零构建新组合,请使用风险调整收益优化器。
  • 情境很重要:100%权益配置对于一个25岁、投资期限40年的投资者可能完全合理。孤立来看令人担忧的集中度在特定情境下可能是适当的。
  • A股无资本利得税:调仓的税负成本极低(仅0.05%印花税+佣金),这使得再平衡的摩擦成本远低于美股。
  • 涨跌停限制:A股的涨跌停制度(10%/20%)会影响极端行情下的流动性,这是美股组合诊断中不需要考虑的因素。
  • 分红税与持有期挂钩:持有超1年免税。高股息仓位调仓前需考虑持有期。
  • 行为敏感性:不要建议大幅推翻整个组合。投资者对持仓有情感依附。优先推荐影响最大的调整。
  • 非个人化建议:声明本分析仅供教育参考,不构成个人投资建议。个人情况需要咨询合格的投资顾问。

© Geeksfino, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in China-market/portfolio-health-check of Geeksfino/finskills.

  • SKILL.md
  • LICENSE.txt
  • references/diagnostic-framework.md
  • references/output-template.md

Open the folder on GitHubat commit 8722415

Compare with similar skills

Portfolio Health Check next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Portfolio Health Check compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Portfolio Health Check this skillGeeksfino/finskills282—~758Automated safety check: PassApache-2.0
Technical Analysttradermonty/claude-trading-skills3k4 repos~4.6kAutomated safety check: PassMIT
Theme Detectortradermonty/claude-trading-skills3k2 repos~4.9kAutomated safety check: PassMIT
Creating Financial ModelsChen-zexi/open-ptc-agent7293 repos~1.3kAutomated safety check: PassMIT
Stock APIzhangxiangliang/stock-api2k—~507Automated safety check: PassMIT
Itr Walakaranb192/itr-wala871—~3.6kAutomated safety check: PassMIT

Similar skills

  • Technical Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs.

    3k GitHub starsUsed in 4 repos~4.6k tokens
    Business, Finance & HRAuto-check passed
  • Theme Detector

    tradermonty/claude-trading-skills

    Detect and analyze trending market themes across sectors. An agent skill from tradermonty/claude-trading-skills.

    3k GitHub starsUsed in 2 repos~4.9k tokens
    Business, Finance & HRAuto-check passed
  • Creating Financial Models

    Chen-zexi/open-ptc-agent

    This skill provides an advanced financial modeling suite with DCF analysis, sensitivity testing, Monte Carlo simulations, and scenario planning for investment decisions

    729 GitHub starsUsed in 3 repos~1.3k tokens
    Business, Finance & HRAuto-check passed
  • Stock API

    zhangxiangliang/stock-api

    Fetch real-time stock quotes, K-line (candlestick) history, and search symbols for China A-shares, Hong Kong, and US markets.

    2k GitHub stars~507 tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Itr Wala

    karanb192/itr-wala

    File Indian income tax returns (ITR) for FY 2025-26 / AY 2026-27.

    871 GitHub stars~3.6k tokensUpdated 7 days ago
    Business, Finance & HRAuto-check passed
  • Tushare Data

    zillionare/zillionare

    面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。

    322 GitHub starsUsed in 2 repos~2.3k tokens
    Business, Finance & HRAuto-check passed

More from Geeksfino/finskills

All 30 skills in this repo
  • US Market Data Toolkit

    Geeksfino/finskills

    Free Python scripts that fetch US stock data, SEC filings, insider trades and macro indicators, and run financial score calculators and portfolio analytics.

    282 GitHub stars~1.2k tokensUpdated 7 mo ago
    Auto-check passed
  • Runs a forensic review of one company's financial statements covering DuPont profitability, earnings quality, financial health scores and fraud-risk signals.

    282 GitHub stars~1.8k tokensUpdated 7 mo ago
    Auto-check passed
  • Quantitative Factor Screener

    Geeksfino/finskills

    Screens a stock universe with a six-factor model, scores value, momentum, quality, low volatility, size and growth, ranks by composite score and notes which factors suit the macro regime.

    282 GitHub stars~1.3k tokensUpdated 7 mo ago
    Auto-check passed
  • Tech Hype vs Fundamentals

    Geeksfino/finskills

    Compares leading tech stocks to separate hype-driven valuations from fundamentally justified ones and to flag undervalued names the market overlooks.

    282 GitHub stars~1.3k tokensUpdated 7 mo ago
    Auto-check passed
  • Analyze Dividend Aristocrats (25+ years of consecutive dividend increases) for income reliability and total return.

    282 GitHub stars~1.2k tokensUpdated 7 mo ago
    Auto-check passed
  • ESG Stock Screener

    Geeksfino/finskills

    Screens US stocks through an ESG lens, applies optional exclusion lists, scores the environmental, social and governance pillars and judges whether ESG quality is improving.

    282 GitHub stars~1.4k tokensUpdated 7 mo ago
    Auto-check passed

Questions about Portfolio Health Check

What does Portfolio Health Check do?

诊断现有投资组合的风险和低效问题。当用户要求审查、审计或压力测试其当前持仓,评估组合集中度,检查因子暴露,评估相关性风险,识别隐性偏移,或获取其已有组合的改进建议时使用此技能。. Portfolio Health Check is an agent skill from Geeksfino/finskills.

When should I use Portfolio Health Check?

Portfolio Health Check fits situations like: business, Finance & HR work in your project.

How do I install Portfolio Health Check in Claude Code?

Run `npx skills add Geeksfino/finskills --skill portfolio-health-check -a claude-code`. Or copy the skill folder (China-market/portfolio-health-check in Geeksfino/finskills) into .claude/skills/portfolio-health-check in your project. Claude Code loads it when a task matches its description.

How do I install Portfolio Health Check in Codex?

Run `npx skills add Geeksfino/finskills --skill portfolio-health-check -a codex`. Or copy the skill folder (China-market/portfolio-health-check in Geeksfino/finskills) into .agents/skills/portfolio-health-check in your project. Codex loads it when a task matches its description.

Can I use Portfolio Health Check in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Geeksfino/finskills --skill portfolio-health-check -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/portfolio-health-check, .gemini/skills/portfolio-health-check, .github/skills/portfolio-health-check and .opencode/skills/portfolio-health-check in your project.

What does Portfolio Health Check need to run?

SKILL.md names no scripts, command-line tools or credentials: Portfolio Health Check is instructions for the agent only.

Does Portfolio Health Check access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Portfolio Health Check safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Portfolio Health Check use?

Portfolio Health Check is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Portfolio Health Check use?

About 758 tokens (SKILL.md is roughly 3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.2k tokens, read only when the agent opens those files.

What are the alternatives to Portfolio Health Check?

Skills that share tags, products or a category with Portfolio Health Check: Technical Analyst (tradermonty/claude-trading-skills, 3k stars), Theme Detector (tradermonty/claude-trading-skills, 3k stars), Creating Financial Models (Chen-zexi/open-ptc-agent, 729 stars) and Stock API (zhangxiangliang/stock-api, 2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Portfolio Health Check?

Geeksfino (a GitHub user) maintains it in Geeksfino/finskills, which has 282 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on March 5, 2026.

Source: Geeksfino/finskills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.