Communitygithub.com

bg-szy/TOP-SKILLS

Contexte chargé automatiquement pour le développement de Portfolio Buddy 2. À utiliser pour toute tâche impliquant : développement React 19, TypeScript, fonctionnalités d'analyse de portefeuille, calculs de métriques, comparaison de stratégies de trading, ou travail avec la base de code de Portfolio Buddy 2. Contient la pile technique, les problèmes connus et les contraintes architecturales.

Qu'est-ce que TOP-SKILLS ?

Ce profil de compétence fournit à un agent IA le contexte complet du projet Portfolio Buddy 2, un outil d'analyse de portefeuille pour les investisseurs et traders de futures. Il définit la pile technique complète (React 19, TypeScript, Chart.js, Supabase, Cloudflare Pages), les fonctionnalités clés (calculs de métriques de risque comme le ratio de Sortino, filtrage par plage de dates, tri multicouche avancé), et liste les problèmes connus et la dette technique à prendre en compte. La compétence documente strictement les contraintes architecturales (limite de 200 lignes par composant, hooks React uniquement, aucun type `any`), la structure exacte du projet (composants, hooks, utilitaires), et les bugs actuels comme les erreurs de téléversement Supabase. L'agent est guidé pour éviter les violations de type, refactoriser les composants surdimensionnés et suivre les conventions de code établies, ce qui rend cette compétence essentielle pour toute tâche de développement, de débogage ou d'ajout de fonctionnalité dans le dépôt Portfolio Buddy 2.

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

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

Portfolio Buddy 2 - Contexte du Projet

Pile Technique

  • Frontend : React 19, TypeScript, Vite
  • UI : Tailwind CSS, shadcn/ui (système de couleurs uniquement)
  • Graphiques : Chart.js, react-chartjs-2, plugins chartjs (zoom, annotation, adaptateur de date)
  • État : React simple (useState, useMemo, useCallback)
  • Utilitaires de données : date-fns pour la manipulation de dates
  • Backend : Supabase (PostgreSQL)
  • Déploiement : Cloudflare Pages

Objectif du Projet

Outil d'analyse de portefeuille pour les investisseurs et traders de futures permettant de :

  • Comparer les stratégies de trading aux actifs de référence (SPY, GLD)
  • Calculer les matrices de corrélation entre actifs (Spearman et Pearson)
  • Analyser les métriques de risque et de performance (Sharpe, Sortino, Drawdown max, etc.)
  • Téléverser des données de trading via CSV et visualiser les résultats
  • Appliquer des multiplicateurs de contrat pour ajuster les métriques au trading de futures
  • Filtrer les données par plage de dates pour une analyse spécifique à une période

Problèmes Connus & Dette Technique

Dette Technique Actuelle

  1. Dépendance inutilisée : Recharts (11,5 Ko) installé mais jamais importé

    • Doit être supprimé du package.json
    • Utilise actuellement Chart.js à la place
  2. Composants surdimensionnés : Violent la norme des 200 lignes

    • PortfolioSection.tsx (591 lignes) → nécessite une refactorisation en sous-composants
    • App.tsx (351 lignes) → extraire les sections en composants
    • MetricsTable.tsx (242 lignes) → amélioré mais toujours au-dessus de la limite
  3. Violations TypeScript : 15 instances du type any

    • usePortfolio.ts : 11 occurrences dans les types de trades/métriques
    • useMetrics.ts : 4 occurrences dans les comparaisons de tri
    • dataUtils.ts : 1 occurrence dans l'interface Metrics

Bugs Connus

  1. Erreurs de téléversement Supabase : Erreurs 500 intermittentes sur les gros téléversements
    • Gestion d'erreurs améliorée ajoutée dans le commit 9fb7fdb
    • Vérifier la gestion des erreurs dans les hooks de téléversement
    • Vérifier que les limites de lignes ne sont pas dépassées sur le plan gratuit

Fonctionnalités Récentes Ajoutées

  • Calcul du Ratio de Sortino (commits 258ba3a, 9f25040)
    • Emplacement : Implémenté en ligne dans PortfolioSection.tsx (lignes 133-158)
    • État d'entrée du taux sans risque pour un taux sans risque spécifié par l'utilisateur
    • Déviation à la baisse annualisée utilisant le facteur sqrt(365)
    • Correction du calcul de variance (divise par le nombre total de rendements, pas seulement les négatifs)
    • Affiché dans la section des statistiques du portefeuille (ligne 535)
    • Remarque : PAS dans dataUtils.ts - conservé dans le composant en raison du contexte du niveau portefeuille
  • Filtrage par Plage de Dates (commit 258ba3a)
    • Filtrer les données de portefeuille par date de début/fin
    • Implémenté dans le hook usePortfolio
  • Tri Multicouche Avancé (hook useSorting)
    • Trier par plusieurs colonnes avec priorité
    • Logique de comparaison personnalisée par colonne

Contraintes Architecturales

  • Limite de Composant : Max 200 lignes par composant (actuellement violé par 3 composants)
  • Modèle de Hook : Hooks personnalisés dans /src/hooks/
  • Modèle d'Utilitaire : Fonctions pures dans /src/utils/
  • Sécurité des Types : TypeScript strict, aucun type any (15 violations existent en tant que dette technique)
  • Gestion d'État : Hooks React uniquement - pas de Zustand ou TanStack Query

Structure des Composants Clés

src/
├── components/
│   ├── AnalyticsControls.tsx     (basculer les vues Métriques/Portefeuille/Corrélation)
│   ├── ContractInput.tsx         (saisie des multiplicateurs de contrat)
│   ├── CorrelationHeatmap.tsx    (visualisation de la corrélation)
│   ├── CorrelationSection.tsx    (wrapper d'analyse de corrélation)
│   ├── CustomTooltip.tsx         (infobulles de graphique)
│   ├── ErrorList.tsx             (affichage des erreurs)
│   ├── Header.tsx                (en-tête de l'application)
│   ├── MasterContractControl.tsx (appliquer la valeur du contrat à tous)
│   ├── MetricsTable.tsx          (affichage et sélection des métriques)
│   ├── PortfolioSection.tsx      (graphiques et analyse du portefeuille - 591 lignes !)
│   ├── SessionComplete.tsx       (UI de fin de session)
│   ├── SortableHeader.tsx        (en-tête de tableau avec indicateurs de tri)
│   ├── UploadedFilesList.tsx     (liste des fichiers téléversés)
│   └── UploadSection.tsx         (téléversement de fichiers vers Supabase)
├── hooks/
│   ├── useContractMultipliers.ts (gérer les multiplicateurs de contrat)
│   ├── useMetrics.ts             (calculer les métriques de trading)
│   ├── usePortfolio.ts           (données du portefeuille et filtrage par date)
│   └── useSorting.ts             (tri multicouche avancé)
└── utils/
    └── dataUtils.ts              (calculs de métriques, analyse CSV, corrélations)

Conventions Clés

  • Alias de chemin : @/ correspond à src/ — utilisez-le pour toutes les importations internes
  • shadcn-ui : Jetons de couleur uniquement — variables CSS dans src/index.css, aucun composant shadcn réel installé. Peut être ajouté ultérieurement via npx shadcn@latest add button, etc.
  • Flux de travail Git : Branches de fonctionnalités → git checkout -b feature/name → commit conventionnel (feat:, fix:, chore:) → PR vers main
  • Image de marque communautaire : Communauté de trading 5minfutures.com ; logo Skool dans les assets ; formulaire GoHighLevel intégré

Contexte de Migration

Migration de 40 fonctionnalités de l'ancienne application (achevée à 90 %). Voir la compétence migration-tracker pour plus de détails.

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

Skills associés