Communitygithub.com

baneeishaque/ljt-520_openclaw-backup

一个完全本地运行的投资组合追踪器。所有数据均存储在 ~/.portfolio-tracker/ 中。

ljt-520_openclaw-backup 是什么?

该技能提供了一个完全本地化的投资组合追踪工具,所有数据安全地存储在 `~/.portfolio-tracker/` 目录下,无需依赖外部云服务。它通过一组 TypeScript CLI 脚本与 AI 代理(如 Claude Code、Codex 等)协作,支持加载、保存和刷新投资组合数据,以及从外部交易所和钱包同步资产。支持的平台包括但不限于 Claude Code、Cursor 和 Codex,通过标准输入输出进行交互。主要功能包括从 Binance 和 Interactive Brokers 等交易所同步数据、从 EVM 兼容区块链钱包获取余额、实时获取加密货币和股票价格,以及提供全面的投资组合概览。该工具架构清晰,资产和投资组合采用结构化 JSON 格式,便于 AI 代理程序化地解析和操作。它提供了一系列用户命令,用于管理投资组合、刷新价格、配置 API 密钥以及获取 AI 投资建议。

兼容平台~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 密钥、钱包地址、用户资料)
  • 脚本: <skill-path>/scripts/ 中的 TypeScript CLI 工具,通过 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": "唯一标识",
  "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": "唯一标识",
  "name": "主组合",
  "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. 使用生成的唯一标识将资产添加到当前投资组合
  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.

相关技能