Agent skill

Stock Portfolio Manager

by okikusan-public in okikusan-public/stock_skills

Manages a stock portfolio through a Python command line: snapshots with profit and loss, buy and sell records, structure analysis, health checks and trade reviews.

No licenceAuto-check passedBusiness, Finance & HR

SKILL.md written in Japanese; this summary is our English description.

Install Stock Portfolio Manager

skills CLI
$ npx skills add okikusan-public/stock_skills --skill stock-portfolio -a claude-code

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

GitHub CLI
$ gh skill install okikusan-public/stock_skills stock-portfolio --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/okikusan-public/stock_skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/stock-portfolio .claude/skills/stock-portfolio && 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
stock-portfolio
GitHub stars
135
Token cost
~2.4k tokens
SKILL.md length
470 words
Files
16 (incl. scripts)
Skills in repo
9
Repo updated
First seen
Licence
None found

At a glance

Manages a stock portfolio through a Python command line: snapshots with profit and loss, buy and sell records, structure analysis, health checks and trade reviews.

  • Works in 4 steps: ポートフォリオ全体の3シナリオ利回り・損益額テーブル → 注意銘柄セクション(バリュートラップ警告のある銘柄を集約) → 期待リターン TOP 3 / BOTTOM 3 ランキング → …
  • Recording stock purchases and sales and viewing the current portfolio
  • SKILL.md covers 実行コマンド, コマンド一覧, 自然言語ルーティング and 制約事項, plus 3 more sections
  • Runs Python scripts from its folder; calls python3

What it does

The skill, written in Japanese, runs `scripts/run_portfolio.py` with a subcommand. `snapshot` shows current prices, profit and loss and currency conversion. `buy` and `sell` record trades; without `--yes` they print a confirmation preview and exit, and a sale with `--price` also computes realized gain, return rate and a rough after-tax figure, saving the trade under `data/history/trade/`. `review` summarizes past sales into a trade table plus statistics such as win rate, average return and holding period, and `analyze` measures concentration with HHI across region, sector, currency and size, with ETFs classed separately.

`health` checks whether the investment thesis for each holding still stands, using SMA50 and SMA200 trends, golden and dead cross detection and fundamental change and shareholder-return scores to give three alert levels: early warning, caution and exit. Small caps get a shorter lookback and a stricter alert, and ETFs get their own table. The folder also holds modules for adjust, backtest, forecast, rebalance, simulate and what-if, and the data serves as input for stress tests.

When your agent uses it

  • Recording stock purchases and sales and viewing the current portfolio
  • Analyzing portfolio concentration by region, sector, currency and size
  • Running a health check on holdings for trend and fundamental warnings
  • Reviewing realized profit and loss across past trades

Example prompts

  • “Show me a snapshot of my portfolio with profit and loss in yen.”
  • “Record a purchase of NVDA with the buy command and show the preview first.”
  • “Run the portfolio health check and list holdings with early warnings.”
  • “Review my 2026 trades and summarize win rate and average holding period.”

Requirements

  • Python 3 to run scripts/run_portfolio.py
  • Pre-approved tools (allowed-tools): Bash(python3 *)

Workflow steps

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

  1. ポートフォリオ全体の3シナリオ利回り・損益額テーブル
  2. 注意銘柄セクション(バリュートラップ警告のある銘柄を集約)
  3. 期待リターン TOP 3 / BOTTOM 3 ランキング
  4. 銘柄別詳細(アナリスト目標/Forward PER/ニュース件数/Xセンチメント/3シナリオ)

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(python3 *)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 14 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    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

Stock Portfolio Manager loads about 2.4k tokens when it runs. Until then it costs about 16 tokens; SKILL.md has 470 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~16
When it runs · the whole SKILL.md, loaded when a task matches
~2.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); the scripts in this folder are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 470 words (~2,410 tokens).

name
stock-portfolio
allowed-tools
Bash(python3 *)
argument-hint
[command] [args] 例: snapshot, buy 7203.T 100 2850, sell AAPL 5, analyze, list

Read the full SKILL.md on GitHub

Files

SKILL.md and 15 other files (scripts) in .claude/skills/stock-portfolio of okikusan-public/stock_skills.

  • SKILL.md
  • data/history/health/2026-02-15_health.json
  • scripts/portfolio_commands/__init__.py
  • scripts/portfolio_commands/adjust.py
  • scripts/portfolio_commands/analyze.py
  • scripts/portfolio_commands/backtest.py
  • scripts/portfolio_commands/buy_sell.py
  • scripts/portfolio_commands/forecast.py
  • scripts/portfolio_commands/health.py
  • scripts/portfolio_commands/list_cmd.py
  • scripts/portfolio_commands/rebalance.py
  • scripts/portfolio_commands/review.py
  • scripts/portfolio_commands/simulate.py
  • scripts/portfolio_commands/snapshot.py
  • scripts/portfolio_commands/what_if.py
  • scripts/run_portfolio.py

Open the folder on GitHubat commit 6bc1be2

Compare with similar skills

Stock Portfolio Manager 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.

Stock Portfolio Manager compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Stock Portfolio Manager this skillokikusan-public/stock_skills135—~2.4kAutomated safety check: PassNone
Eastmoney Market DataHKUDS/Vibe-Trading35k—~1kAutomated safety check: PassMIT
Stock Deep Analysis Workflowwbh604/UZI-Skill7.1k—~9.1kAutomated safety check: NotesMIT
SEC EDGAR Filings FetcherHKUDS/Vibe-Trading35k—~1.4kAutomated safety check: PassMIT
Supply Chain Bottleneck Hunterxbtlin/ai-berkshire17k—~2.6kAutomated safety check: PassMIT
A-Share Daily Reviewqusong0627/QuantMind1.7k—~1.9kAutomated safety check: PassAGPL-3.0

Similar skills

  • Eastmoney Market Data

    HKUDS/Vibe-Trading

    Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.

    35k GitHub stars~1k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Runs a staged deep analysis of a single stock on China A-share, Hong Kong and US markets, ending in an HTML report with valuation models and investor-panel scores.

    7.1k GitHub stars~9.1k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check: notes
  • SEC EDGAR Filings Fetcher

    HKUDS/Vibe-Trading

    Fetches U.S. SEC EDGAR data: resolves tickers to CIK numbers, lists recent 10-K, 10-Q and 8-K filings with document URLs, and pulls XBRL financial series.

    35k GitHub stars~1.4k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Scans a long-running industry trend for supply chain chokepoints, aiming to find second- and third-layer suppliers that the market has not yet priced in.

    17k GitHub stars~2.6k tokensUpdated 2 days ago
    Business, Finance & HRAuto-check passed
  • A-Share Daily Review

    qusong0627/QuantMind

    Produces a post-market review report for the China A-share market from local QuantDB data, news sentiment and model signals, ending in a next-day direction call.

    1.7k GitHub stars~1.9k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Queries Futu quotes, options, fundamentals and accounts and places orders through the Futu OpenAPI Python SDK, defaulting to simulated trading.

    1.7k GitHub stars~3.3k tokensUpdated today
    Business, Finance & HRAuto-check: notes

More from okikusan-public/stock_skills

All 9 skills in this repo
  • Market and Stock Deep Research

    okikusan-public/stock_skills

    Produces deep-dive reports on a stock, industry, market or business model by combining yfinance data with Grok API searches of X and the web.

    135 GitHub stars~739 tokensUpdated 5 mo ago
    Auto-check passed
  • Value Stock Screener

    okikusan-public/stock_skills

    Screens for undervalued stocks across about 60 regions with yfinance's EquityQuery, using ratios such as PER, PBR, dividend yield and ROE, with optional theme filters.

    135 GitHub stars~2.4k tokensUpdated 5 mo ago
    Auto-check passed
  • Portfolio Stress Test

    okikusan-public/stock_skills

    Stress-tests a stock portfolio: takes a list of holdings, applies macro scenarios and reports shock sensitivity, concentration, correlation, VaR and causal chains.

    135 GitHub stars~814 tokensUpdated 5 mo ago
    Auto-check passed
  • Stock and ETF Report

    okikusan-public/stock_skills

    Generates a financial report for one stock or ETF from its ticker, with valuation scores for stocks and expense ratio and fund-size ratings for ETFs.

    135 GitHub stars~370 tokensUpdated 5 mo ago
    Auto-check passed
  • Plan Mode Orchestrator

    okikusan-public/stock_skills

    Runs a seven-agent planning workflow, started by asking for plan mode, that designs, executes, loops and reviews analysis work for stock portfolio decisions.

    135 GitHub stars~2.5k tokensUpdated 5 mo ago
    Auto-check passed
  • Graph Query

    okikusan-public/stock_skills

    知識グラフへの自然言語クエリ。過去のレポート・スクリーニング・取引・リサーチ・市況を検索. An agent skill from okikusan-public/stock_skills.

    135 GitHub stars~153 tokensUpdated 5 mo ago
    Auto-check passed

Works with

Questions about Stock Portfolio Manager

What does Stock Portfolio Manager do?

Manages a stock portfolio through a Python command line: snapshots with profit and loss, buy and sell records, structure analysis, health checks and trade reviews. py` with a subcommand. `snapshot` shows current prices, profit and loss and currency conversion.

When should I use Stock Portfolio Manager?

Stock Portfolio Manager fits situations like: recording stock purchases and sales and viewing the current portfolio; analyzing portfolio concentration by region, sector, currency and size; running a health check on holdings for trend and fundamental warnings; reviewing realized profit and loss across past trades.

How do I install Stock Portfolio Manager in Claude Code?

Run `npx skills add okikusan-public/stock_skills --skill stock-portfolio -a claude-code`. Or copy the skill folder (.claude/skills/stock-portfolio in okikusan-public/stock_skills) into .claude/skills/stock-portfolio in your project. Claude Code loads it when a task matches its description.

How do I install Stock Portfolio Manager in Codex?

Run `npx skills add okikusan-public/stock_skills --skill stock-portfolio -a codex`. Or copy the skill folder (.claude/skills/stock-portfolio in okikusan-public/stock_skills) into .agents/skills/stock-portfolio in your project. Codex loads it when a task matches its description.

Can I use Stock Portfolio Manager 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 okikusan-public/stock_skills --skill stock-portfolio -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stock-portfolio, .gemini/skills/stock-portfolio, .github/skills/stock-portfolio and .opencode/skills/stock-portfolio in your project.

What does Stock Portfolio Manager need to run?

Going by SKILL.md and its folder, Stock Portfolio Manager needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3 to run scripts/run_portfolio.py. Its frontmatter pre-approves these tools: Bash(python3 *).

Does Stock Portfolio Manager 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 Stock Portfolio Manager 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Stock Portfolio Manager use?

No licence was found for Stock Portfolio Manager or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Stock Portfolio Manager use?

About 2.4k tokens (SKILL.md is roughly 9.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Stock Portfolio Manager?

Skills that share tags, products or a category with Stock Portfolio Manager: Eastmoney Market Data (HKUDS/Vibe-Trading, 35k stars), Stock Deep Analysis Workflow (wbh604/UZI-Skill, 7.1k stars), SEC EDGAR Filings Fetcher (HKUDS/Vibe-Trading, 35k stars) and Supply Chain Bottleneck Hunter (xbtlin/ai-berkshire, 17k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Stock Portfolio Manager?

okikusan-public (a GitHub user) maintains it in okikusan-public/stock_skills, which has 135 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on April 25, 2026.

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