skills/5minfutures/migration-tracker/SKILL.md
Context for ongoing migration from old Portfolio Buddy app. Use when: fixing bugs, adding migrated features, checking feature parity, or understanding why certain code exists. Contains list of 40 features being migrated and known issues.
npx skillsauth add aiskillstore/marketplace migration-trackerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Core features migrated and working:
CSV upload and parsing with PapaParse
Supabase storage integration
Basic metrics calculation (Sharpe, Max DD, CAGR, Win Rate, etc.)
Sortino Ratio (completed commits 258ba3a, 9f25040)
Risk-free rate input (completed commit 258ba3a)
Asset correlation matrix (Spearman & Pearson)
Portfolio comparison charts (Chart.js)
Equity curve visualization
Responsive UI with Tailwind CSS
shadcn/ui color system integration
Date range filtering (completed commit 258ba3a)
Contract multipliers for futures (useContractMultipliers hook)
Advanced multi-column sorting (useSorting hook)
Error handling and validation
File upload progress tracking
Multiple file management
Database Integration (Nov 16, 2025) - PRODUCTION READY ✓
dev-docs/supabase-migration-plan.mdStatus: Production ready - Tested and deployed Commits: c4fa57c, a5ce0ec, 676de06, eba4c8d, ee7cec8, ae9202d Merged to main: d56497a (PR #1)
Implementation Journey (6 commits):
Initial Implementation (c4fa57c)
calculateMetricsFromDatabase() and buildFilenameFromMetadata() to dataUtils.tsfetchFromSupabase() in App.tsxcsv_files table to new strategies + trades schemaFix Query Syntax (a5ce0ec)
order('trades.trade_date') to order('trade_date') with foreignTable parameterFix Trade Count Limit (676de06)
.limit(10000) to get all tradesFix TypeScript Build Errors (eba4c8d)
trades? propertyFix Metrics Calculation (ee7cec8) ⭐ CRITICAL FIX
calculateMetrics() to check for "Entry/Exit" columnUpdate Documentation (ae9202d)
Final Results:
Files Modified:
src/utils/dataUtils.ts: +235 lines (functions, interfaces, auto-detection)src/App.tsx: +145 lines (database fetch, TypeScript types).claude/skills/migration-tracker/SKILL.md: Documentation updatesHow It Works:
calculateMetrics() auto-detects format and processes correctlyBackward Compatibility:
Status: Planning complete, ready for implementation What Changed:
dev-docs/supabase-migration-plan.md)New Database Schema:
portfolios: Portfolio definitions with is_master flagstrategies: Strategy metadata (market, direction, contract_multiplier, etc.)trades: Individual trade records (trade_date, trade_time, profit)portfolio_strategies: Links portfolios to strategiesImplementation Plan:
calculateMetricsFromDatabase() function in dataUtils.ts (~80 lines)fetchFromSupabase() query in App.tsx (~60 lines changed)Current State:
csv_files table (needs update)Next Steps:
Commit: c372ab7a92d267eda3e540b298872484ef09e38d Files: App.tsx (+47), MetricsTable.tsx (+18), PortfolioSection.tsx (+8)
What it does:
Problem: Delete feature was "lost" (local repo behind origin/main)
Solution:
git fetch origin
git merge origin/main # Fast-forward to c372ab7
Key lesson: Always check git log origin/main when work seems missing
Commits: 258ba3a, 9f25040 What Changed:
useState<number>(0))Files Modified:
PortfolioSection.tsx: Added riskFreeRate state, downside deviation calculation, and displayImplementation Details:
useMemoCommit: 258ba3a What Changed:
Files Modified:
usePortfolio.ts: Added date filtering logicPortfolioSection.tsx: Added date picker controlsCommit: 9fb7fdb What Changed:
Files Modified:
UploadSection.tsx: Enhanced error handlingErrorList.tsx: New component for error displayusePortfolio.ts: Better error propagationPortfolioSection.tsx is 591 lines (3x the 200-line limit)
EquityChartSection.tsxPortfolioStats.tsxContractControls.tsxRemove unused Recharts dependency (11.5KB waste)
npm uninstall rechartsFix 15 TypeScript any violations
App.tsx is 351 lines (175% of limit)
MetricsTable.tsx is 242 lines (121% of limit)
No error boundaries implemented
No testing setup
No CI/CD pipeline
Status: Partially fixed (commit 9fb7fdb) Root cause: Row limit exceeded on free tier Current workaround:
Status: Documented but not fixed Problem: Components grew during migration Affected:
Status: Feature doesn't exist Note: Previous skill version documented a "Select All bug" but this feature was either removed or never implemented. MetricsTable has individual selection but no "Select All" functionality.
Status: Recoverable via git forensics Problem: Can't find recently added features or code seems to have disappeared Solution:
git log origin/main --oneline -10git log --all --grep="keyword"git merge origin/maingit reflog
Example: On Dec 2, 2025, the delete feature was recovered by fast-forwarding from f4e752a to c372ab7| Feature | Impact | Confidence | Ease | ICE Score | Status |
|---------|--------|------------|------|-----------|--------|
| Refactor PortfolioSection | 6 | 8 | 4 | 19.2 | ❌ |
| Remove Recharts | 3 | 10 | 10 | 30 | ❌ |
| Fix TypeScript any | 5 | 9 | 6 | 27 | ❌ |
| Export to Excel | 8 | 8 | 7 | 44.8 | 🚧 |
| Advanced filters | 7 | 6 | 5 | 21 | 🚧 |
| Historical comparison UI | 6 | 7 | 4 | 16.8 | 🚧 |
| Error boundaries | 7 | 9 | 8 | 50.4 | ❌ |
| Testing setup | 6 | 8 | 5 | 24 | ❌ |
| Risk scenarios | 5 | 4 | 2 | 4 | ❌ |
Top Priorities by ICE Score:
| Component | Old App | New App | Reason | |-----------|---------|---------|--------| | React | 16.x | 19.x | Latest features, better performance | | Language | JavaScript | TypeScript | Type safety, better DX | | Build Tool | Create React App | Vite | 10x faster builds, modern | | Styling | Material-UI v4 | Tailwind + shadcn | More flexible, lighter | | Charts | Recharts | Chart.js | Better performance, more features | | State | Redux | Plain React hooks | Simpler, less boilerplate | | Backend | Custom Node.js | Supabase | Faster development, PostgreSQL |
Note: Skills previously claimed migration to TanStack Query + Zustand, but actual implementation uses plain React hooks only.
Portfolio Buddy 2 is simple enough to use React's built-in state:
any escapesany violationsComparing to old Portfolio Buddy v1:
| Feature | Old App | New App | Notes | |---------|---------|---------|-------| | CSV Upload | ✅ | ✅ | Improved error handling | | Sharpe Ratio | ✅ | ✅ | Same calculation | | Sortino Ratio | ✅ | ✅ | Fixed calculation (9f25040) | | Max Drawdown | ✅ | ✅ | Same calculation | | CAGR | ✅ | ✅ | Same calculation | | Correlation Matrix | ✅ | ✅ | Added Pearson + Spearman | | Equity Curves | ✅ | ✅ | Better charts with zoom/pan | | Contract Multipliers | ❌ | ✅ | New feature | | Date Filtering | ❌ | ✅ | New feature | | Multi-column Sort | ✅ | ✅ | Improved with useSorting | | Export to CSV | ✅ | ✅ | Same functionality | | Export to Excel | ✅ | ❌ | Regression - needs reimplementation | | Export to PDF | ✅ | ❌ | Regression - low priority | | Symbol Filtering | ✅ | ❌ | Regression - in progress | | Historical Compare | ✅ | ❌ | Regression - backend ready |
Parity Status: 85% (11/13 core features complete)
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.