Featured2026-05-17

How I Automated My Entire Dev Workflow by Analyzing 45 Days of Claude Code Conversations

I analyzed 35+ conversation logs from Claude Code sessions to find real patterns in my daily work — then built custom slash commands and agents to automate the repetitive stuff. Here's exactly how I did it and what I built.

claude-codedeveloper-productivityautomationclidevtoolsai-tools

Most developers know they repeat themselves. Few know exactly how much.

I decided to find out. I pointed Claude Code at my own conversation history — 45 days of sessions, 35+ logs, spanning multiple repositories — and asked it to tell me what I actually do every day. The results were embarrassing, enlightening, and ultimately led me to build a suite of automations that now save me hours every week.

The Problem: Death by a Thousand Git Commands

I work across multiple repositories daily. A single feature typically touches a frontend repo, a backend API repo, and a worker service. That means every commit cycle looks like this:

cd repo-1 && git status && git add ... && git commit -m "..." && git push
cd repo-2 && git status && git add ... && git commit -m "..." && git push
cd repo-3 && git status && git add ... && git commit -m "..." && git push

Multiply that by 5-6 commits per session, and I was running 30-50 git commands just for basic version control. Every. Single. Day.

But I didn't realize this until I read my own logs.

Step 1: Finding Where the Logs Live

Claude Code stores conversation logs as .jsonl files inside:

~/.claude/projects/<project-directory-hash>/

Each file is a full session transcript — every message, every tool call, every bash command. Mine ranged from 20KB (quick fixes) to 47MB (marathon sessions). The structure looks like:

~/.claude/projects/
  my-project-name/
    abc12345-xxxx-xxxx.jsonl    # Session 1
    def67890-xxxx-xxxx.jsonl    # Session 2
    ...
    memory/                      # Auto-memory files

Step 2: Analyzing the Conversations

I dispatched 5 parallel agents, each analyzing a batch of sessions. The prompt was simple:

"Read these JSONL files. For each session, extract: what the user asked for, what bash commands were run repeatedly, what problems came up, and what manual steps were repeated."

What I Found

Pattern 1: Multi-repo git ceremony — 30-50 commands per session

Every session had the same git status → git add → git commit → git push loop repeated across 3 repos. That's ~15 minutes of typing the same thing.

Pattern 2: Branch contamination cleanup — 20% of all sessions

One in five sessions was spent doing "git archaeology" — figuring out why a PR showed 21 changed files when I only touched 4. The fix was always the same: backup branch, reset to base, cherry-pick only my commits, force-push. Every single time.

Pattern 3: Build verification after every edit — 50+ checks per session

After every code change:

python -m py_compile changed_file.py     # Did I break syntax?
python -c "from module import Class"     # Do imports still work?
npx tsc --noEmit                          # TypeScript happy?

I was running these 50+ times in a single session. Not because I'm paranoid — because I'd been burned by broken imports too many times.

Pattern 4: Context loss between sessions

Every new session started with: "What branch am I on? What was I working on? Do I have uncommitted changes?" — 5 minutes of git status and git log across repos just to remember where I left off.

Pattern 5: Worktree setup is 5 steps x N repos

Starting a new ticket meant:

  1. Create git worktree
  2. Copy .env files
  3. Create Python virtual environment
  4. Install dependencies
  5. Repeat for each repo

That's 15 manual steps for a 3-repo ticket.

Pattern 6: Infrastructure debugging from scratch

"Is Docker running? Is PostgreSQL up? Is Redis reachable? Is that port blocked by WinNAT again?" — I diagnosed this from scratch every few days.

Step 3: Building the Automations

Based on real evidence from the logs (not hypothetical "best practices"), I built these:

Slash Commands

Claude Code supports custom slash commands as markdown files in ~/.claude/commands/. Type /command-name in any session to run them.

/commit-all — The biggest time-saver. Scans all repos for dirty files, stages them, commits with the correct author identity, and pushes. One command replaces 30+ manual git commands.

/verify — Runs py_compile on all changed Python files, tsc --noEmit on TypeScript repos, and validates imports. One command replaces 50+ individual checks.

/clean-branch BRANCH — Diagnoses branch contamination. Shows which commits are mine vs. leaked from other developers. Optionally rebuilds the branch with only my commits. Turned a 45-minute git archaeology session into a 2-minute command.

/resume — Dashboard showing current branch, dirty files, open PRs, and worktrees across all repos. No more "where was I?" at the start of every session.

/new-ticket TICKET-ID — Creates worktrees, copies .env files, installs dependencies across all repos. 15 manual steps → one command.

/infra-check — Checks Docker, database, cache, and orchestration service ports. Detects WinNAT port conflicts (a Windows-specific headache). Suggests fixes.

/rebase-all — Fetches and rebases all active feature branches against their base branches. Auto-aborts on conflicts so nothing is left in a broken state.

/review-pr #123 repo — Fetches PR review comments from GitHub, shows them with code context, and helps apply fixes. No more manually reading review threads.

/alembic-safe — Checks for multiple migration heads before creating new migrations. Prevents the "multiple heads" error that used to cost me 20 minutes to untangle.

Agent

ticket-worker — A specialized agent that sets up an entire ticket workspace: creates worktrees across frontend, backend, and worker repos, branches from the correct base, copies environment files, and installs all dependencies. I just say what ticket I'm starting, and it does the rest.

The Numbers

BeforeAfter
30-50 git commands per commit cycle1 command (/commit-all)
50+ syntax/import checks per session1 command (/verify)
45 min branch cleanup sessions2 min (/clean-branch)
5 min "where was I?" every morning10 sec (/resume)
15 manual steps per new ticket1 command (/new-ticket)
20% of sessions lost to git archaeologyNear zero

How You Can Do This Too

The meta-insight: your conversation logs are a goldmine of workflow data. They capture what you actually do, not what you think you do.

Here's the prompt I used. Paste it into a Claude Code session pointed at any project directory:

Analyze my Claude Code conversation history to find automation opportunities.

1. Find all my session logs at: ~/.claude/projects/
   - List all project directories and their .jsonl files
   - Sort by date, read the 10 most recent/largest sessions (first 500 lines each)

2. For each session, extract:
   - What I asked for (the actual user messages)
   - What bash commands were run repeatedly (>3 times)
   - What problems came up and how they were solved
   - What manual multi-step sequences I did
   - Where Claude was interrupted or corrected (signs of friction)

3. Identify patterns across sessions:
   - Commands I type in every session
   - Multi-step workflows I repeat weekly
   - Problems that keep recurring

4. Based on REAL patterns found (not generic suggestions), propose:
   - Slash commands (for ~/.claude/commands/) that automate repeated workflows
   - Agents (for ~/.claude/agents/) for complex multi-step tasks
   - Each proposal must cite which sessions it came from

5. LIST all proposals BEFORE building anything. Wait for my approval.

IMPORTANT: Only propose automations backed by evidence from actual logs.
Do NOT suggest generic "best practice" commands.

It's token-heavy (~50-100k tokens), so run it when you have tokens to spare — end of your weekly cycle works well.

Key Takeaway

The best automation isn't the one that sounds impressive. It's the one that eliminates the thing you do 50 times a day without thinking about it. The only way to find those things is to look at what you actually do — and your conversation logs already have that data.

Stop guessing what to automate. Read your own history. The patterns will be obvious.


Built with Claude Code. The commands and agents described here are open-source markdown files — no special tooling required. Drop them in ~/.claude/commands/ and they work immediately.

Related Reading

Subscribe to my newsletter

No spam, promise. I only send curated blogs that match your interests — the stuff you'd actually want to read.

Interests (optional)

Unsubscribe anytime. Your email is safe with me.