group-by-time

group-by-time is a command for Claude Code from danielrosehill/Claude-Image-Production-Plugin. It costs 0 tokens per session (560 once invoked), scanned A, original, MIT.

An image-organising command that reads capture dates stored in photo metadata, such as EXIF, and groups files into year, month, or day folders.

In plain words
What is it for?
Use it to preview and create time-based photo folders, produce a CSV record of the grouping, and identify missing or suspicious dates.
Why use it?
It reduces the work of sorting a photo collection by when pictures were taken. It also shows when it had to use a less reliable file-change date instead.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the image-production plugin — 29 skills, 19 commands shipped together

Good fit Use it to preview and create time-based photo folders, produce a CSV record of the grouping, and identify missing or suspicious dates.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/danielrosehill/claude-image-production-plugin/group-by-time
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/danielrosehill/Claude-Image-Production-Plugin

Made for: Claude Code.

Or install image-production, the plugin that ships this one along with the rest of its 29 skills, 19 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for group-by-time

README.md
[![agentmods](https://agentmods.dev/badge/commands/danielrosehill/claude-image-production-plugin/group-by-time/github.svg)](https://agentmods.dev/commands/danielrosehill/claude-image-production-plugin/group-by-time)
Your own site
<a href="https://agentmods.dev/commands/danielrosehill/claude-image-production-plugin/group-by-time"><img src="https://agentmods.dev/badge/commands/danielrosehill/claude-image-production-plugin/group-by-time/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for group-by-time

Your own site · 80×15
<a href="https://agentmods.dev/commands/danielrosehill/claude-image-production-plugin/group-by-time"><img src="https://agentmods.dev/badge/commands/danielrosehill/claude-image-production-plugin/group-by-time.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 560 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00560
Opus 5 $0.00000 $0.00280
Sonnet 5 $0.00000 $0.00112
Haiku 4.5 $0.00000 $0.00056

Measured 9d ago against content hash d492a437b4a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

group-by-time scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/group-by-time.md · 44 lines

How it starts

The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Group Images by Capture Time

Cluster images by EXIF DateTimeOriginal into year / month (and optionally day) folders.

Task

  1. Ask which folder to operate on — default is the current working directory. Confirm recursion; default flat.

  2. Confirm granularity with the user:

    • YYYY/ only
    • YYYY/MM/ (default)
    • YYYY/MM/DD/
    • Custom (e.g. session-based, gap > N hours starts a new group)
  3. Read capture timestamps for each image. Prefer, in order:

    1. exiftool DateTimeOriginal
    2. exiftool CreateDate / MediaCreateDate
    3. exiftool FileModifyDate (fallback — warn the user when falling back, since mtime reflects copy time)
    exiftool -s -s -s -DateTimeOriginal -CreateDate -FileModifyDate "image.jpg"
    
  4. Build a timeline — sorted (filename, timestamp) list. Show the user min/max timestamps and any suspicious gaps / duplicates.

  5. Propose grouping — print bucket labels (2026/04/, 2026/04/18/) with image counts. Flag any file that fell back to mtime. Let the user rename buckets (e.g. 2026-04-18_wedding/).

  6. Preview before acting, then choose method:

    • Option A: metadata/time-groups.csv with filename,timestamp,group (no moves)
    • Option B: symlinked folders (time-groups/2026/04/photo.jpg → ../../../photo.jpg)
    • Option C: physical move on explicit confirmation
  7. Log to notes/group-by-time-{timestamp}.md:

    • Granularity used
    • Bucket labels and counts
    • Files that fell back to mtime (flagged for review)
    • Files with no usable timestamp at all (bucketed to unknown-date/)

Notes

  • Timezone matters. If EXIF lacks a TZ offset, ask the user which TZ to assume (and record it in the log). Default to the system TZ (Israel IST/IDT here).
  • For mixed-source imports (phone + camera + screenshots), timestamps from different devices may drift — flag clips that cluster oddly.
  • Never mutate originals. Prefer the CSV manifest for archives with many files.
  • Files with no EXIF and no reliable mtime go to unknown-date/ — don't invent a timestamp.

Read the full file on GitHub · 44 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 44 lines · 0 tokens per session scan A d492a437b4a5

Subscribe to this mod's changes

group-by-time is a command published in the GitHub repository danielrosehill/Claude-Image-Production-Plugin (16 stars, last pushed 22d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 560 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.