Skip to content
Back to skills

Temporal

ASecurity

Resolve ANY named time window — today, yesterday, thisWeek, lastWeek, last7Days, last30Days, last90Days, thisMonth, lastMonth, thisQuarter, lastQuarter, thisYear, lastYear, last12Months — or an arbitrary range (lastNdays / lastNweeks / lastNmonths) to a concrete ISO date range relative to your run time. Read-only: no writes, no network. Use whenever a task is time-scoped and you need exact start/end dates without computing them by hand.

  • 8,500 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 2, 2026
ai-agentsbashnode

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 2, 2026

npx -y skills add HarnessMD/munder-difflin --skill temporal --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Temporal?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Temporal
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/harnessmd-temporal/badge)](https://www.skillsdirectory.com/skills/harnessmd-temporal)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: temporal
description: |
  Resolve ANY named time window — today, yesterday, thisWeek, lastWeek,
  last7Days, last30Days, last90Days, thisMonth, lastMonth, thisQuarter,
  lastQuarter, thisYear, lastYear, last12Months — or an arbitrary range
  (lastNdays / lastNweeks / lastNmonths) to a concrete ISO date range relative
  to your run time. Read-only: no writes, no network. Use whenever a task is
  time-scoped and you need exact start/end dates without computing them by hand.
allowed-tools:
  - Bash
---

## /temporal — concrete date ranges, relative to now

This is the single source of truth for "what dates does *<window>* mean right
now?". It resolves named windows to **concrete ISO date ranges relative to your
run time** (`new Date()` at the moment you invoke it), so you never re-derive
dates manually. It only reads the clock and prints — no files written, no network.

### Run it

```bash
# all windows at once (a quick temporal-context dump)
node "$AGENT_DIR/.claude/skills/temporal/when.mjs"

# one or several specific windows
node "$AGENT_DIR/.claude/skills/temporal/when.mjs" last30Days thisQuarter

# JSON only (machine-readable), or list the supported keywords
node "$AGENT_DIR/.claude/skills/temporal/when.mjs" --json last7Days
node "$AGENT_DIR/.claude/skills/temporal/when.mjs" --list
```

If `$AGENT_DIR` is somehow unset, the script also lives under
`~/.claude/skills/temporal/when.mjs`.

### Windows

| Keyword | Meaning |
| --- | --- |
| `today` / `yesterday` | the single civil day |
| `thisWeek` / `lastWeek` | ISO week (Mon-start); *this* = Mon→today, *last* = the full prior Mon→Sun |
| `last7Days` / `last30Days` / `last90Days` | rolling N-day window ending today (inclusive) |
| `thisMonth` / `lastMonth` | *this* = 1st→today; *last* = the full prior calendar month |
| `thisQuarter` / `lastQuarter` | *this* = quarter-start→today; *last* = the full prior quarter |
| `thisYear` / `lastYear` | *this* = Jan 1→today (YTD); *last* = the full prior year |
| `last12Months` | rolling 12 months ending today |
| `lastNdays` / `lastNweeks` / `lastNmonths` | arbitrary rolling window, e.g. `last45days`, `last2weeks`, `last6months` |

Aliases: `ytd`, `qtd`, `mtd`, `wtd`, `7d`, `30d`, `90d`, `12m`.

Convention: `this*` windows are **period-start → today** (to-date); `last*`
named periods are the **full prior complete period**.

### Output

Each window prints a human line plus a JSON record:

- `start` / `end` — inclusive civil dates (`YYYY-MM-DD`) in your local timezone
- `startUtc` / `endExclusiveUtc` — the same span as a half-open `[start, end)`
  range of exact UTC instants, ideal for timestamp / `createdAt`-style queries
- `days`, `inclusive`, `timezone`, `tzOffsetMinutes`, `asOf` — span, tz, and the
  instant the range was resolved

Use the returned dates as the time bounds for the task. The named shortcuts
`/today`, `/yesterday`, `/last30Days`, `/lastQuarter`, … each call this same
resolver for their one window.

Files in this skill

  • SKILL.md2.9 KB
  • when.mjs7.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.