# Portfolio Diagnosis

Health check of the user's own portfolio against their investing profile...

- Repository: https://github.com/ginlix-ai/LangAlpha (2232 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add ginlix-ai/LangAlpha --skill portfolio-diagnosis -g -a claude-code -y`
Codex: `npx skills add ginlix-ai/LangAlpha --skill portfolio-diagnosis -g -a codex -y`
Cursor: `npx skills add ginlix-ai/LangAlpha --skill portfolio-diagnosis -g -a cursor -y`
Gemini CLI: `npx skills add ginlix-ai/LangAlpha --skill portfolio-diagnosis -g -a gemini-cli -y`

## Description

Health check of the user's own portfolio against their investing profile: concentration, exposure by sector, region and asset class, cash, currency mix, and risk fit (volatility, beta, drawdown), ending in a few next steps. Triggers on diagnose my portfolio, portfolio review, portfolio health check, am I too concentrated, how risky is my portfolio.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Portfolio Diagnosis

A one-minute read of what the user holds, measured against what they told you they want. Every finding carries a number and what that number is compared with. No lecture and no trade calls.

## 1. Inputs

- `.agents/user/profile/portfolio.json`: the holdings. When this turn already read it, use that copy.
- The `## Investment Profile` block in your system prompt: its Risk level, Investor type, Experience, Markets, Wants to trade, Analysis approaches, Investing styles, Holding horizon and Sectors lines. A line may hold an older profile's free text: read what is there. When the block has no line for what you need, an older profile may keep it in a free-text key of `.agents/user/profile/preference.json`, such as `risk_tolerance` or `holding_period`. With no risk level at all, report the risk numbers without a fit verdict.
- A brokerage in `<mcp-servers>`: take positions and cash balances from it, unless this turn already fetched them. Its quantities and market values win over the file. If they differ from `portfolio.json`, say so in one line and offer to re-import. Don't write the file here.
- No holdings: say the diagnosis needs them and ask for a few positions as ticker and quantity.

## 2. Compute, in one `execute_code` call

```python
from tools.yf_price import get_multiple_stocks_history   # 1y daily bars, many symbols
from tools.yf_fundamentals import get_company_info       # sector, country, quoteType, category, currency
from tools.price_data import get_stock_data, get_asset_data  # fallback bars; crypto and forex
```

The rest: https://github.com/ginlix-ai/LangAlpha/blob/HEAD/plugins/langalpha_research/skills/portfolio-diagnosis/SKILL.md
