Communitygithub.com

ポートフォリオトラッカー

株式と暗号資産のポートフォリオをCLIで追跡 - リアルタイム価格、損益、配当追跡、複数ポートフォリオ対応

ポートフォリオトラッカー とは?

このスキルは、CLI(コマンドラインインターフェース)ツールを使用して、株式と暗号資産(仮想通貨)のポートフォリオを管理・追跡するためのものです。Yahoo Finance APIとCoinGecko APIを利用してリアルタイムの価格、損益(P&L)、配当情報を取得します。複数のポートフォリオに対応しており、保有銘柄の追加・売却・削除、取引履歴の表示、配当利回りやYield on Cost(YOC)の計算、今後の配当落ち日のカレンダー表示、さらにはCSVエクスポート機能も備えています。コマンドライン操作に加えて、オプションでWeb UIも提供しており、直感的なグラフィカルインターフェースでポートフォリオの状況を確認することも可能です。データはローカルのJSONファイルに保存されるため、クラウドサービスに依存せずにプライベートな資産管理が行えます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/modbender/skill-library-mcp/tree/HEAD/data/claw-portfolio

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

ポートフォリオトラッカー は何をしますか?

株式と暗号資産のポートフォリオをリアルタイム価格、損益、配当追跡で管理するCLIツール。

このスキルを使用するタイミング

以下のような場面でこのスキルを使用します:

  • 株式や暗号資産の保有状況をローカルで追跡する
  • リアルタイム価格と損益を取得する
  • 配当利回り、Yield on Cost、予想収入を追跡する
  • 今後の配当落ち日を確認する
  • 複数のポートフォリオを管理する
  • ポートフォリオデータをCSVにエクスポートする

ツール

このスキルは以下の機能を提供します:

1. 保有銘柄一覧

現在の評価額と損益を含む全保有銘柄を表示します。

コマンド:

npx tsx portfolio.ts list

2. 保有銘柄の追加

新しい株式または暗号資産の保有を追加します。

コマンド:

npx tsx portfolio.ts add <シンボル> <数量> <価格> <名前> [タイプ]

例:

npx tsx portfolio.ts add AAPL 10 150 "Apple Inc." stock
npx tsx portfolio.ts add BTC 0.5 45000 Bitcoin crypto

3. 保有銘柄の売却

FIFO(先入先出法)方式で株式を売却します。

コマンド:

npx tsx portfolio.ts sell <シンボル> <数量> <価格> [日付]

例:

npx tsx portfolio.ts sell AAPL 5 180 2025-06-01
npx tsx portfolio.ts sell BTC 0.25 50000

4. 取引履歴

全ての保有銘柄または特定のシンボルの売却履歴を表示します。

コマンド:

npx tsx portfolio.ts history [シンボル]

例:

npx tsx portfolio.ts history
npx tsx portfolio.ts history AAPL

5. 損益サマリー

実現損益と未実現損益の両方を表示します。

コマンド:

npx tsx portfolio.ts pnl

6. 配当追跡

株式保有に関する詳細な配当情報(利回り、Yield on Cost(YOC)、予想年間収入を含む)を表示します。

コマンド:

npx tsx portfolio.ts dividends

7. 配当サマリー

ポートフォリオレベルの配当サマリー(総予想収入、加重平均利回り、Yield on Cost)を表示します。

コマンド:

npx tsx portfolio.ts dividend-summary

出力内容:

  • 予想年間収入の合計
  • 月次/四半期収入の推定
  • 全保有銘柄の加重平均利回り
  • ポートフォリオのYield on Cost
  • 配当支払銘柄数

8. 配当カレンダー

保有銘柄の今後の配当落ち日を表示します。

コマンド:

npx tsx portfolio.ts calendar [日数]

例:

npx tsx portfolio.ts calendar       # 今後30日間
npx tsx portfolio.ts calendar 60    # 今後60日間

9. 配当付き一覧表示

listコマンドは自動的に配当データを取得します。スキップするには--no-dividendsフラグを使用します。

コマンド:

npx tsx portfolio.ts list           # 配当情報付き
npx tsx portfolio.ts list --no-dividends  # 配当情報をスキップ

10. 保有銘柄の削除

シンボルを指定して保有銘柄を削除します。

コマンド:

npx tsx portfolio.ts remove <シンボル>

11. ポートフォリオ評価額

ポートフォリオの総評価額と損益を表示します。

コマンド:

npx tsx portfolio.ts value

12. ポートフォリオの管理

ポートフォリオの一覧表示、切り替え、作成を行います。

コマンド:

npx tsx portfolio.ts portfolios
npx tsx portfolio.ts switch "ポートフォリオ名"
npx tsx portfolio.ts create "新しいポートフォリオ"

ヒント: npm link実行後は、npx tsx portfolio.tsの代わりに短いportfolioコマンドを使用できます。

インストール

まず、必要な依存関係をインストールします:

npm install

これにより、TypeScriptランタイム(tsx)、Next.js、React、およびpackage.jsonに記載されているその他の依存関係を含む、必要なパッケージがすべてインストールされます。

オプション: グローバルにリンクして簡単にアクセスできるようにする:

npm link

リンク後は、npx tsx portfolio.ts <コマンド>の代わりにportfolio <コマンド>を使用できます。

NPMスクリプト

npm run dev        # Web UIを起動(オプション)
npm run build      # 本番用ビルド

Web UI(オプション)

オプションで、完全な配当追跡機能を備えたWebインターフェースを実行することもできます:

npm run dev

その後、http://localhost:3000 にアクセスしてください。

Web UIの機能:

  • リアルタイムのポートフォリオ評価額と損益追跡
  • 配当サマリーカード(年間収入、加重平均利回り、YOC、今後の配当落ち日)
  • 銘柄ごとの詳細な配当内訳表
  • 今後の配当落ち日を視覚的に表示するカレンダー
  • ポートフォリオ配分のインタラクティブな円グラフ

データ保存

ポートフォリオデータはローカルのdata/portfolio.jsonに保存されます。データファイルは初回実行時に空のポートフォリオで自動的に作成されます。

機能

  • Yahoo Finance APIによるリアルタイム株価取得
  • CoinGecko APIによるリアルタイム暗号資産価格取得
  • 複数ポートフォリオ対応
  • 保有銘柄ごとの損益追跡
  • 配当追跡(利回り、YOC、予想収入、配当落ち日)
  • CLIおよびオプションのWebインターフェース

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

modbender/skill-library-mcp

Paid acquisition strategy, budget allocation, and avoiding common advertising mistakes across platforms

modbender/skill-library-mcp

Complete investment portfolio risk management system. Analyze positions, calculate risk metrics, stress test scenarios, optimize allocations, and generate institutional-grade risk reports — all wit...

modbender/skill-library-mcp

Borrow from Aave via credit delegation. Agent self-funds by borrowing against delegator collateral. Supports borrow, repay, health checks. Works on Aave V2/V3.

modbender/skill-library-mcp

Discover and register autonomous AI agents. Use when: browsing the agent registry, submitting an agent for verification, or embedding agent badges. NOT for: general web search or agent capability analysis.

modbender/skill-library-mcp

Create AI avatar and talking head videos with OmniHuman, Fabric, PixVerse via inference.sh CLI. Models: OmniHuman 1.5, OmniHuman 1.0, Fabric 1.0, PixVerse Lipsync. Capabilities: audio-driven avatars, lipsync videos, talking head generation, virtual presenters. Use for: AI presenters, explainer videos, virtual influencers, dubbing, marketing videos. Triggers: ai avatar, talking head, lipsync, avatar video, virtual presenter, ai spokesperson, audio driven video, heygen alternative, synthesia alternative, talking avatar, lip sync, video avatar, ai presenter, digital human

modbender/skill-library-mcp

AI代码编辑器规则模板集合 - 为Cursor、Windsurf、Claude Code、Cline等AI编辑器提供项目规则配置。适用于需要配置AI编码助手规则的开发者,包含全栈Web、移动端、Vue3+SpringBoot等技术栈模板。

modbender/skill-library-mcp

Generate landing page code from product descriptions

modbender/skill-library-mcp

Create AI marketing videos for ads, promos, product launches, and brand content. Models: Veo, Seedance, Wan, FLUX for visuals, Kokoro for voiceover. Types: product demos, testimonials, explainers, social ads, brand videos. Use for: Facebook ads, YouTube ads, product launches, brand awareness. Triggers: marketing video, ad video, promo video, commercial, brand video, product video, explainer video, ad creative, video ad, facebook ad video, youtube ad, instagram ad, tiktok ad, promotional video, launch video

modbender/skill-library-mcp

Generate AI music videos end-to-end. Creates music with Suno (sunoapi.org), generates visuals with OpenAI/Seedream/Google/Seedance, and assembles into music video with ffmpeg. Supports timestamped lyrics (auto SRT), Suno native music video generation, slideshow/video/hybrid modes. Token-based cost tracking per generation.

modbender/skill-library-mcp

Generate AI-powered notes from videos (document, outline, or graphic-text formats)

modbender/skill-library-mcp

The video AI notes tool is provided by Baidu. Based on the video download address provided by the user, it downloads and parses the video, and finally generates AI notes corresponding to the video (a total of three types of notes can be generated: document notes, outline notes, and image-text notes).

modbender/skill-library-mcp

Automated appointment management for beauty salons, clinics, studios, and photo booths. Handles booking requests, calendar sync, conflict detection, reminders, no-show tracking, and waitlist management.

modbender/skill-library-mcp

Bird identification, life list tracking, and trading card generation. Use this skill when the user: sends a bird photo to identify, says "set up my Birdfolio" or "set my region", asks "how's my checklist", asks "Birdfolio progress", asks "how many birds have I found", asks "show my Birdfolio" or "show my life list", asks "what's my rarest bird", or asks "tell me about [bird species]". Handles everything from first-time setup through ongoing life list tracking and visual trading card generation.

modbender/skill-library-mcp

Multi-project task and research management (JSON-first CLI)

modbender/skill-library-mcp

Track cryptocurrency portfolios with real-time prices, P&L calculations, and allocation analysis. Query Bitcoin, Ethereum, Solana and 10,000+ token holdings.

modbender/skill-library-mcp

加密貨幣Portfolio追蹤 - 支援TRON/ETH/BSC,分析持倉、收益、Gas費用

modbender/skill-library-mcp

Lead strategy with competitive analysis, strategic planning, growth roadmaps, and business portfolio management.

modbender/skill-library-mcp

Create ATS-optimized resumes and CVs with proper structure, metrics, and industry targeting.

modbender/skill-library-mcp

Use this skill when the user asks to build, create, design, develop, or improve ANY frontend interface, web page, UI component, or visual element. This includes: - Building landing pages, websites, web apps, dashboards, portfolios, or any web interface - Creating UI components (buttons, forms, cards, navbars, modals, etc.) - Designing pages with React, Vue, Next.js, Svelte, or any frontend framework - Adding styling or improving visual design of existing components - Implementing specific design aesthetics (modern, dark, minimalist, brutalist, etc.) - User mentions "frontend", "UI", "UX", "design", "interface", "web design", or "styling" - User asks for "beautiful", "modern", "professional", "clean", or any aesthetic adjective - User requests help with CSS, Tailwind, styled-components, or any styling approach This skill automatically retrieves the appropriate design system prompt (Neo-brutalism, Modern Dark, Bauhaus, Cyberpunk, Material, etc.) to help create visually distinctive, production-grade frontend...

modbender/skill-library-mcp

Native video analysis using Google Gemini API. Upload and analyze video files — describe scenes, extract text/UI, answer questions about content, transcribe speech, identify objects and actions. Use when: (1) User sends a video file and wants it analyzed, (2) Video summarization or description needed, (3) Extracting text, UI elements, or information from screen recordings, (4) Answering questions about video content, (5) Comparing multiple videos, (6) Analyzing tutorials, demos, or walkthroughs.

関連スキル