# Since a specific date
python3 search_history.py --since 2026-01-01 "feature"
```

### Extracting Useful Information

The script extracts practical information from each conversation:

```python
def extract_bash_commands(conversation: Conversation) -> list:
    """Extract Bash commands run during the conversation."""
    commands = []
    for msg in conversation.messages:
        for tool in msg.tool_uses:
            if tool.get('name') == 'Bash':
                cmd = tool.get('input', {}).get('command', '')
                if cmd:
                    commands.append(cmd)
    return commands

def extract_files_touched(conversation: Conversation) -> list:
    """Extract files that were read, written, or edited."""
    files = set()
    for msg in conversation.messages:
        for tool in msg.tool_uses:
            name = tool.get('name', '')
            inp = tool.get('input', {})

            if name in ('Read', 'Write', 'Edit'):
                path = inp.get('file_path', '')
                if path:
                    files.add(Path(path).name)
    return sorted(files)[:10]
```

This is useful for recreating solutions. If you found how you fixed something before, you can see exactly which commands you ran and which files you changed.

## Using the Skill

### Daily Digest

Ask "what did we do yesterday?" and Claude runs the digest mode:

```bash
python3 search_history.py --digest yesterday
```

Output:

```
## January 16, 2026 - 32 sessions

### 1. Set Context Menu Feature Spec
   Session: `1498ff91`
   Branch: `fitnessFunctions`
   Files: set-context-menu.md, SetContextMenu.vue, SetContextMenuPO.ts
   Commands: 12 executed

### 2. Fix Pipeline: Missing i18n, Unused Exports
   Session: `23351e77`
   Branch: `fitnessFunctions`
   Files: de.json, en.json, claude-qa.yml
   Commands: 6 executed

### 3. Adding AI Coding Articles to Second Brain
   Session: `5c909423`
   Branch: `main`
   Files: article.md, dex-horthy.md, diagrams-guide.md
   Commands: 1 executed
```

This is great for standup notes or just remembering what you worked on.

### Keyword Search

Ask "how did we fix the EMFILE error?" and Claude searches for relevant sessions:

```bash
python3 search_history.py "EMFILE error" --days 14
```

Output:

```
============================================================
Result #1 (Score: 4.25)
============================================================
Project: /Users/alex/Projects/fitness-app
Session: a1b2c3d4...
Branch: main
Date: 2026-01-10

PROBLEM:
Getting EMFILE error when running tests, too many open files

SOLUTION:
The issue was too many file watchers. Fixed by increasing the limit with
`ulimit -n 10240` and adding it to shell profile...

COMMANDS RUN (3 total):
  $ ulimit -n
  $ ulimit -n 10240
  $ echo "ulimit -n 10240" >> ~/.zshrc
```

Now I can recreate the exact solution without remembering the details.

### Project Filtering

You can narrow searches to a specific project:

```bash
python3 search_history.py "vitest config" --project ~/Projects/fitness-app
```

## Why This Matters

Before this skill, I'd waste time re-solving problems I'd already solved. "I know we discussed this, but I can't find it." Now I just ask Claude.

The benefits:

1. **No more re-solving problems** - Claude finds past solutions instantly
2. **Daily digests for standups** - "What did we work on yesterday?" gives a ready summary
3. **Commands are preserved** - You can recreate exact solutions with the same commands
4. **Cross-project search** - Find solutions from any project you've worked on

The skill turns Claude from a stateless assistant into something closer to a persistent coding partner. It remembers what you've done together.

<Alert type="tip" title="Build Your Own Skills">
If you want to extend Claude Code with custom skills, check out my post on <InternalLink slug="building-my-first-claude-code-plugin">building a Claude Code plugin</InternalLink> for packaging and sharing skills across projects.
</Alert>

---

--- title: In Five Years, Developers Won't Write Code By Hand description: Software development as translation work is dying. Software engineering—the strategic, architectural discipline—is more valuable than ever. The shift is already here. tags: ['ai', 'software-engineering'] url: https://alexop.dev/posts/developers-wont-write-code-by-hand ---