temporal

GitHub

将自然时间窗口(如今天、上周、近30天等)解析为相对于运行时的具体ISO日期范围。提供本地和UTC格式,支持任意滚动窗口,无需手动计算,用于所有涉及时限的任务。

resources/skills/temporal/SKILL.md chaitanyagiri/munder-difflin

Trigger Scenarios

需要确定特定时间范围的起止日期 处理涉及'今天'、'本周'、'上月'等相对时间的查询或过滤 构建基于时间的数据筛选条件

Install

npx skills add chaitanyagiri/munder-difflin --skill temporal -g -y
More Options

Non-standard path

npx skills add https://github.com/chaitanyagiri/munder-difflin/tree/main/resources/skills/temporal -g -y

Use without installing

npx skills use chaitanyagiri/munder-difflin@temporal

指定 Agent (Claude Code)

npx skills add chaitanyagiri/munder-difflin --skill temporal -a claude-code -g -y

安装 repo 全部 skill

npx skills add chaitanyagiri/munder-difflin --all -g -y

预览 repo 内 skill

npx skills add chaitanyagiri/munder-difflin --list

SKILL.md

Frontmatter
{
    "name": "temporal",
    "description": "Resolve ANY named time window — today, yesterday, thisWeek, lastWeek,\nlast7Days, last30Days, last90Days, thisMonth, lastMonth, thisQuarter,\nlastQuarter, thisYear, lastYear, last12Months — or an arbitrary range\n(lastNdays \/ lastNweeks \/ lastNmonths) to a concrete ISO date range relative\nto your run time. Read-only: no writes, no network. Use whenever a task is\ntime-scoped and you need exact start\/end dates without computing them by hand.\n",
    "allowed-tools": [
        "Bash"
    ]
}

/temporal — concrete date ranges, relative to now

This is the single source of truth for "what dates does 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

# 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.

Version History

  • df15a9a Current 2026-07-05 15:41

Same Skill Collection

resources/skills/capabilities/SKILL.md
resources/skills/last30Days/SKILL.md
resources/skills/last7Days/SKILL.md
resources/skills/lastMonth/SKILL.md
resources/skills/lastQuarter/SKILL.md
resources/skills/lastWeek/SKILL.md
resources/skills/lastYear/SKILL.md
resources/skills/md-audit/SKILL.md
resources/skills/md-fetch-summarize/SKILL.md
resources/skills/md-hive-sync/SKILL.md
resources/skills/thisMonth/SKILL.md
resources/skills/thisQuarter/SKILL.md
resources/skills/thisWeek/SKILL.md
resources/skills/thisYear/SKILL.md
resources/skills/today/SKILL.md
resources/skills/yesterday/SKILL.md

Metadata

Files
0
Version
7f5d09d
Hash
3e870f0b
Indexed
2026-07-05 15:41

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-21 03:31
浙ICP备14020137号-1 $mapa de visitantes$