# Dates streaks and statistics

> Dates streaks and statistics is an open-source agent skill for developer tools. Gives an agent calendar-day logic for streaks, countdowns and statistics in Expo apps. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/zakariaf/ReactNative-Skills/tree/main/skills/dates-streaks-and-statistics
- **Repository:** https://github.com/zakariaf/reactnative-skills
- **GitHub stars:** 16
- **License:** MIT
- **Skill name:** dates-streaks-and-statistics
- **Collection:** https://github.com/zakariaf/ReactNative-Skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill guides an agent building date-based features in a React Native or Expo app: deciding what counts as today on the user's local calendar day, computing day differences, keeping streaks, and summarising statistics. It sets out rules such as reading the clock through one injected port, reading today again on each render, and recording each completion under the day it started.

The skill points the agent to reference files for calendar days, streaks and statistics, and to a checklist of definition-of-done items. It includes templates for a today hook, a next-day countdown, a streak model, a statistics model and a completion fold, along with their tests, plus example code for a task app and a date picker. Two Node scripts scan the app's source for common date mistakes and run the streak and statistics modules against the rules, printing PASS or FAIL lines.

The app needs a clock port and a date-key module, which the skill expects from related skills, and the guidance assumes TypeScript, Jest and an i18n layer for labels.

## When your agent uses it

> Builds calendar-day logic: local date keys, an injected clock, midnight, DST, streaks, stats. Use when code reads today, counts days, shows a streak or stats, or a date is a day off. Not for seeds (seeded-determinism-and-golden-vectors).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs JavaScript and TypeScript scripts](https://github.com/zakariaf/ReactNative-Skills/tree/HEAD/skills/dates-streaks-and-statistics)
- [No network calls found in its scripts](https://github.com/zakariaf/ReactNative-Skills/tree/HEAD/skills/dates-streaks-and-statistics)
- [License: MIT](https://github.com/zakariaf/ReactNative-Skills/tree/HEAD/skills/dates-streaks-and-statistics)

## Features

- **Local day keys:** Represents each day as a local calendar date key and does day arithmetic on those keys.
- **Injected clock:** Routes all reads of the current time through a single clock port so tests can fake it.
- **Midnight-aware today:** Provides a hook that refreshes the current day at local midnight and when the app returns to the foreground.
- **Streak model:** Supplies a pure streak rule covering first-of-day events, gaps, clock changes and best streaks.
- **Statistics folding:** Adds totals, successes, failures, per-day buckets and custom counters through fixed fold rules.
- **Verification scripts:** Runs checks that scan for date mistakes and test the streak and statistics modules.

## Good for

- Count days until a task is due without off-by-one errors around DST
- Show a streak that survives midnight and a clock set back
- Add a countdown to the next local midnight in an Expo app
- Track completions and statistics in one transaction per event
- Fix a date picker that opens on the previous day

## Install

### Claude Code

This skill ships in the `react-native` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add zakariaf/ReactNative-Skills
/plugin install react-native@react-native-skills
```

Or copy only this skill to `~/.claude/skills/dates-streaks-and-statistics`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/dates-streaks-and-statistics &&
cp -R "$tmp/skills/dates-streaks-and-statistics" ~/.claude/skills/dates-streaks-and-statistics &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/dates-streaks-and-statistics` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/dates-streaks-and-statistics` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/dates-streaks-and-statistics &&
cp -R "$tmp/skills/dates-streaks-and-statistics" ~/.agents/skills/dates-streaks-and-statistics &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/dates-streaks-and-statistics` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/dates-streaks-and-statistics` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/dates-streaks-and-statistics &&
cp -R "$tmp/skills/dates-streaks-and-statistics" ~/.cursor/skills/dates-streaks-and-statistics &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/dates-streaks-and-statistics` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/zakariaf/ReactNative-Skills.git --path skills/dates-streaks-and-statistics
```

Or copy the folder to `~/.gemini/skills/dates-streaks-and-statistics` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/dates-streaks-and-statistics`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/dates-streaks-and-statistics &&
cp -R "$tmp/skills/dates-streaks-and-statistics" ~/.copilot/skills/dates-streaks-and-statistics &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/dates-streaks-and-statistics` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git
```

Then copy `ReactNative-Skills/skills/dates-streaks-and-statistics` into your agent's skills folder as `dates-streaks-and-statistics`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which AI clients does Dates streaks and statistics work with?

It is a plain SKILL.md folder, so it follows the shared agent skills format and is not tied to specific clients.

### What does the skill need from the rest of the app?

It expects a clock port and a date-key module, which come from related skills, plus render helpers for tests. Templates are copied only when the app lacks them.

### Does Dates streaks and statistics run anything on my code?

It provides two Node scripts that scan the app's source and run its streak and statistics modules, printing PASS or FAIL lines with the file and fix for each failure.

### What languages does Dates streaks and statistics cover?

The bundled scripts are in JavaScript and TypeScript, and the templates and examples are TypeScript.

### How do I install Dates streaks and statistics in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/dates-streaks-and-statistics to use it in all your projects, or to .claude/skills/dates-streaks-and-statistics in one project. Or install the react-native plugin, which includes it: /plugin marketplace add zakariaf/ReactNative-Skills, then /plugin install react-native@react-native-skills.

### Does Dates streaks and statistics run scripts?

Yes. It runs JavaScript and TypeScript scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Dates streaks and statistics?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Dates streaks and statistics?

The closest alternatives to Dates streaks and statistics are Debug menu and test hooks, Expo native UI, Expo native UI, Background tasks and Expo design system.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Debug menu and test hooks](https://ai-powered.com/skills/debug-menu-and-test-hooks): Debug menu and test hooks is an open-source agent skill for developer tools.
- [Expo native UI](https://ai-powered.com/skills/expo-native-ui): Expo native UI is an open-source agent skill for developer tools.
- [Expo native UI](https://ai-powered.com/skills/expo-native-ui-scaledockhq): Expo native UI is an open-source agent skill for developer tools.
- [Background tasks](https://ai-powered.com/skills/background-tasks): Background tasks is an open-source agent skill for developer tools.
- [Expo design system](https://ai-powered.com/skills/expo-design-system-scaledockhq): Expo design system is an open-source agent skill for developer tools.
- [Expo router](https://ai-powered.com/skills/expo-router-scaledockhq): Expo router is an open-source agent skill for developer tools.
- [Expo prebuild and config plugins](https://ai-powered.com/skills/expo-prebuild-and-config-plugins): Expo prebuild and config plugins is an open-source agent skill for developer tools.
- [Expo data fetching](https://ai-powered.com/skills/expo-data-fetching-scaledockhq): Expo data fetching is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/dates-streaks-and-statistics
