← ClaudeAtlas

add-reportlisted

Guide for adding new report cards to ClaudeBar that analyze local data sources and display metrics with comparison deltas. Use this skill when: (1) Adding a new report/analytics card (e.g., weekly summary, model breakdown, session stats) (2) Creating data analysis features that read local files and display aggregated metrics (3) Adding comparison cards that show "today vs previous" style deltas (4) Building any feature that follows the DailyUsage pattern (parse → aggregate → report → card)
tddworks/ClaudeBar · ★ 1,219 · Data & Documents · score 83
Install: claude install-skill tddworks/ClaudeBar
# Add Report Card to ClaudeBar Add new report cards that analyze local data sources, compute metrics with comparison deltas, and display them in the existing card UI style using TDD. ## When to Use This skill covers adding **report-style features** — cards that: - Read and parse local data files (JSONL, JSON, CSV, etc.) - Aggregate metrics (cost, tokens, time, counts) - Compare periods (today vs yesterday, this week vs last week) - Display results in glassmorphism cards matching the existing UI ## Architecture Pattern Every report feature follows this data flow: ``` Data Source → Parser → Analyzer → Report Model → UsageSnapshot → Card View ``` Mapped to the codebase layers: | Layer | Location | What to Create | |-------|----------|----------------| | **Domain** | `Sources/Domain/{Feature}/` | Rich models + `@Mockable` protocol | | **Infrastructure** | `Sources/Infrastructure/{Provider}/` | Parser + Analyzer implementation | | **App** | `Sources/App/Views/` | Card view(s) | | **Integration** | Provider class + `statsGrid` | Wire analyzer → snapshot → UI | > **Reference implementation:** See `references/daily-usage-pattern.md` for the complete > DailyUsage feature as a working example of this pattern. ## Workflow ``` Phase 0: Architecture Design (get user approval) ↓ Phase 1: Domain Models + Tests (TDD Red→Green) ↓ Phase 2: Infrastructure Parser + Analyzer + Tests ↓ Phase 3: Card View + Integration ↓ Phase 4: Verify all tests pass ``` --- ## Phase 0