aiskillstore/marketplace/coding-standards
Claude Code and agent skill by aiskillstore/marketplace
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Author "aiskillstore" has blocked skill(s)
React 19 and TypeScript coding standards for Portfolio Buddy 2. Use when: writing new components, reviewing code, refactoring, or ensuring consistency. Contains component patterns, TypeScript rules, and best practices.
Install
npx vskill@latest install aiskillstore/marketplace/coding-standardsSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as aiskillstore/marketplace/coding-standards.
Coding Standards - Portfolio Buddy 2
React 19 Patterns
Component Structure
Hooks Rules
- Only at top level - No hooks in conditionals or loops
- Custom hooks start with `use` - useMetrics, usePortfolio, useSorting
- Dependencies array complete - All deps in useEffect/useMemo/useCallback
- Cleanup on unmount - Return cleanup function from useEffect
State Management
Portfolio Buddy 2 uses PLAIN REACT HOOKS ONLY:
- Local UI state →
useState - Derived state →
useMemo - Stable callbacks →
useCallback - DOM/value refs →
useRef
NO global state libraries:
- ❌ No TanStack Query
- ❌ No Zustand
- ❌ No Redux
- ❌ No Jotai
Pattern: Props down, custom hooks for shared logic
TypeScript Standards
No any Types
Current Violations (Tech Debt):
- usePortfolio.ts: 11 instances (trade/metrics types)
- useMetrics.ts: 4 instances (sort comparisons)
- dataUtils.ts: 1 instance (Metrics interface)
- Total: 15 violations to fix (originally 16)
Strict Null Checks
Type Inference When Obvious
Component Size Limits
Max 200 Lines Per Component
When component exceeds 200 lines:
- Extract sub-components
- Move logic to custom hooks
- Extract utilities to utils/
Current Violations
⚠️ MUST REFACTOR:
- PortfolioSection.tsx: 591 lines (295% of limit)
- Extract EquityChartSection
- Extract PortfolioStats
- Extract ContractControls
- Keep only orchestration logic
Should refactor:
- App.tsx: 351 lines (175% of limit)
- Extract sections into components
- MetricsTable.tsx: 242 lines (121% of limit)
- Improved from 350 lines, still over limit
Refactoring Example
File Organization
Actual Directory Structure
Note: No ui/ or charts/ subdirectories - components are flat in components/
Naming Conventions
- Components: PascalCase -
MetricsTable.tsx,CorrelationHeatmap.tsx - Hooks: camelCase with
useprefix -useMetrics.ts,useSorting.ts - Utils: camelCase -
calculateMetrics(),parseCSV() - Types/Interfaces: PascalCase -
interface Metric,type Trade
Error Handling
Always Handle Errors
Use Try-Catch for Parsing
Error Boundaries
Current Status: No error boundaries implemented (tech debt)
Should add:
Performance
Memoization
Callback Stability
Avoid Premature Optimization
- Build feature first
- Measure performance if issues arise
- Optimize based on profiling data
- Don't optimize without evidence
Chart.js Integration
Pattern for Chart Components
Chart Libraries
- ✅ Use: Chart.js + react-chartjs-2
- ❌ Don't use: Recharts (installed but unused, should remove)
Testing Standards
What to Test
- ✅ Critical calculations (Sharpe, Sortino, correlation)
- ✅ Data transformations (CSV parsing, metric calculations)
- ✅ Error states and edge cases
- ✅ Hook return values
- ❌ UI implementation details (className, DOM structure)
- ❌ Third-party library internals
Test Structure
Current Status: No tests implemented (future work)
Import Organization
Order of Imports
Code Comments
When to Comment
JSDoc for Complex Functions
Git Commit Messages
Format
Types
feat:New featurefix:Bug fixrefactor:Code restructuringperf:Performance improvementdocs:Documentationtest:Test additions/changes
Examples from Recent Commits
Code Review Checklist
Before submitting code:
- [ ] TypeScript strict mode passes (no
anyunless documented as tech debt) - [ ] Component under 200 lines (or has refactor plan)
- [ ] Error handling in place
- [ ] Memoization for expensive calculations
- [ ] Stable callbacks with useCallback
- [ ] Proper TypeScript types (no
any) - [ ] Imports organized by category
- [ ] JSDoc on complex functions
- [ ] Console.logs removed
- [ ] Chart.js used (not Recharts)
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/5minfutures/coding-standards/SKILL.md
Popularity
- Repository stars
- 429
- Repository forks
- 45
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aiskillstore/marketplace/coding-standards)