portfolio

portfolio is a skill for Claude Code from EternaHybridExchange/mcp-trading-agent. It costs 22 tokens per session (486 once invoked), scanned A, original, MIT.

A workflow for reviewing and managing an entire trading portfolio: open positions, profit and loss, account balance, and margin usage.

In plain words
What is it for?
Use it to retrieve positions and balances, calculate total unrealised profit or loss and margin utilisation, and decide which positions may need closing or stop-loss changes.
Why use it?
It brings the account-wide risk picture together instead of examining trades in isolation. It identifies losing or exposed positions and flags high use of available margin.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to retrieve positions and balances, calculate total unrealised profit or loss and margin utilisation, and decide which positions may need closing or stop-loss changes.

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

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/eternahybridexchange/mcp-trading-agent/portfolio"><img src="https://agentmods.dev/badge/skills/eternahybridexchange/mcp-trading-agent/portfolio.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 486 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00022 $0.00486
Opus 5 $0.00011 $0.00243
Sonnet 5 $0.00004 $0.00097
Haiku 4.5 $0.00002 $0.00049

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

Security

Grade A, and why

portfolio scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude-code/.claude/skills/portfolio/SKILL.md · 76 lines

What it actually says

Portfolio Management

A systematic approach to reviewing and managing all open positions, balance, and overall portfolio health.

Workflow

1. Check All Open Positions

Call get_positions to retrieve every open position. For each position, note:

  • Symbol
  • Side (long/short)
  • Size
  • Entry price
  • Current mark price
  • Unrealised PnL
  • Leverage
  • Take-profit and stop-loss levels

2. Review Unrealised PnL

Assess each position:

  • Winning positions: those with positive unrealised PnL
  • Losing positions: those with negative unrealised PnL
  • At-risk positions: those approaching their stop-loss

Calculate total unrealised PnL across all positions.

3. Check Balance and Margin Usage

Call get_balance to get:

  • Total equity
  • Available balance (free margin)
  • Used margin
  • Unrealised PnL

Calculate margin utilization:

margin_utilization = used_margin / total_equity * 100

Flag if margin utilization exceeds 70% -- this indicates high risk.

4. Identify Positions to Adjust

Review positions that may need action:

  • Close: positions with unrealised loss exceeding 2% of total equity
  • Tighten SL: winning positions where SL can be moved to breakeven
  • Take partial profit: positions with unrealised gain exceeding 3% of equity
  • No TP/SL set: positions missing take-profit or stop-loss (set them immediately)

For any adjustment, use set_tp_sl to update levels or place_order to close.

5. Portfolio Health Summary

Present a summary table:

Portfolio Summary
-----------------
Total Equity:        $X,XXX.XX
Available Margin:    $X,XXX.XX
Used Margin:         $X,XXX.XX
Margin Utilization:  XX.X%
Open Positions:      X
Total Unrealised PnL: +/- $X,XXX.XX
Winning / Losing:    X / X

Followed by a per-position breakdown and any recommended actions.

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 · 76 lines · 22 tokens per session scan A 4c95a96d165e

Subscribe to this mod's changes

portfolio is a skill published in the GitHub repository EternaHybridExchange/mcp-trading-agent (6 stars, last pushed 6mo ago), licensed MIT. It adds 22 tokens to every session and 486 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.