Communitygithub.com

modbender/skill-library-mcp

使用命令行追踪股票和加密货币投资组合,包括实时价格、盈亏、股息追踪和多投资组合管理。

skill-library-mcp 是什么?

这是一个专为开发者设计的 CLI 工具,用于本地追踪股票和加密货币投资组合。它通过 Yahoo Finance API 获取实时股票价格,通过 CoinGecko API 获取加密货币价格,并实时计算每个持仓的盈亏(P&L)。该技能支持多投资组合管理,允许用户创建、切换和删除不同的投资组合。除了基本的持仓管理(添加、卖出、移除),还提供了强大的股息追踪功能,包括股息收益率、成本收益率(YOC)、预计年收入以及即将到来的除息日日历。输出支持 CSV 导出,并提供一个可选的 Web UI 界面。该技能适用于 Claude Code、Cursor、Codex 等 AI 代理平台,数据存储在本地 `data/portfolio.json` 文件中。

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

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

投资组合追踪器

一个用于追踪股票和加密货币投资组合的 CLI 工具,支持实时价格、盈亏和股息追踪。

何时使用此技能

在需要以下操作时使用此技能:

  • 在本地追踪股票和加密货币持仓
  • 获取实时价格和盈亏
  • 追踪股息收益率、成本收益率和预计收入
  • 查看即将到来的除息日
  • 管理多个投资组合
  • 将投资组合数据导出为 CSV

工具

此技能提供以下功能:

1. 列出持仓

显示所有持仓及其当前价值和盈亏。

命令:

npx tsx portfolio.ts list

2. 添加持仓

添加新的股票或加密货币持仓。

命令:

npx tsx portfolio.ts add <symbol> <quantity> <price> <name> [type]

示例:

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 <symbol> <quantity> <price> [date]

示例:

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 [symbol]

示例:

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

5. 盈亏总结

显示已实现和未实现的盈亏。

命令:

npx tsx portfolio.ts pnl

6. 股息追踪

查看股票持仓的详细股息信息,包括收益率、成本收益率(YOC)和预计年收入。

命令:

npx tsx portfolio.ts dividends

7. 股息总结

显示投资组合级别的股息总结:预计总收入、加权平均收益率和成本收益率。

命令:

npx tsx portfolio.ts dividend-summary

输出包括:

  • 预计年收入总额
  • 月/季度收入估算
  • 所有持仓的加权平均收益率
  • 投资组合成本收益率
  • 派息股票数量

8. 股息日历

查看持仓即将到来的除息日。

命令:

npx tsx portfolio.ts calendar [days]

示例:

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 <symbol>

11. 投资组合价值

显示总投资组合价值和盈亏。

命令:

npx tsx portfolio.ts value

12. 管理投资组合

列出、切换或创建投资组合。

命令:

npx tsx portfolio.ts portfolios
npx tsx portfolio.ts switch "Portfolio Name"
npx tsx portfolio.ts create "New Portfolio"

提示: 运行 npm link 后,您可以使用更短的 portfolio 命令代替 npx tsx portfolio.ts。

安装

首先,安装所需的依赖项:

npm install

这将安装所有必要的包,包括 TypeScript 运行时(tsx)、Next.js、React 以及 package.json 中列出的其他依赖项。

可选: 全局链接 CLI 以便更方便访问:

npm link

链接后,您可以使用 portfolio <command> 代替 npx tsx portfolio.ts <command>。

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.

相关技能