Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pvc-timestamp-hook

pvc-timestamp-hook

version type license

Makes a Claude Code project time-aware. Stamps every prompt with the date, weekday, and time.

pvc-timestamp-hook is a Claude Code skill that installs one small hook into a project. After that, every message you send arrives with a line like [Current time: 2026-09-04 (Friday) 12:03], so Claude knows the real date and how much time passed since your last message. Made by Pro Vibe Coding for anyone who keeps Claude Code sessions open across days and gets answers that still assume the day the session started.

Table of contents

Why this exists

Claude Code does not know what time it is. It sees a date when the session starts and reasons from there. Leave a session open overnight, come back, and Claude still thinks it is yesterday. Deadlines, "how long ago", and dated file names all drift.

A UserPromptSubmit hook fixes that. Claude Code runs the hook command before each prompt and adds its output to the context. This skill installs one hook that prints the current time. It adds no memory hooks and no background service, only one line of context per prompt.

What it does

  • Installs a UserPromptSubmit hook into the target project's .claude/settings.local.json.
  • Merges into an existing settings file without touching other keys or hooks.
  • Skips the install when the hook is already there, so a second run changes nothing.
  • Covers the settings file in .gitignore when the target is a git repository.
  • Tests the command before installing, and falls back to a Python command when date is missing.

The hook

The block the skill installs when date is available:

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "date \"+[Current time: %Y-%m-%d (%A) %H:%M]\"",
            "shell": "bash"
          }
        ]
      }
    ]
  }
}

"shell": "bash" is written out so the hook never runs in PowerShell, where date is an alias of Get-Date and rejects this format. The format prints the weekday because "how many days passed" is the point. Every prompt then arrives with:

[Current time: 2026-09-04 (Friday) 12:03]

When date is missing, the skill installs this command instead and drops the "shell" key:

"command": "python -c \"from datetime import datetime; print(datetime.now().strftime('[Current time: %Y-%m-%d (%A) %H:%M]'))\""

Install

This is a Claude Code skill. Pick the path that matches where you want it available. The skill can install the hook into the project it lives in or into any other folder you name.

Project-local (one repo)

Drop the folder into the repo's .claude/skills/:

your-project/
└── .claude/
    ├── settings.local.json      (the hook goes here, written by the skill)
    └── skills/
        └── pvc-timestamp-hook/
            ├── SKILL.md
            ├── README.md
            ├── assets/          (README artwork)
            ├── REQUIREMENTS.md
            ├── LICENSE
            ├── NOTICE
            └── TRADEMARK.md

From the GitHub release zip: it unpacks to a folder named pvc-timestamp-hook-<version> (for example pvc-timestamp-hook-1.0.1). Rename that folder to pvc-timestamp-hook before you place it. A project or personal skill takes its command name from the directory name, so an unrenamed folder shows up as /pvc-timestamp-hook-1.0.1. A git clone gives you the right folder name already.

Personal (all your projects)

Copy the pvc-timestamp-hook/ folder to ~/.claude/skills/ for user-global access across every project.

Polyrepo / monorepo

Place it once at .claude/skills/pvc-timestamp-hook/ in the directory you open Claude Code from. The skill is available whenever you launch Claude Code from that root.

As part of a plugin

If you bundle skills as a Claude Code plugin, include pvc-timestamp-hook/ in the plugin's skills/ directory. Claude Code auto-discovers skills in that folder when the plugin loads.

Verify

Start a new Claude Code session, then ask: "What skills are available?" Confirm pvc-timestamp-hook appears. See REQUIREMENTS.md for what Windows needs (Git Bash).

Usage

Trigger it with plain language. Any of these work:

  • "add the time hook to this project"
  • "make this project time-aware"
  • "install timestamps in this project"
  • "put the timestamp thing in "
  • "Claude never knows the date in my other project, fix that one too"

Example

You: add the time hook to this project

Agent response:

Time hook installed in ~/code/my-website.
- Created .claude/settings.local.json (JSON validated)
- Added .claude/settings.local.json to .gitignore
Send any message; it should arrive stamped [Current time: ...]. No stamp: start a new Claude Code session.

Your next message then carries the stamp:

[Current time: 2026-09-04 (Friday) 12:03]

Run it again on the same project and it reports that the hook is already there and changes nothing.

What a good install looks like

A good install leaves all five of these true:

  • Valid JSON. The settings file parses after the change.
  • Nothing else touched. Existing keys and hook entries stay as they were.
  • No duplicates. A second run on the same project adds nothing.
  • Kept out of git. In a git repository, .gitignore covers .claude/settings.local.json.
  • A visible stamp. The next message arrives with the [Current time: ...] line.

How it compares

Three ways to get the time into a session:

pvc-timestamp-hook Asking Claude to run date Terminal message timestamps
Claude knows the time on every prompt Yes Only when asked No, display only
Setup Once per project None Once, in the terminal settings
Cost per prompt One short line of context A tool call each time None
Best for Sessions that span days A one-off check Reading your own history

Known limitations

  • One project at a time. Run it once for each project that needs the stamp.
  • Hook edits are usually picked up live. If no stamp appears after the install, start a new Claude Code session (in VS Code, reload the window; in a terminal, quit and relaunch claude).
  • The hook goes into .claude/settings.local.json, the per-machine file that is meant to stay out of git, which is why the skill adds a .gitignore line when one is missing. A shared team setting belongs in .claude/settings.json, which this skill does not write.
  • Some permission modes block edits to hook configuration. The skill then prints the block for you to paste by hand.
  • On Windows, date comes from Git Bash. Without it, the skill installs a Python command instead.

Changelog

  • v1.0.2 (2026-09-22). README shows the cream banner assets/pvc-timestamp-hook-banner.jpg full width under the title, the card art on a sheet in its own paper color with the PVC five-bar mark bottom right; the social preview matches it with the mark bottom left. Docs only, no change to what the skill does.
  • v1.0.1 (2026-09-04). Public release under Apache 2.0. Adds the Apache License 2.0, a NOTICE file, an SPDX header in SKILL.md, a public TRADEMARK.md, REQUIREMENTS.md, and the README artwork under assets/. Wording reworked for a general audience, and the description now names the date dependency.
  • v1.0.0 (2026-07-25). Initial release. Installs the UserPromptSubmit time stamp hook, merges into existing settings, covers the file in .gitignore, and falls back to a Python command when date is missing.

License

This project is licensed under the Apache License 2.0. See LICENSE and NOTICE for details.

"Pro Vibe Coding" and "PVC" are trademarks. The license does not grant rights to use them. See TRADEMARK.md.

Claude and Claude Code are trademarks of Anthropic. This project is independent. It is not affiliated with, endorsed by, or sponsored by Anthropic.

About

Claude Code skill that makes a project time-aware. Installs one UserPromptSubmit hook that stamps every prompt with the date, weekday, and time, so Claude knows how much time passed between messages. Apache 2.0.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors