Communitygithub.com

bg-szy/TOP-SKILLS

Contexto auto-carregado para desenvolvimento do Portfolio Buddy 2. Use para QUALQUER tarefa envolvendo: React 19, TypeScript, análise de portfólio, cálculos de métricas, comparação de estratégias de trading ou trabalho com o código do Portfolio Buddy 2. Contém pilha tecnológica, problemas conhecidos e restrições arquiteturais.

O que é TOP-SKILLS?

Este skill fornece contexto completo do projeto Portfolio Buddy 2, uma ferramenta de análise de portfólio para investidores e traders de futuros. Ele documenta a pilha tecnológica (React 19, TypeScript, Vite, Tailwind CSS, Chart.js, Supabase, Cloudflare Pages), problemas conhecidos (como componentes muito grandes e violações de tipo `any`), bugs (como erros intermitentes de upload no Supabase) e recursos recentes (cálculo de Sortino Ratio, filtragem por período, ordenação multi-coluna). Também define restrições arquiteturais rígidas: máximo de 200 linhas por componente, uso exclusivo de hooks React puros, tipagem estrita e padrões de diretório para hooks e utilitários. Este skill é essencial para qualquer desenvolvedor trabalhando no repositório, garantindo consistência e evitando regressões. Ele suporta plataformas como Claude Code, Cursor e Codex, e deve ser carregado automaticamente para qualquer tarefa relacionada ao projeto.

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

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Portfolio Buddy 2 - Contexto do Projeto

Pilha Tecnológica

  • Frontend: React 19, TypeScript, Vite
  • UI: Tailwind CSS, shadcn/ui (apenas sistema de cores)
  • Gráficos: Chart.js, react-chartjs-2, plugins chartjs (zoom, annotation, date adapter)
  • Estado: React puro (useState, useMemo, useCallback)
  • Utilitários de Dados: date-fns para manipulação de datas
  • Backend: Supabase (PostgreSQL)
  • Deploy: Cloudflare Pages

Propósito do Projeto

Ferramenta de análise de portfólio para investidores e traders de futuros para:

  • Comparar estratégias de trading vs ativos benchmark (SPY, GLD)
  • Calcular matrizes de correlação entre ativos (Spearman & Pearson)
  • Analisar métricas de risco e performance (Sharpe, Sortino, Max DD, etc.)
  • Enviar dados de trades via CSV e visualizar resultados
  • Aplicar multiplicadores de contrato para ajustar métricas para trading de futuros
  • Filtrar dados por intervalo de datas para análise específica de períodos

Problemas Conhecidos e Dívida Técnica

Dívida Técnica Atual

  1. Dependência Não Utilizada: Recharts (11.5KB) instalada mas nunca importada

    • Deve ser removida do package.json
    • Atualmente usando Chart.js
  2. Componentes Acima do Limite: Violam padrão de 200 linhas

    • PortfolioSection.tsx (591 linhas) → precisa ser refatorado em subcomponentes
    • App.tsx (351 linhas) → extrair seções em componentes
    • MetricsTable.tsx (242 linhas) → melhorado mas ainda acima do limite
  3. Violações de TypeScript: 15 ocorrências de tipo any

    • usePortfolio.ts: 11 ocorrências em tipos de trades/métricas
    • useMetrics.ts: 4 ocorrências em comparações de ordenação
    • dataUtils.ts: 1 ocorrência na interface Metrics

Bugs Conhecidos

  1. Erros de Upload no Supabase: Erros 500 intermitentes em uploads grandes
    • Tratamento de erros aprimorado adicionado no commit 9fb7fdb
    • Verificar tratamento de erros nos hooks de upload
    • Verificar se os limites de linhas não foram excedidos no plano gratuito

Funcionalidades Recentes Adicionadas

  • Cálculo de Sortino Ratio (commits 258ba3a, 9f25040)
    • Localização: Implementado inline no PortfolioSection.tsx (linhas 133-158)
    • Estado de taxa livre de risco para taxa especificada pelo usuário
    • Desvio negativo anualizado usando fator sqrt(365)
    • Cálculo de variância corrigido (divide pelo total de retornos, não apenas negativos)
    • Exibido na seção de estatísticas do portfólio (linha 535)
    • Nota: NÃO está em dataUtils.ts - mantido no componente devido ao contexto do portfólio
  • Filtragem por Intervalo de Datas (commit 258ba3a)
    • Filtrar dados do portfólio por data início/fim
    • Implementado no hook usePortfolio
  • Ordenação Avançada Multi-Coluna (hook useSorting)
    • Ordenar por múltiplas colunas com prioridade
    • Lógica de comparação personalizada por coluna

Restrições Arquiteturais

  • Limite de Componentes: Máximo de 200 linhas por componente (atualmente violado por 3 componentes)
  • Padrão de Hooks: Hooks personalizados em /src/hooks/
  • Padrão de Utilitários: Funções puras em /src/utils/
  • Segurança de Tipos: TypeScript estrito, sem tipos any (15 violações existem como dívida técnica)
  • Gerenciamento de Estado: Apenas hooks React puros - sem Zustand ou TanStack Query

Estrutura de Componentes Chave

src/
├── components/
│   ├── AnalyticsControls.tsx     (alternar visualizações Métricas/Portfólio/Correlação)
│   ├── ContractInput.tsx         (inputs de multiplicadores de contrato)
│   ├── CorrelationHeatmap.tsx    (visualização de correlação)
│   ├── CorrelationSection.tsx    (wrapper de análise de correlação)
│   ├── CustomTooltip.tsx         (tooltips de gráficos)
│   ├── ErrorList.tsx             (exibição de erros)
│   ├── Header.tsx                (cabeçalho do app)
│   ├── MasterContractControl.tsx (aplicar valor de contrato a todos)
│   ├── MetricsTable.tsx          (exibição e seleção de métricas)
│   ├── PortfolioSection.tsx      (gráficos e análise do portfólio - 591 linhas!)
│   ├── SessionComplete.tsx       (UI de conclusão)
│   ├── SortableHeader.tsx        (cabeçalho de tabela com indicadores de ordenação)
│   ├── UploadedFilesList.tsx     (lista de arquivos enviados)
│   └── UploadSection.tsx         (envio de arquivos para o Supabase)
├── hooks/
│   ├── useContractMultipliers.ts (gerenciar multiplicadores de contrato)
│   ├── useMetrics.ts             (calcular métricas de trading)
│   ├── usePortfolio.ts           (dados do portfólio e filtragem por data)
│   └── useSorting.ts             (ordenação avançada multi-coluna)
└── utils/
    └── dataUtils.ts              (cálculos de métricas, parsing CSV, correlações)

Convenções Chave

  • Alias de caminho: @/ mapeia para src/ — use-o para todos os imports internos
  • shadcn-ui: Apenas tokens de cores — variáveis CSS em src/index.css, nenhum componente shadcn instalado. Podem ser adicionados posteriormente via npx shadcn@latest add button, etc.
  • Fluxo de trabalho Git: Branches de funcionalidade → git checkout -b feature/nome → commit convencional (feat:, fix:, chore:) → PR para main
  • Marca da comunidade: 5minfutures.com comunidade de trading; logotipo Skool em assets; formulário GoHighLevel embutido

Contexto de Migração

Migrando 40 funcionalidades do app antigo (90% completo). Veja o skill migration-tracker para detalhes.

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

Habilidades Relacionadas