Home / Skills / Developer Productivity / Caveman Commit
Developer Productivity

Caveman Commit

Julius BrusseeApache-2.0Skill language: English
License verifiedNo scripts
DemoReal run · claude-opus-5-5 · October 2026
Write a commit message for this staged diff: ```diff --- a/src/auth/session.py +++ b/src/auth/session.py @@ -8,9 +8,15 @@ SESSION_TTL = timedelta(hours=12) def is_session_valid(session) -> bool: - return session.created_at + SESSION_TTL > datetime.now() + # created_at is stored in UTC; naive local now() made sessions expire + # early or late depending on the server's timezone. + return session.created_at + SESSION_TTL > datetime.now(timezone.utc) --- a/tests/test_session.py +++ b/tests/test_session.py @@ -20,3 +20,12 @@ def test_session_expires_after_ttl(): assert not is_session_valid(old) + + +def test_session_valid_on_non_utc_server(monkeypatch): + monkeypatch.setenv("TZ", "Asia/Shanghai") + time.tzset() + fresh = make_session(created_at=datetime.now(timezone.utc)) + assert is_session_valid(fresh) ``` Users on our Singapore and Shanghai servers were being logged out about 8 hours early. This fixes issue #214.
Skill: caveman-commit
fix(auth): compare session expiry against UTC now

created_at is stored in UTC, but expiry was checked against naive
local datetime.now(). On UTC+8 servers (Singapore, Shanghai) users
were logged out ~8 hours early.

Closes #214

The diff doesn't show any import changes, so check two things before you commit:

  • session.py needs timezone imported from datetime.
  • The test file needs time and timezone imported.

created_at also has to be timezone-aware. If it's ever stored as a naive datetime, comparing it with datetime.now(timezone.utc) will raise a TypeError.

Real run recorded with claude-code / claude-opus-5-5. Output is shown verbatim, unmodified.

What it does

Writes a commit message for your change in Conventional Commits format: <type>(<scope>): <imperative summary>, ideally 50 characters or fewer, never more than 72.

How it works

  1. Triggers on "write a commit", "commit message", /commit or /caveman-commit.
  2. Adds a body only when the reason is not obvious, and always for breaking changes, security fixes, data migrations and reverts.
  3. Leaves out "this commit does…", emoji and AI attribution lines, unless your own rules require an attribution trailer.

Good for

Keeping git history short, consistent and useful to the next person debugging.

Worth knowing

It outputs the message as a code block and stops. It does not stage files, commit or amend.

Notes & risks

Pure instruction file: no scripts, no network access and no file writes. The package also contains the README, LICENSE and NOTICE from the original repository. It never runs git commands.

SKILL.md original4 files in this package