Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Core planning principles for Portfolio Buddy 2 development. Use when: planning any feature implementation, modification, or refactoring. Ensures code preservation, mobile/desktop optimization, and thorough requirement gathering.
.claude/skills/aiskillstore-planning-guidelines/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-12 | ✗→✓ | ▲ Improved | 85% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 89% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 100% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 108% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 214% | 0% |
When planning and implementing features for Portfolio Buddy 2, always follow these fundamental principles:
Rule: Preserve existing code unless explicitly instructed to refactor or rewrite.
When implementing new features or fixes:
You MAY propose improvements to existing code ONLY when ALL conditions are met:
When exception applies, you MUST:
Situation: During implementation of Trading Days update, discovered Annual Growth Rate calculation was mathematically incorrect.
Current (incorrect) code:
typescriptconst tradingPeriodDays = uniqueTradingDates.size || 1; // 150 days const annualGrowthRate = (totalPnl / startingCapital / tradingPeriodDays) * 365 * 100; // Result: Inflated by mixing trading days (denominator) with calendar day annualization (365)
Why exception applied:
Result: User approved fix immediately because exception criteria were clearly met.
Every feature must be optimized for both mobile and desktop experiences.
✅ Use Responsive Tailwind Classes
sm: for small screens (640px+)md: for medium screens (768px+)lg: for large screens (1024px+)✅ Touch Targets
touch-manipulation CSS class for better touch response✅ Test Both Viewports
Portfolio Buddy 2 already has excellent responsive patterns. Reference these:
Example 1: Responsive Text Sizing
tsxclassName="text-xs sm:text-sm" // Smaller on mobile className="text-base sm:text-lg" // Larger on desktop
Example 2: Responsive Spacing
tsxclassName="gap-1 sm:gap-2" // Tighter gaps on mobile className="px-2 sm:px-4 py-2 sm:py-3" // Smaller padding on mobile
Example 3: Responsive Layout
tsxclassName="flex flex-col sm:flex-row" // Stack on mobile, row on desktop
Example 4: Responsive Visibility
tsx<span className="hidden sm:inline">Total Margin</span> // Hide text on mobile, show on desktop
See: src/components/PortfolioSection.tsx for comprehensive examples of responsive patterns throughout the application.
Ask clarifying questions BEFORE executing when:
Use this structure for ALL clarifying questions:
## Clarifying Question: [Topic]
[Brief context about why you need to ask]
**Option A: [Approach Name]** ✅ (Recommended)
- [Detail about approach]
- [Key characteristics]
- **Pros:** [Benefits]
- **Cons:** [Trade-offs]
- **Why experts prefer this:** [Technical reasoning from domain expert perspective]
**Option B: [Alternative Approach]**
- [Detail about approach]
- [Key characteristics]
- **Pros:** [Benefits]
- **Cons:** [Trade-offs]
- **Trade-offs:** [Why this isn't the top choice]
**Option C: [Another Alternative]** (if applicable)
- [Detail about approach]
- [Key characteristics]
- **Pros:** [Benefits]
- **Cons:** [Trade-offs]
- **Trade-offs:** [Why this isn't the top choice]From today's conversation about how to calculate Trading Days:
## Clarifying Question 2: Trading Days Calculation with Date Filters
When the user sets a custom date range (Start Date/End Date), should Trading Days represent:
**Option A: The number of calendar days in the selected date range** ✅ (Recommended)
- Example: Jan 1 to Jan 31 = 31 days
- **Pros:** Simple, matches user's mental model of "days in range"
- **Cons:** Doesn't account for non-trading days
- **Why experts prefer this:** For portfolio analysis, calendar days provide accurate time-based performance metrics and match financial industry standards for annualized returns.
**Option B: The number of actual trading days (days with trades) within the date range**
- Example: Jan 1 to Jan 31 = only count days where trades occurred (e.g., 18 days)
- **Pros:** Reflects actual market activity
- **Cons:** Can be misleading - a strategy might not trade every day by design
- **Trade-offs:** Better for measuring trading frequency, not time-based performanceOutcome: User chose Option B, demonstrating how clear options enable informed decisions.
Use this decision tree:
Is the code broken or incorrect?
├─ YES → Fix it (with explanation)
└─ NO → Is there a massively better option?
├─ YES → Does it meet ALL exception criteria?
│ ├─ YES → Propose improvement (get approval)
│ └─ NO → Preserve existing code
└─ NO → Preserve existing codeBefore proposing any change to existing code, verify:
Avoid unnecessary complexity:
This skill works alongside other Portfolio Buddy 2 skills:
planning-framework - Apply Musk's 5-step algorithm and ICE scoring for feature planningcoding-standards - Follow React 19 and TypeScript standards during implementationarchitecture-reference - Understand component hierarchy and existing patterns before adding codemigration-tracker - Verify feature parity and check for known issues before startingportfolio-context - Get tech stack and architectural constraints contextWorkflow:
planning-guidelines (this skill) → Understand principlesplanning-framework → Plan the feature approacharchitecture-reference → Find where code goescoding-standards → Write the code correctlymigration-tracker → Document what was addedTask: Set Risk-Free Rate default to 4%
Approach: Pure preservation
useState<number>(0)useState<number>(4)Task: Make Trading Days recalculate when date range changes
Approach: Extend existing calculation
tradingPeriodDays variable and displayTask: Add "Set to Total Margin" button for Starting Capital
Approach: Mobile/desktop optimized integration
className="flex items-center gap-1 sm:gap-2" (responsive spacing)<span className="hidden sm:inline">Total Margin</span> (hide text on mobile)className="h-3 w-3 sm:h-3.5 sm:w-3.5" (smaller icon on mobile)touch-manipulation class for better mobile interactionportfolioData exists (conditional rendering)Task: Originally just fixing Trading Days calculation
Discovery: Found Annual Growth Rate calculation was mathematically incorrect
Exception Applied:
Approach:
Result: User approved immediately because criteria were objective and clearly met.
Always:
Only when ALL criteria met:
Never:
This skill ensures Portfolio Buddy 2 remains maintainable, consistent, and user-friendly across all devices while preserving the stability of working code.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-12 | fail→pass | 11,513 | 7,398 | -36% | 1 | 1 | 0% | 2,220 | 4,106 | +85% | 0 | 0 | — |
case-22 | pass→pass | 5,358 | 5,621 | +5% | 1 | 1 | 0% | 925 | 3,665 | +296% | 0 | 0 | — |
case-05 | pass→pass | 4,461 | 2,723 | -39% | 1 | 1 | 0% | 686 | 3,066 | +347% | 0 | 0 | — |
case-01 | fail→pass | 14,965 | 10,313 | -31% | 1 | 1 | 0% | 2,298 | 4,339 | +89% | 0 | 0 | — |
case-02 | fail→pass | 13,234 | 10,002 | -24% | 1 | 1 | 0% | 2,213 | 4,434 | +100% | 0 | 0 | — |
case-03 | fail→pass | 10,892 | 5,691 | -48% | 1 | 1 | 0% | 1,725 | 3,586 | +108% | 0 | 0 | — |
case-04 | pass→pass | 13,390 | 4,631 | -65% | 1 | 1 | 0% | 2,103 | 3,461 | +65% | 0 | 0 | — |
case-06 | pass→pass | 2,273 | 2,979 | +31% | 1 | 1 | 0% | 348 | 3,273 | +841% | 0 | 0 | — |
case-07 | fail→pass | 8,683 | 8,874 | +2% | 1 | 1 | 0% | 1,271 | 3,986 | +214% | 0 | 0 | — |
case-08 | fail→pass | 10,565 | 5,693 | -46% | 1 | 1 | 0% | 1,532 | 3,717 | +143% | 0 | 0 | — |
case-09 | fail→pass | 8,226 | 2,644 | -68% | 1 | 1 | 0% | 1,240 | 3,067 | +147% | 0 | 0 | — |
case-10 | fail→pass | 5,382 | 7,125 | +32% | 1 | 1 | 0% | 870 | 3,617 | +316% | 0 | 0 | — |
case-11 | pass→pass | 15,171 | 8,181 | -46% | 1 | 1 | 0% | 2,349 | 4,012 | +71% | 0 | 0 | — |
case-13 | pass→pass | 8,785 | 4,049 | -54% | 1 | 1 | 0% | 1,600 | 3,420 | +114% | 0 | 0 | — |
case-14 | pass→pass | 11,793 | 8,130 | -31% | 1 | 1 | 0% | 1,795 | 3,907 | +118% | 0 | 0 | — |
case-15 | pass→pass | 11,210 | 7,735 | -31% | 1 | 1 | 0% | 1,798 | 3,871 | +115% | 0 | 0 | — |
case-16 | pass→pass | 8,542 | 2,736 | -68% | 1 | 1 | 0% | 1,050 | 3,163 | +201% | 0 | 0 | — |
case-17 | fail→pass | 13,982 | 9,528 | -32% | 1 | 1 | 0% | 2,501 | 4,428 | +77% | 0 | 0 | — |
case-18 | pass→pass | 6,130 | 4,031 | -34% | 1 | 1 | 0% | 912 | 3,417 | +275% | 0 | 0 | — |
case-19 | pass→pass | 8,079 | 1,908 | -76% | 1 | 1 | 0% | 1,160 | 2,998 | +158% | 0 | 0 | — |
case-20 | pass→pass | 6,952 | 6,023 | -13% | 1 | 1 | 0% | 1,150 | 3,659 | +218% | 0 | 0 | — |
case-21 | pass→pass | 15,359 | 13,600 | -11% | 1 | 1 | 0% | 2,757 | 5,230 | +90% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +41 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.