ホーム / Skills / 開発効率化 / Caveman Commit コミットメッセージ
開発効率化

Caveman Commit コミットメッセージ

Julius BrusseeApache-2.0Skill の言語: 英語
ライセンス確認済みスクリプトなし
デモ実行記録 · claude-opus-5-5 · 2026年10月
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.

できること

変更内容から Conventional Commits 形式のコミットメッセージを書きます。形式は <type>(<scope>): <命令形の要約> で、できれば 50 文字以内、最大 72 文字です。

仕組み

  1. "write a commit"、"commit message"、/commit、/caveman-commit で起動します。
  2. 本文は理由が自明でないときだけ書きます。破壊的変更、セキュリティ修正、データ移行、取り消しコミットには必ず本文を付けます。
  3. 「このコミットは〜」といった書き出し、絵文字、AI の署名行は入れません(ご自身のルールで署名 trailer が必要な場合を除く)。

向いている場面

git の履歴を短く統一し、後でデバッグする人に役立つものにしたいとき。

知っておきたいこと

メッセージをコードブロックで出力するだけです。ファイルのステージ、コミット、amend は行いません。

補足とリスク

指示だけのファイルです。スクリプトはなく、ネットワーク接続もファイルの書き込みも行いません。 パッケージには元リポジトリの README、LICENSE、NOTICE も含まれます。 git コマンドは一切実行しません。

SKILL.md 原文パッケージ内 4 ファイル