AI for miscellaneous (non-coding) tasks

Using Claude to update my timesheet

I still bill some of my customers hourly and track time using a hledger timedot file and create invoices with a custom program I wrote. So I wrote a Claude command to update the timesheet. Now as I’m working, I can periodically run /timelog in the directory I’m working in, and the timesheet will be automatically updated with the work I did since the last run. Even if not doing hourly billing, it is still useful to keep a log of what you did and where your time went.

I started the move to text files several years ago, and so it is now very convenient to move workflows to AI agents.

[cbrake@ceres ~]$ more .claude/commands/timelog.md
Update the timelog at /scratch/BEC/timelog/cbrake.timedot based on recent git
activity in the current repo.

## Steps

1. Read the last 40 lines of /scratch/BEC/timelog/cbrake.timedot to understand
   the format and see recent entries.

2. Run `git log --oneline --since="$ARGUMENTS"` to get commits for the specified
   date (default to today's date if no argument given). Use the format
   `YYYY-MM-DD`.

3. Identify which `time:` account this repo maps to by looking at recent timelog
   entries and the repo name/path. Common mappings:
   - /scratch/custA/go → time:cust:custA:dev

4. Summarize the commits into concise, human-readable bullet points that match
   the existing timelog style:
   - Group related commits into single bullets (e.g., multiple ntfy fixes become
     one bullet)
   - Start each bullet with a verb (add, fix, debug, refactor, test, etc.)
   - Keep bullets short — one line each
   - Don't include version bumps, merge commits, or changelog updates as
     separate items

5. Show the user the proposed timelog entry (date header if needed, account line
   with hours as `0`, and bullet points) and ask them to confirm or adjust
   before writing.

6. After confirmation, append the entry to /scratch/BEC/timelog/cbrake.timedot.
   If the date header already exists in the file, add the account and bullets
   under it rather than creating a duplicate date header.

7. Don't duplicate entries - this may be run multiple times during the day.