Communitygithub.com

bg-szy/TOP-SKILLS

Contexto auto-cargado para el desarrollo de Portfolio Buddy 2. Úselo para CUALQUIER tarea que implique: desarrollo con React 19, TypeScript, características de análisis de cartera, cálculos de métricas, comparación de estrategias de trading o trabajo con el código base de Portfolio Buddy 2. Incluye stack tecnológico, problemas conocidos y restricciones arquitectónicas.

¿Qué es TOP-SKILLS?

Esta habilidad (TOP-SKILLS) proporciona el contexto completo del proyecto Portfolio Buddy 2. Es útil para desarrolladores que trabajan con React 19, TypeScript, Vite, Tailwind CSS y Chart.js, integrando características de análisis financiero como matrices de correlación (Spearman y Pearson), métricas de riesgo (Sharpe, Sortino, Max DD), y filtrado por rango de fechas. La habilidad detalla el stack tecnológico, problemas conocidos (como componentes sobredimensionados y violaciones de TypeScript), deuda técnica, bugs intermitentes en subidas a Supabase, y restricciones arquitectónicas (máximo 200 líneas por componente, solo hooks de React). Además, incluye la estructura de componentes, hooks y utilidades, así como convenciones clave como el alias de ruta @/ y el flujo de trabajo con Git. Está diseñada para ser utilizada con asistentes de IA (como Claude Code, Cursor) para garantizar que cualquier tarea relacionada con Portfolio Buddy 2 se realice con pleno conocimiento del contexto del proyecto.

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

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Portfolio Buddy 2 - Contexto del Proyecto

Stack Tecnológico

  • Frontend: React 19, TypeScript, Vite
  • UI: Tailwind CSS, shadcn/ui (solo sistema de colores)
  • Gráficos: Chart.js, react-chartjs-2, plugins chartjs (zoom, anotación, adaptador de fechas)
  • Estado: React plano (useState, useMemo, useCallback)
  • Utilidades de Datos: date-fns para manipulación de fechas
  • Backend: Supabase (PostgreSQL)
  • Despliegue: Cloudflare Pages

Propósito del Proyecto

Herramienta de análisis de cartera para inversores y traders de futuros para:

  • Comparar estrategias de trading vs activos de referencia (SPY, GLD)
  • Calcular matrices de correlación entre activos (Spearman y Pearson)
  • Analizar métricas de riesgo y rendimiento (Sharpe, Sortino, DD Máximo, etc.)
  • Subir datos de trading mediante CSV y visualizar resultados
  • Aplicar multiplicadores de contratos para ajustar métricas en trading de futuros
  • Filtrar datos por rango de fechas para análisis específico por período

Problemas Conocidos y Deuda Técnica

Deuda Técnica Actual

  1. Dependencia No Utilizada: Recharts (11.5KB) instalada pero nunca importada

    • Debe eliminarse de package.json
    • Actualmente se usa Chart.js
  2. Componentes Sobredimensionados: Violan el estándar de 200 líneas

    • PortfolioSection.tsx (591 líneas) → necesita refactorización en subcomponentes
    • App.tsx (351 líneas) → extraer secciones en componentes
    • MetricsTable.tsx (242 líneas) → mejorado pero aún por encima del límite
  3. Violaciones de TypeScript: 15 instancias del tipo any

    • usePortfolio.ts: 11 ocurrencias en tipos de trade/métricas
    • useMetrics.ts: 4 ocurrencias en comparaciones de ordenación
    • dataUtils.ts: 1 ocurrencia en la interfaz Metrics

Errores Conocidos

  1. Errores de Subida a Supabase: Errores 500 intermitentes en subidas grandes
    • Manejo de errores mejorado añadido en el commit 9fb7fdb
    • Verificar el manejo de errores en los hooks de subida
    • Verificar que los límites de filas no se excedan en el plan gratuito

Características Recientes Añadidas

  • Cálculo del Ratio Sortino (commits 258ba3a, 9f25040)
    • Ubicación: Implementado inline en PortfolioSection.tsx (líneas 133-158)
    • Estado de entrada de tasa libre de riesgo para tasa especificada por el usuario
    • Desviación a la baja anualizada usando factor sqrt(365)
    • Cálculo de varianza corregido (divide por rendimientos totales, no solo negativos)
    • Mostrado en la sección de estadísticas de cartera (línea 535)
    • Nota: NO está en dataUtils.ts - mantenido en el componente debido al contexto de nivel de cartera
  • Filtrado por Rango de Fechas (commit 258ba3a)
    • Filtrar datos de cartera por fecha de inicio/fin
    • Implementado en el hook usePortfolio
  • Ordenación Avanzada Multi-Columna (hook useSorting)
    • Ordenar por múltiples columnas con prioridad
    • Lógica de comparación personalizada por columna

Restricciones Arquitectónicas

  • Límite de Componentes: Máximo 200 líneas por componente (actualmente violado por 3 componentes)
  • Patrón de Hooks: Hooks personalizados en /src/hooks/
  • Patrón de Utilidades: Funciones puras en /src/utils/
  • Seguridad de Tipos: TypeScript estricto, sin tipos any (existen 15 violaciones como deuda técnica)
  • Gestión de Estado: Solo hooks de React planos - sin Zustand ni TanStack Query

Estructura de Componentes Clave

src/
├── components/
│   ├── AnalyticsControls.tsx     (alternar vistas Métricas/Cartera/Correlación)
│   ├── ContractInput.tsx         (entradas de multiplicadores de contratos)
│   ├── CorrelationHeatmap.tsx    (visualización de correlación)
│   ├── CorrelationSection.tsx    (envoltorio de análisis de correlación)
│   ├── CustomTooltip.tsx         (tooltips de gráficos)
│   ├── ErrorList.tsx             (visualización de errores)
│   ├── Header.tsx                (encabezado de la app)
│   ├── MasterContractControl.tsx (aplicar valor de contrato a todos)
│   ├── MetricsTable.tsx          (visualización y selección de métricas)
│   ├── PortfolioSection.tsx      (gráficos y análisis de cartera - ¡591 líneas!)
│   ├── SessionComplete.tsx       (UI de finalización)
│   ├── SortableHeader.tsx        (encabezado de tabla con indicadores de ordenación)
│   ├── UploadedFilesList.tsx     (lista de archivos subidos)
│   └── UploadSection.tsx         (subida de archivos a Supabase)
├── hooks/
│   ├── useContractMultipliers.ts (gestionar multiplicadores de contratos)
│   ├── useMetrics.ts             (calcular métricas de trading)
│   ├── usePortfolio.ts           (datos de cartera y filtrado por fecha)
│   └── useSorting.ts             (ordenación avanzada multi-columna)
└── utils/
    └── dataUtils.ts              (cálculos de métricas, análisis CSV, correlaciones)

Convenciones Clave

  • Alias de ruta: @/ mapea a src/ — úselo para todas las importaciones internas
  • shadcn-ui: Solo tokens de color — variables CSS en src/index.css, sin componentes shadcn instalados. Podrían añadirse más tarde mediante npx shadcn@latest add button, etc.
  • Flujo de trabajo Git: Ramas de características → git checkout -b feature/nombre → commit convencional (feat:, fix:, chore:) → PR a main
  • Marca comunitaria: Comunidad de trading 5minfutures.com; logotipo de Skool en assets; formulario GoHighLevel embebido

Contexto de Migración

Migrando 40 características desde la app antigua (90% completado). Vea la habilidad migration-tracker para más detalles.

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 relacionados