Display Settings

Back to Blog
Projects AI Claude

MindCap: Building an Attention Tracker with My AI Thought Partner

January 25, 2026 8 min read
A colorful iridescent brain illustration
What if your browser could understand your attention patterns better than you do?

You sit down to research something important, and three hours later you're watching a video about how medieval peasants bathed more than we think. That happens to me too often.

That's the spark behind MindCap—a browser extension I'm building to help me understand where my attention goes online. Not to judge myself, but to find patterns I can't see in the moment.

The Problem: We're All Frogs in Boiling Water

The internet is designed to capture your attention. Every platform, every algorithmically-curated feed—they're all competing for your eyeballs, and they're good at it.

I'm not anti-internet. I love discovering weird rabbit holes. But I wanted to understand the difference between:

Screen time apps tell you "you spent 4 hours on YouTube." But what kind of 4 hours? Learning about machine learning for a project, or watching cooking disasters? There's a difference.

The MindCap hypothesis: If I can track not just where I browse but how I engage—scroll depth, time on page, click patterns, topic connections—I can build a picture of my attention that's actually useful.

Building with Claude Code

I've been building MindCap with Claude Code, and it's changed how I think about building software.

Claude isn't just generating code for me to copy-paste. We have conversations about architecture decisions, debug weird edge cases together, brainstorm ideas. (I'm the one at 2am. Claude is always available.)

"Wait, what if we track not just that someone scrolled, but how fast they scrolled? Someone speed-reading vs. someone slowly absorbing content—that's meaningful data!"

That was a real moment from one of our sessions. Claude suggested tracking scroll velocity as an engagement signal, and it completely changed how I thought about the data model. Now MindCap tracks over 50 different engagement signals per page visit.

What MindCap Actually Does

At its core, MindCap is a Chrome extension that runs quietly in the background, watching how you interact with web pages. But unlike creepy surveillance tools (the irony isn't lost on me), all the detailed data stays on your machine. Only sanitized, aggregated patterns go to the cloud for analysis.

The Data Layer

Every page visit captures things like:

All of this gets synthesized into engagement scores that help identify your browsing "sessions"—coherent periods of related activity.

Session Detection

This is where it gets interesting. MindCap groups your browsing into sessions based on:

The result? Labels like "research session," "rabbit hole," or "deep dive" that actually mean something.

The Development Journey (aka The Chaotic Parts)

Building a browser extension that tracks everything without being a privacy nightmare is... tricky. Here are some of the fun challenges:

The Duplicate Visits Problem

Modern websites are often Single Page Applications (SPAs). Amazon, YouTube, Twitter—they don't do traditional page loads. So my extension was seeing the same "page" multiple times as the app updated.

Solution? A deduplication window. If the same URL fires within 5 seconds, we skip it:

typescript
// Simple but effective deduplication
const recentVisits = new Map<string, number>()
const DEDUP_WINDOW_MS = 5000

function shouldRecordVisit(url: string): boolean {
  const now = Date.now()
  const lastVisit = recentVisits.get(url)

  if (lastVisit && (now - lastVisit) < DEDUP_WINDOW_MS) {
    return false // Skip duplicate
  }

  recentVisits.set(url, now)
  return true
}

The Extension Context Problem

Chrome extensions can reload while a user is browsing. When that happens, content scripts (the code running on web pages) suddenly can't talk to the background script anymore. They throw "Extension context invalidated" errors.

Fix: Check if the context is still valid before trying to communicate:

typescript
function isContextValid(): boolean {
  try {
    return !!chrome.runtime?.id
  } catch {
    return false
  }
}

// Before any chrome.runtime call
if (!isContextValid()) {
  return // Gracefully bail out
}

The Domain Classification Problem

To understand browsing patterns, I need to know what category each site belongs to. Is reddit.com social media or news? Is github.com work or personal?

Instead of maintaining a massive static database, MindCap uses Claude Haiku (Anthropic's fast, cheap model) to classify domains on-the-fly. Classifications get cached globally, so the cost is minimal—roughly $0.002/month for the average user.

Working with Claude

There's a lot of AI hype, so I want to be clear: working with Claude isn't magic. It doesn't read my mind or write perfect code. Here's what it's like:

What Works Well

The Limits

Claude amplifies what I can do. It doesn't replace the thinking—it gives me someone to think with.

What's Next?

MindCap is still in development, but the core is working. Here's what's coming:

Privacy note: Full URLs never leave your device. Only domains and aggregated patterns sync to the cloud. Your embarrassing Wikipedia deep dives stay between you and your browser.

The Bigger Picture

We're all navigating an attention economy designed to exploit our psychology. I'm not trying to optimize my way out of being human—I still want to discover weird corners of the internet and follow random curiosities.

But I want to do it intentionally. I want to know when I'm choosing to explore vs. when I'm being pulled along by algorithmic manipulation. MindCap is my attempt to build that self-awareness.

Building it with Claude has been one of the more satisfying development experiences I've had. There's something useful about a collaborator who can jump between architecture discussions, TypeScript debugging, and Python backend design without missing a beat.

Jen Kim

Jen Kim

Developer, Claude Whisperer. Building tools for curiosity, creativity, and chaos.

All Posts Prev: Firefox History Crawler