Communitygithub.com

baneeishaque/ljt-520_openclaw-backup

一個完全在本機執行的投資組合追蹤工具。所有資料都儲存在 ~/.portfolio-tracker/ 中。

ljt-520_openclaw-backup 是什麼?

Portfolio Tracker Skill 是一款完全離線運作的投資組合追蹤工具,所有資料都安全地儲存在本機目錄 ~/.portfolio-tracker/ 中。它設計給注重隱私的開發者和投資者使用,避免將敏感的財務資料傳輸到雲端。此工具支援多種資產類型,包括加密貨幣、美股、港股、A股和現金,並能透過 Binance、Interactive Brokers (IBKR) 與區塊鏈錢包等外部平台自動同步資產與價格。它提供一組 TypeScript 命令列腳本,可用於管理投資組合、擷取即時與歷史價格、同步交易所持倉,並提供 AI 投資建議。其資料結構以 JSON 格式儲存,易於解析,並可與其他本機工具整合。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/baneeishaque/ljt-520_openclaw-backup/tree/HEAD/skills/aigeneralstore/portfolio-tracking-skill

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

投資組合追蹤技能

一個完全在本機執行的投資組合追蹤工具。所有資料都儲存在 ~/.portfolio-tracker/ 中。

架構

  • 資料:~/.portfolio-tracker/data.json(投資組合、資產、價格)
  • 設定:~/.portfolio-tracker/config.json(API 金鑰、錢包位址、使用者設定檔)
  • 腳本:TypeScript CLI 工具,位於 <skill-path>/scripts/,透過 npx tsx 執行

首次設定

在執行任何腳本之前,請確保已安裝相依套件:

npm install --prefix <skill-path>/scripts

將 <skill-path> 替換為此技能的實際安裝路徑。

腳本運作方式

每個腳本都是獨立的 CLI 工具。請使用以下方式執行:

npx tsx <skill-path>/scripts/<script>.ts <command> [args]

腳本在需要時會從標準輸入讀取資料,並將 JSON 輸出到標準輸出。

data-store.ts

  • load — 讀取投資組合資料(若遺失則建立預設值)
  • save — 寫入投資組合資料(從標準輸入讀取 JSON)
  • load-config — 讀取設定
  • save-config — 寫入設定(從標準輸入讀取 JSON)

fetch-prices.ts

  • crypto <symbol> — 取得加密貨幣價格(Binance → CoinGecko)
  • stock <symbol> — 取得股票價格(Yahoo Finance)
  • fx — 取得 USD/CNY/HKD 匯率
  • historical <symbol> — 取得 3 年月度歷史資料
  • search <query> — 依名稱或代號搜尋資產
  • refresh — 批次重新整理價格(從標準輸入讀取資產 JSON)

binance-sync.ts

  • sync <apiKey> <apiSecret> — 擷取所有 Binance 餘額(6 種帳戶類型)
  • validate <apiKey> <apiSecret> — 驗證 API 憑證

ibkr-sync.ts

  • sync <token> <queryId> — 透過 Flex Query 擷取 IBKR 持倉
  • validate <token> <queryId> — 驗證 IBKR 憑證

blockchain-sync.ts

  • sync <address> [chain] — 擷取錢包餘額(單一鏈或全部 5 條 EVM 鏈)
  • validate <address> — 驗證 EVM 位址

資料類型

資產

{
  "id": "unique-id",
  "type": "CRYPTO | USSTOCK | HKSTOCK | ASHARE | CASH",
  "symbol": "BTC",
  "name": "Bitcoin",
  "quantity": 1.5,
  "avgPrice": 40000,
  "currentPrice": 50000,
  "currency": "USD | CNY | HKD",
  "transactions": [],
  "source": { "type": "manual | binance | wallet | ibkr" }
}

投資組合

{
  "id": "unique-id",
  "name": "Main",
  "assets": [...]
}

工作流程模式

檢視投資組合

  1. 透過 data-store.ts load 載入資料
  2. 依 currentPortfolioId 找到當前投資組合
  3. 使用 quantity * currentPrice 計算每個資產的總價值
  4. 使用 exchangeRates 轉換為顯示幣別
  5. 以格式化表格呈現

新增資產

  1. 載入資料
  2. 使用 fetch-prices.ts search <query> 搜尋資產
  3. 透過 fetch-prices.ts crypto/stock <symbol> 取得當前價格
  4. 使用產生的唯一 ID 將資產加入當前投資組合
  5. 儲存資料

重新整理價格

  1. 載入資料
  2. 將當前投資組合的資產透過標準輸入傳遞給 fetch-prices.ts refresh
  3. 同時執行 fetch-prices.ts fx 取得匯率
  4. 更新每個資產的 currentPrice 以及 exchangeRates
  5. 將 lastPriceRefresh 設為目前的 ISO 時間戳
  6. 儲存資料

從交易所/錢包同步

  1. 載入設定以取得憑證
  2. 執行對應的同步腳本
  3. 合併結果:更新既有資產(依 symbol+source 配對),新增資產
  4. 儲存資料

指令

可用的使用者指令:

  • /portfolio — 檢視與管理投資組合
  • /prices — 重新整理所有價格
  • /setup — 設定 API 金鑰與錢包
  • /sync-binance — 從 Binance 同步
  • /sync-ibkr — 從 Interactive Brokers 同步
  • /sync-wallet — 從區塊鏈錢包同步
  • /advise — 取得 AI 投資建議

Individual skills in this repo

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

baneeishaque/ljt-520_openclaw-backup

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

baneeishaque/ljt-520_openclaw-backup

Balance tracking, order overview, and market data across exchanges using OpenMM.

baneeishaque/ljt-520_openclaw-backup

Balance tracking, order overview, and market data across exchanges using OpenMM.

baneeishaque/ljt-520_openclaw-backup

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.

baneeishaque/ljt-520_openclaw-backup

Connect to a user's investment accounts via SnapTrade SDK and generate portfolio reports (e.g., daily total value). Use when the user wants SnapTrade-based brokerage connectivity (Webull, E*TRADE, etc.), connection portal links, account registration, or automated portfolio summaries.

baneeishaque/ljt-520_openclaw-backup

Query land ownership, leases, landlord info, and land payments. Write operations for payment management and lease renewals.

baneeishaque/ljt-520_openclaw-backup

Build high-converting landing pages and product sales pages using proven 10-section conversion frameworks. Includes Hero → Social Proof → Benefits → CTA flow for both lead capture and e-commerce pages.

baneeishaque/ljt-520_openclaw-backup

Generate complete, responsive HTML landing pages from a product name, tagline, and description. Clean CSS, mobile-ready, with hero, features, CTA, and footer sections.

baneeishaque/ljt-520_openclaw-backup

Optimize conversion pages for paid traffic from Meta (Facebook/Instagram), Google Ads, TikTok Ads, YouTube Ads, Amazon Ads, and Shopify Ads journeys.

baneeishaque/ljt-520_openclaw-backup

Perform a structured conversion rate optimization (CRO) audit of a landing page. Use when a user shares a landing page URL, pastes their page copy, describes their page content, or uploads a screenshot and asks for a conversion audit, CRO review, conversion analysis, landing page feedback, or wants to know why their page isn't converting. Produces a scored 8-factor audit (0–80 total), prioritized fix list with quick wins and strategic recommendations, and an executive summary. Covers: headline clarity, supporting copy, social proof, CTA effectiveness, visual hierarchy, trust signals, mobile/speed signals, and offer clarity.

baneeishaque/ljt-520_openclaw-backup

Generate landing page content from PRD — hero section, features, A/B headline variants, CTA, and SEO meta tags. Use when user says "create landing page", "write landing copy", "hero section", "A/B headlines", or "landing content". Can scaffold actual pages for astro-static. Do NOT use for SEO auditing (use /seo-audit).

baneeishaque/ljt-520_openclaw-backup

Build high-converting landing pages with proven structure, persuasive copy, and conversion optimization.

baneeishaque/ljt-520_openclaw-backup

Track a crypto portfolio across Binance, Hyperliquid, and Polymarket. Calculates NAV, unrealized P&L, daily drawdown, win rate, and equity curve. Use when you need portfolio tracking, NAV calculation, drawdown monitoring, or multi-venue position management.

相關技能