Communitygithub.com

bg-szy/TOP-SKILLS

Portfolio Buddy 2 開発のための自動ロードコンテキスト。React 19、TypeScript、ポートフォリオ分析、指標計算、取引戦略比較、または Portfolio Buddy 2 コードベースの作業に使用します。テクノロジースタック、既知の問題、アーキテクチャ上の制約を含みます。

TOP-SKILLS とは?

このスキルは、Portfolio Buddy 2 アプリケーションの完全なプロジェクトコンテキストを提供します。React 19(TypeScript、Vite)、Tailwind CSS、Chart.js、Supabase、Cloudflare Pages などの主要なテクノロジースタックを網羅し、ポートフォリオ分析ツールの目的(戦略比較、相関分析、リスク指標計算、CSVアップロード)を明確に説明します。開発者はこのスキルを使用して、未使用の依存関係(Recharts)、コンポーネントの肥大化(例:PortfolioSection.tsx の591行)、TypeScriptの'any'型の違反(15件)などの既知の技術的負債を把握できます。また、Sortino比率計算や日付範囲フィルタリングなどの最近追加された機能、アーキテクチャ上の制約(コンポーネント200行制限、カスタムフックパターン)、主要なコンポーネント構造と規約(パスエイリアス '@/'、shadcn-uiのカラーシステムのみ使用、Gitワークフロー)も含まれています。このスキルは、Agent がコード変更を加える前に、プロジェクトの状態と制約を完全に理解するための参照として機能します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/bg-szy/TOP-SKILLS/tree/HEAD/skills/marketplace/portfolio-context

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

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)を比較
  • 資産間の相関行列(スピアマン相関とピアソン相関)を計算
  • リスク指標とパフォーマンス(シャープレシオ、ソルティノレシオ、最大ドローダウンなど)を分析
  • CSVで取引データをアップロードし、結果を可視化
  • 先物取引の指標調整のための契約乗数を適用
  • 特定期間分析のための日付範囲フィルタリング

既知の問題と技術的負債

現在の技術的負債

  1. 未使用の依存関係: Recharts(11.5KB)がインストールされているが、インポートされていない

    • package.json から削除すべき
    • 現在は Chart.js を使用中
  2. 巨大なコンポーネント: 200行の標準を超えている

    • PortfolioSection.tsx(591行)→ サブコンポーネントにリファクタリングが必要
    • App.tsx(351行)→ セクションをコンポーネントに分割
    • MetricsTable.tsx(242行)→ 改善されたが、まだ制限超過
  3. TypeScript違反: any型が15件存在

    • usePortfolio.ts: 取引/指標タイプで11件
    • useMetrics.ts: ソート比較で4件
    • dataUtils.ts: Metricsインターフェースで1件

既知のバグ

  1. Supabaseアップロードエラー: 大規模アップロード時に断続的な500エラーが発生
    • コミット 9fb7fdb でエラーハンドリングを強化
    • アップロードフックのエラーハンドリングを確認
    • 無料枠の行制限を超過していないか確認

最近追加された機能

  • ソルティノレシオ計算(コミット 258ba3a、9f25040)
    • 場所: PortfolioSection.tsx にインライン実装(133〜158行目)
    • ユーザー指定のリスクフリーレートのための入力状態
    • sqrt(365) 係数を使用した年率化下方偏差
    • 修正された分散計算(負のリターンだけでなく全リターンで除算)
    • ポートフォリオ統計セクションに表示(535行目)
    • 注意: dataUtils.ts にはない - ポートフォリオレベルのコンテキストのためコンポーネント内に保持
  • 日付範囲フィルタリング(コミット 258ba3a)
    • 開始日/終了日でポートフォリオデータをフィルタリング
    • usePortfolio フックに実装
  • 高度なマルチカラムソート(useSorting フック)
    • 優先順位付きの複数列ソート
    • カラムごとのカスタム比較ロジック

アーキテクチャ上の制約

  • コンポーネント制限: コンポーネントあたり最大200行(現在3つのコンポーネントが違反)
  • フックパターン: カスタムフックは /src/hooks/ に配置
  • ユーティリティパターン: 純粋関数は /src/utils/ に配置
  • 型安全性: 厳格なTypeScript、any型は使用禁止(技術的負債として15件の違反が存在)
  • 状態管理: プレーンなReactフックのみ - 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: カラートークンのみ — src/index.css 内のCSS変数、実際のshadcnコンポーネントは未インストール。後で npx shadcn@latest add button などで追加可能
  • Gitワークフロー: 機能ブランチ → git checkout -b feature/name → 従来のコミットメッセージ(feat:、fix:、chore:) → mainへのPR
  • コミュニティブランディング: 5minfutures.com 取引コミュニティ;Skoolロゴをアセットに;GoHighLevelフォームを埋め込み

移行コンテキスト

古いアプリからの40機能の移行(90%完了)。詳細は migration-tracker スキルを参照。

Individual skills in this repo

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

bg-szy/TOP-SKILLS

Brand-first landing page designer — runs a brand-identity interview (colors, typography, shape language), then generates and iterates on a polished landing page via Stitch with deployment-ready HTML. Use when the user asks to create, design, or build a landing page, homepage, or marketing page and has no established visual direction. Skip when they have a design mockup, need a dashboard or app UI, are working at component level, building a multi-page app, or restyling with known design tokens — use frontend-design instead.

bg-szy/TOP-SKILLS

Fill out Microsoft Azure Landing Zone (ALZ) Accelerator checklists by interviewing the user, mapping their Azure subscriptions, integrating IP addressing documentation, and applying Microsoft Cloud Adoption Framework best practices. Produces a completed Excel checklist (.xlsx) ready for ALZ deployment. Use this skill whenever the user mentions Azure Landing Zone, ALZ checklist, landing zone accelerator, platform landing zone configuration, ALZ bootstrap, hub-and-spoke setup, Azure network topology planning, or wants to fill out any ALZ-related checklist or configuration file. Also trigger when the user uploads an Excel file that contains tabs like "Accelerator - Bootstrap", "Accelerator - Bicep", or "Accelerator - Terraform".

bg-szy/TOP-SKILLS

Compose a premium, animated landing page section by section in Next.js + Tailwind + Motion (Framer Motion) — built on a real design system, with editorial copy and motion that feels human-crafted, not template-generated. Use when building or rebuilding a landing page, marketing site, or hero/feature/pricing/CTA sections that need to look production-ready and bespoke from day one.

bg-szy/TOP-SKILLS

Write high-converting landing page copy using proven frameworks like PAS (Problem-Agitate-Solution), AIDA, and StoryBrand. Creates headlines, value propositions, CTAs, and full page sections optimized for conversion. Use when users need landing page copy, sales page content, or marketing website text.

bg-szy/TOP-SKILLS

Optimize landing pages for conversions, performance, and SEO. Use when improving landing pages, increasing conversions, or optimizing page performance.

bg-szy/TOP-SKILLS

Review investment portfolios for risk, diversification, fees. Asset allocation recommendations, tax-loss harvesting, rebalancing.

bg-szy/TOP-SKILLS

Beads Viewer - Graph-aware triage engine for Beads projects. Computes PageRank, betweenness, critical path, and cycles. Use --robot-* flags for AI agents.

bg-szy/TOP-SKILLS

CI red? Call us. Pipeline fire brigade deploys. Use when user mentions CI failures, build errors, test failures, or pipeline issues. Do NOT load for: local builds, standard implementation work, reviews, or setup.

bg-szy/TOP-SKILLS

CASS Memory System - procedural memory for AI coding agents. Three-layer cognitive architecture with confidence decay, anti-pattern learning, cross-agent knowledge transfer, trauma guard safety system. Bun/TypeScript CLI.

bg-szy/TOP-SKILLS

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.

bg-szy/TOP-SKILLS

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.

bg-szy/TOP-SKILLS

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. 落地页体验预检/广告落地页一致性检查

bg-szy/TOP-SKILLS

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.

bg-szy/TOP-SKILLS

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.

bg-szy/TOP-SKILLS

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

bg-szy/TOP-SKILLS

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.

bg-szy/TOP-SKILLS

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

bg-szy/TOP-SKILLS

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", "我的风险", "持仓风险", "风险敞口", "資產", "資產配置", "風險分析", "績效歸因", "撤單

bg-szy/TOP-SKILLS

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.

bg-szy/TOP-SKILLS

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

関連スキル