Communitygithub.com

aiskillstore/marketplace

自動載入 Portfolio Buddy 2 開發的專案上下文。適用於任何涉及 React 19 開發、TypeScript、投資組合分析功能、指標計算、交易策略比較或處理 Portfolio Buddy 2 程式碼庫的任務。包含技術棧、已知問題與架構限制。

marketplace 是什麼?

此技能為 Portfolio Buddy 2 提供完整的專案上下文,旨在協助 AI 代理在開發過程中做出精準決策。技能內容涵蓋技術棧(React 19、TypeScript、Vite、Tailwind CSS、Chart.js、Supabase 等)、架構約束(元件最多 200 行、僅使用純 React hooks、嚴格的 TypeScript)、以及已知的技術債務(過大元件、15 個 any 型別違規、未使用的 Recharts 相依套件)。此外,也記錄了最近的開發進展,如 Sortino 比率計算、日期範圍篩選與進階多欄排序。此技能可與 Claude Code、Cursor、Codex 等 AI 工具搭配使用,確保代理在執行程式碼重構、新增功能或除錯時,能充分理解專案的特殊慣例與歷史脈絡,從而生成更精準且符合專案規範的程式碼。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/aiskillstore/marketplace/tree/HEAD/skills/5minfutures/portfolio-context

在你喜歡的 AI 中提問

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

說明文件

Portfolio Buddy 2 - 專案上下文

技術棧

  • 前端:React 19、TypeScript、Vite
  • UI:Tailwind CSS、shadcn/ui(僅使用色彩系統)
  • 圖表:Chart.js、react-chartjs-2、chartjs 插件(縮放、註釋、日期適配器)
  • 狀態管理:純 React(useState、useMemo、useCallback)
  • 資料工具:date-fns 用於日期操作
  • 後端:Supabase(PostgreSQL)
  • 部署:Cloudflare Pages

專案目的

專為投資人與期貨交易者打造的投資組合分析工具,功能包括:

  • 比較交易策略與基準資產(SPY、GLD)
  • 計算資產間的相關矩陣(Spearman 與 Pearson)
  • 分析風險指標與績效(夏普比率、Sortino 比率、最大回撤等)
  • 透過 CSV 上傳交易資料並視覺化結果
  • 應用合約乘數調整期貨交易的指標
  • 按日期範圍篩選資料以進行特定時期分析

已知問題與技術債務

當前技術債務

  1. 未使用的相依套件:已安裝 Recharts(11.5KB)但從未匯入

    • 應從 package.json 中移除
    • 目前使用 Chart.js 替代
  2. 元件過大:違反 200 行標準

    • PortfolioSection.tsx(591 行)→ 需要重構為子元件
    • App.tsx(351 行)→ 將區塊抽出為元件
    • MetricsTable.tsx(242 行)→ 已改善但仍超過限制
  3. TypeScript 違規:15 處使用 any 型別

    • usePortfolio.ts:交易/指標型別中有 11 處
    • useMetrics.ts:排序比較中有 4 處
    • dataUtils.ts:Metrics 介面中有 1 處

已知錯誤

  1. Supabase 上傳錯誤:大檔案上傳時偶發 500 錯誤
    • 已在 commit 9fb7fdb 中加強錯誤處理
    • 檢查上傳 hooks 中的錯誤處理邏輯
    • 確認免費方案的行數限制是否未超過

近期新增功能

  • Sortino 比率計算(commits 258ba3a, 9f25040)
    • 位置:直接在 PortfolioSection.tsx 中實作(第 133-158 行)
    • 無風險利率輸入狀態,供使用者指定無風險利率
    • 使用 sqrt(365) 因子計算年化下行風險
    • 修正變異數計算(除以總報酬數,而非僅負報酬)
    • 顯示於投資組合統計區塊(第 535 行)
    • 注意:不在 dataUtils.ts 中 - 因需投資組合層級上下文而保留在元件中
  • 日期範圍篩選(commit 258ba3a)
    • 依據開始/結束日期篩選投資組合資料
    • 在 usePortfolio hook 中實作
  • 進階多欄排序(useSorting hook)
    • 依據優先級對多個欄位排序
    • 每個欄位提供自訂比較邏輯

架構約束

  • 元件限制:每個元件最多 200 行(目前有 3 個元件違規)
  • Hook 模式:自訂 hooks 放在 /src/hooks/
  • 工具函式模式:純函式放在 /src/utils/
  • 型別安全:嚴格的 TypeScript,禁止使用 any 型別(目前有 15 處違規視為技術債務)
  • 狀態管理:僅使用純 React hooks - 不使用 Zustand 或 TanStack Query

主要元件結構

src/
├── components/
│   ├── AnalyticsControls.tsx     (切換指標/投資組合/相關性檢視)
│   ├── ContractInput.tsx         (合約乘數輸入)
│   ├── CorrelationHeatmap.tsx    (相關性熱力圖視覺化)
│   ├── CorrelationSection.tsx    (相關性分析包裝器)
│   ├── CustomTooltip.tsx         (圖表工具提示)
│   ├── ErrorList.tsx             (錯誤顯示)
│   ├── Header.tsx                (應用程式標頭)
│   ├── MasterContractControl.tsx (對所有項目套用合約價值)
│   ├── MetricsTable.tsx          (指標顯示與選擇)
│   ├── PortfolioSection.tsx      (投資組合圖表與分析 - 591 行!)
│   ├── SessionComplete.tsx       (完成 UI)
│   ├── SortableHeader.tsx        (表格標頭含排序指示器)
│   ├── UploadedFilesList.tsx     (已上傳檔案清單)
│   └── UploadSection.tsx         (檔案上傳至 Supabase)
├── hooks/
│   ├── useContractMultipliers.ts (管理合約乘數)
│   ├── useMetrics.ts             (計算交易指標)
│   ├── usePortfolio.ts           (投資組合資料與日期篩選)
│   └── useSorting.ts             (進階多欄排序)
└── utils/
    └── dataUtils.ts              (指標計算、CSV 解析、相關性分析)

關鍵慣例

  • 路徑別名:@/ 對應 src/ — 所有內部匯入請使用此別名
  • shadcn-ui:僅使用色彩 token — CSS 變數定義在 src/index.css,未實際安裝 shadcn 元件。可透過 npx shadcn@latest add button 等方式後續新增
  • Git 工作流程:功能分支 → git checkout -b feature/name → 常規提交(feat:、fix:、chore:)→ 向 main 發送 PR
  • 社群品牌:5minfutures.com 交易社群;assets 中的 Skool 標誌;嵌入的 GoHighLevel 表單

遷移上下文

從舊應用程式遷移 40 個功能(已完成 90%)。詳細資訊請參閱 migration-tracker 技能。

Individual skills in this repo

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

aiskillstore/marketplace

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

aiskillstore/marketplace

Use when the user asks to "pre-launch check the landing page", "run a Quality-Score preflight", or "verify ad-to-page message match before launch"; produces an ad↔page continuity report — message-match gaps, above-the-fold check, page-speed read, form-friction count, mobile-render flags — as a pass/fix punch list. Not for redesigning or rewriting the page — use landing-optimizer; not for scoring the account or the RQS — use ad-account-auditor. 落地页体验预检/广告落地页一致性检查

aiskillstore/marketplace

Use when the user asks to "optimize our landing page for influencer traffic", "fix our promo-code landing page", or "improve conversion from a creator campaign"; produces a message-match audit, page-structure and social-proof recommendations, a promo-code/CTA conversion plan, and an A/B test roadmap. Not for measuring campaign results after launch — use performance-analyzer.

aiskillstore/marketplace

Audit a landing page, sales page or checkout page for conversion leaks and return a fix list ordered by expected revenue impact. Use when asked to review, critique or improve a landing page, sales page, opt-in page, product page or checkout flow, when conversion rate is low, when paid traffic is not converting, or when someone asks "why isn't this page converting" or wants a CRO / landing page review.

aiskillstore/marketplace

This skill helps users extract GitHub repository project details and contributor contact information using keywords, stars, and update dates. Agent should proactively apply this skill when users express needs like search for GitHub projects by keywords, find top open-source contributors in specific domains, extract developer contacts from GitHub repositories, discover trending repositories with high stars, gather contributor profiles and social links for tech recruiting, retrieve GitHub project descriptions and metrics, build developer communities by finding active contributors, search for repositories updated recently, collect personal website and Twitter links of developers, generate targeted leads for developer tools, or track active open-source contributors for collaboration.

aiskillstore/marketplace

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

aiskillstore/marketplace

Using the Wonda CLI to generate images, videos, music, and audio from the terminal — plus LinkedIn, Reddit, and X/Twitter research and automation

aiskillstore/marketplace

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

aiskillstore/marketplace

Generates creative domain name ideas for your project and checks availability across multiple TLDs (.com, .io, .dev, .ai, etc.). Saves hours of brainstorming and manual checking.

aiskillstore/marketplace

Process video files with audio extraction, format conversion (mp4, webm), and Whisper transcription. Use when user mentions video conversion, audio extraction, transcription, mp4, webm, ffmpeg, or whisper transcription.

aiskillstore/marketplace

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.

aiskillstore/marketplace

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

aiskillstore/marketplace

Router skill for LLMQuant portfolio workflows. Use when the user needs company profiles, thesis tracking, theme research, watchlist monitoring, or alert management.

aiskillstore/marketplace

Account assets, equity and fund positions, P&L, cash flow records, account statements, margin ratios, buy-power estimates, order management, and DCA recurring investments via Longbridge (most require Trade permission). Frameworks: portfolio diagnosis, rebalancing, asset allocation, risk analysis (VaR/CVaR), performance attribution, and tax-loss harvesting. Triggers: "持仓", "账户", "盈亏", "资产", "对账单", "下单", "买入", "卖出", "撤单", "定投", "组合诊断", "再平衡", "资产配置", "风险分析", "绩效归因", "税损收割", "持倉", "賬戶", "盈虧", "對賬單", "下單", "買入", "賣出", "組合診斷", "再平衡", "稅損收割", "positions", "portfolio", "P&L", "order", "buy", "sell", "DCA", "statement", "risk analysis", "rebalancing", "tax harvesting", "我的风险", "持仓风险", "风险敞口", "資產", "資產配置", "風險分析", "績效歸因", "撤單

aiskillstore/marketplace

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

aiskillstore/marketplace

Use for Codex models/pricing, scheduled tasks, skills, settings, setup, troubleshooting, customization, automations, and self-knowledge—including 'you,' 'your,' 'this app,' or 'this coding agent' when they refer to Codex—and for OpenAI APIs/products and ChatGPT Work. Also use for model choice/migration, prompting, SDKs, Responses, Realtime, agents, evals, and Chat/Work/Codex comparisons. Do not use for generic app/software tasks that merely mention Codex.

aiskillstore/marketplace

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

aiskillstore/marketplace

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

aiskillstore/marketplace

Perform a read-only, defect-first review of a specified code change and return every actionable finding. Use when another agent delegates review of uncommitted changes, a base-branch diff, a commit, or custom review instructions.

aiskillstore/marketplace

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

相關技能