# Streak Tracker

Generates a streak tracking system with timezone-aware day boundaries, streak freeze...

- Repository: https://github.com/rshankras/claude-code-apple-skills (846 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-07-24
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add rshankras/claude-code-apple-skills --skill streak-tracker -g -a claude-code -y`
Codex: `npx skills add rshankras/claude-code-apple-skills --skill streak-tracker -g -a codex -y`
Cursor: `npx skills add rshankras/claude-code-apple-skills --skill streak-tracker -g -a cursor -y`
Gemini CLI: `npx skills add rshankras/claude-code-apple-skills --skill streak-tracker -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add rshankras/claude-code-apple-skills`

## Description

Generates a streak tracking system with timezone-aware day boundaries, streak freeze protection, and streak-at-risk push notifications. Use when user wants daily/weekly engagement streaks, consecutive day tracking, or habit tracking.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Streak Tracker Generator

Generate a production streak tracking system that records consecutive days of user activity, calculates current and longest streaks, handles timezone-aware day boundaries, supports streak freeze/protection passes, and schedules streak-at-risk local notifications.

## When This Skill Activates

Use this skill when the user:
- Asks to "add streaks" or "daily streak" tracking
- Wants "streak tracking" or "consecutive days" counting
- Mentions "engagement streaks" or "habit tracking"
- Asks about "streak freeze" or "streak protection"
- Wants "streak-at-risk" notifications or reminders
- Mentions "login streak" or "activity streak"

## Pre-Generation Checks

### 1. Project Context Detection
- [ ] Check Swift version (requires Swift 5.9+)
- [ ] Check deployment target (iOS 17+ / macOS 14+ for @Observable and SwiftData)
- [ ] Check for SwiftData availability and existing model container setup
- [ ] Identify source file locations

### 2. Conflict Detection
Search for existing streak or habit tracking:
```
Glob: **/*Streak*.swift, **/*Habit*.swift, **/*DailyTrack*.swift
Grep: "streak" or "consecutiveDays" or "habitTrack" or "dailyStreak"
```

If existing streak/habit system found:
- Ask if user wants to replace or extend it
- If extending, generate only the missing components

### 3. Platform Detection
Determine if generating for iOS (UNUserNotificationCenter) or macOS (UNUserNotificationCenter available on macOS 11+) or both.

## Configuration Questions

Ask user via AskUserQuestion:

1. **Streak type?**
   - Daily (consecutive calendar days) -- recommended
   - Weekly (at least one activity per calendar week)
   - Custom interval (every N hours/days)

2. **Storage backend?**
   - SwiftData (recommended for iOS 17+ / macOS 14+)
   - UserDefaults (lightweight, no model container needed)

The rest: https://github.com/rshankras/claude-code-apple-skills/blob/HEAD/skills/generators/streak-tracker/SKILL.md
