Track investments with buy/sell records, allocation charts, and P/L analysis. Use when managing a stock or crypto portfolio, rebalancing, or comparing assets.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install investment-portfolio或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install investment-portfolio⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/investment-portfolio/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- version: "4.0.0" name: investment-portfolio description: "Track investments with buy/sell records, allocation charts, and P/L analysis. Use when managing a stock or crypto portfolio, rebalancing, or comparing assets." author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills ---
Investment portfolio tracker — record holdings with buy prices, track performance and P/L, view allocation charts, analyze risk, calculate DCA, manage dividends, rebalance to targets, compare assets, and view sector breakdown. All data stored locally in JSONL format.
addAdd a holding — specify ticker, number of shares, and purchase price.
scripts/script.sh add AAPL 10 175.50
scripts/script.sh add BTC 0.5 42000
removeRemove a holding by ticker symbol.
scripts/script.sh remove TSLA
updateUpdate the current market price of a holding.
scripts/script.sh update AAPL 195.00
listShow all holdings with shares, buy price, and current price.
scripts/script.sh list
summaryPortfolio summary — total value, total cost, overall P/L.
scripts/script.sh summary
allocationASCII bar chart showing portfolio allocation by ticker as percentage.
scripts/script.sh allocation
performanceDetailed gain/loss analysis per holding with percentage returns.
scripts/script.sh performance
riskRisk metrics — standard deviation of returns and diversification score.
scripts/script.sh risk
rebalanceGenerate buy/sell suggestions to match target allocation percentages.
scripts/script.sh rebalance '{"AAPL":40,"GOOGL":30,"BTC":30}'
dcaDollar-cost averaging calculator — monthly investment table over 12 months.
scripts/script.sh dca AAPL 500
dividendCalculate dividend yield from annual dividend and current price.
scripts/script.sh dividend AAPL 3.76 195.00
compareCompare two holdings side by side — shares, prices, and P/L.
scripts/script.sh compare AAPL GOOGL
sectorsSector breakdown with allocation chart. Uses built-in ticker-to-sector mapping.
scripts/script.sh sectors
exportExport portfolio data as CSV.
scripts/script.sh export csv
historyShow transaction history from the log file.
scripts/script.sh history
helpscripts/script.sh help
versionscripts/script.sh version
# Build a portfolio
scripts/script.sh add AAPL 10 175
scripts/script.sh add GOOGL 5 140
scripts/script.sh add BTC 0.1 42000
scripts/script.sh update AAPL 195
# Analyze
scripts/script.sh summary
scripts/script.sh allocation
scripts/script.sh performance
scripts/script.sh risk
# Rebalance
scripts/script.sh rebalance '{"AAPL":50,"GOOGL":30,"BTC":20}'
scripts/script.sh compare AAPL GOOGL
scripts/script.sh sectors
| Variable | Required | Description | |----------|----------|-------------| | PORTFOLIO_DIR | No | Data directory (default: ~/.local/share/investment-portfolio/) |
All data saved in ~/.local/share/investment-portfolio/:
holdings.jsonl — Portfolio holdings (one JSON object per line)history.log — Transaction logAll prices are manually entered — no external API calls.
---
Powered by BytesAgain | bytesagain.com | [email protected]
安装 Investment Portfolio 后,可以对 AI 说这些话来触发它
Help me get started with Investment Portfolio
Explains what Investment Portfolio does, walks through the setup, and runs a quick demo based on your current project
Use Investment Portfolio to track investments with buy/sell records, allocation charts, and P/L...
Invokes Investment Portfolio with the right parameters and returns the result directly in the conversation
What can I do with Investment Portfolio in my finance & investment workflow?
Lists the top use cases for Investment Portfolio, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/investment-portfolio/ 目录(个人级,所有项目可用),或 .claude/skills/investment-portfolio/(项目级)。重启 AI 客户端后,用 /investment-portfolio 主动调用,或让 AI 根据上下文自动发现并使用。
Investment Portfolio 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Investment Portfolio 可免费安装使用。请查阅仓库了解许可证信息。
Track investments with buy/sell records, allocation charts, and P/L analysis. Use when managing a stock or crypto portfolio, rebalancing, or comparing assets.
Investment Portfolio 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my finance & investment tasks using Investment Portfolio
Identifies repetitive steps in your workflow and sets up Investment Portfolio to handle them automatically