My dream Google Chrome extension didn’t exist, so I vibe coded it with Claude


I consider myself to be an expert procrastinator. Over the years, I’ve tried no shortage of tools and techniques to fix this problem. Pomodoro timers, distraction blockers, minimalist writing apps. Most of them are well-designed and do exactly what they claim. They help you track time and encourage focus. What they don’t do is enforce it.

Nearly all of these tools rely on the same assumption that once you start a timer, you’ll follow through. That you won’t open a new tab, check a notification, or drift into the “just one more” trap. In practice, it’s much harder. The moment your attention slips, the tool has no way to respond. So, instead of continuing to cycle through existing productivity tools, I decided to build the one feature I felt was missing.

A Pomodoro timer that enforces focus

It’s not just a timer anymore, rather a focus assistant

An AI-generated image of a light blue Pomodoro tomato kitchen timer with the Home Assistant logo on it. Credit: Adam Davidson / How-To Geek | ChatGPT

The concept is straightforward: a Pomodoro timer that doesn’t just measure focus sessions, but also controls how the browser behaves during them.

Rather than treating every session the same, the extension introduces different “focus levels.” Each level reflects how strict the session should be, and the browser responds accordingly. In a more relaxed mode, switching tabs might be allowed without restriction. In a stricter mode, the extension could warn you when you try to leave your current tab or prevent the action entirely.

I know how “big” my willpower is. So, the key idea is to shift the burden of discipline away from the moment of distraction. Instead of relying on willpower during the session, I make a decision upfront about how much flexibility I want, and the extension enforces that decision.

Defining the project scope

Mind mapping the features

One of the easiest mistakes to make with a project like this is overengineering it from the start. It would be simple to add features like usage analytics, cross-device syncing, or a more elaborate interface. Instead, I deliberately kept the scope narrow.

The goal for the first version is simply to validate the idea. That means focusing on a small set of core capabilities: a working Pomodoro timer, a way to select a focus level, the ability to detect tab switching, and basic enforcement of those rules. If those pieces work together reliably, the extension is already useful. Anything beyond that can be layered on later.

Vibe coding with Claude

My trusted programming buddy in action

The logo of the Claude Opus 4 AI model. Credit: Anthropic

Rather than writing the entire extension manually, I approached this as an experiment in AI-assisted development.

The workflow is intentionally simple. I break the project into small, clearly defined steps, then prompt Claude to generate the code for each part. After that, I run the code locally, test how it behaves, and make adjustments where necessary.

Starting with the basics

Before adding timers or focus rules, the first step is simply to get a Chrome extension running. That means setting up a valid manifest file, loading the extension in the browser, and confirming that it can display a basic interface. It’s a small step, but an important one. Once that foundation is in place, we can start layering in actual functionality.

To keep things predictable, I gave Claude a very specific prompt. Creating a well-crafted prompt is crucial knowledge for vibe coding.

Create a minimal Chrome extension using Manifest V3.

Requirements:
- Include a valid manifest.json file
- Add a simple popup UI (popup.html)
- The popup should display a title: "Pomodoro Tab"
- Include a short placeholder text below the title: "Extension loaded successfully"
- Keep the structure simple and clean
- No external libraries or frameworks
- Use plain HTML, CSS, and JavaScript only
- Organize files clearly (manifest.json, popup.html, optional popup.js)

Make sure the extension can be loaded into Chrome without errors.

Claude gave me three different files, as expected. The most surprising part was the popup UI. Instead of a barebones HTML file, Claude generated a fully styled interface, complete with custom fonts, a color palette, subtle animations, and a small visual identity (including the tomato icon.)

A minimal Chrome extension named Pomodoro Tab built with Claude.

Adding the Pomodoro Timer

With the extension loading correctly, the next step is to make it functional.

At this stage, the goal is not to build the full experience, but to introduce the core mechanic: a working Pomodoro timer. That means adding a countdown, basic controls, and a way to switch between work and break sessions.

Since we already have a popup UI, the task now is to extend it without breaking what’s already there. This time, the prompt needs to be more deliberate. Instead of asking Claude to “create” a timer, we’re asking it to:

  • Work with the existing files
  • Modify them carefully
  • Keep the current UI intact
  • Layer functionality on top

Here’s the prompt:

You are working on an existing Chrome extension project called "Pomodoro Tab".

The project already includes:
- manifest.json (Manifest V3, correctly configured)
- popup.html (UI already styled and working)
- popup.js (basic script with a small animation)

Your task is to EXTEND the existing codebase by adding a basic Pomodoro timer.

Do NOT rewrite everything from scratch. Modify and build on top of the existing files.

Requirements:

1. Timer functionality:
- Add a countdown timer (default: 25 minutes for work, 5 minutes for break)
- Display the remaining time clearly in the popup (MM:SS format)
- Include a "Start" button and a "Reset" button
- When the timer ends, automatically switch between work and break sessions

2. UI updates:
- Integrate the timer display into the existing popup.html
- Keep the current design and styling intact as much as possible
- Add buttons in a clean and minimal way (no heavy redesign)

3. JavaScript logic:
- Add timer logic inside popup.js (or split into a new file if clearly needed)
- Use setInterval or similar approach for countdown
- Ensure the timer updates the UI in real time
- Handle start, reset, and session switching cleanly

4. Code quality:
- Keep the code simple and readable
- Do not introduce unnecessary complexity
- No external libraries or frameworks

5. Output format:
- Show the FULL updated code for:
  - popup.html
  - popup.js
- Only include manifest.json if changes are required (otherwise leave it unchanged)

The result should be a working Pomodoro timer inside the existing extension popup.
Pomodoro Tab's timer running with options to pause and reset.

Claude produced some nice output. I now have a functional Pomodoro timer that I can start with a 25-minute timer, pause, and reset. There was a problem where, after starting the timer, if I closed the extension or switched tabs, it would stop, and I had to restart it. I explained this to Claude with a follow-up prompt, and it fixed the issue.

Detecting tab switching

With a reliable timer in place, the next step is to observe user behavior. Specifically, we need to know when the user switches tabs. The behavior is simple:

  • When the timer is running and hard mode is enabled
  • If I try to switch tabs
  • The browser immediately forces me back to the original tab

Here’s the prompt I used:

You are working on an existing Chrome extension called "Pomodoro Tab".

Current architecture:
- background.js handles all timer logic and state using chrome.storage and chrome.alarms
- popup.js is a UI layer that communicates with background.js
- Timer persists correctly even when popup is closed

Your task is to EXTEND the project by adding a "Hard Mode" that prevents tab switching during an active session.

Do NOT rewrite existing code. Build on top of it.

Requirements:

1. Hard Mode Toggle (UI):
- Add a checkbox or toggle in popup.html labeled "Hard Mode"
- When enabled, store this setting in chrome.storage
- Default should be OFF

2. Track the active "focus tab":
- When the user starts the timer, store the current active tab ID as the "locked" tab

3. Enforce tab locking:
- In background.js, listen to chrome.tabs.onActivated
- If:
  - timer is running AND
  - hard mode is enabled AND
  - user switches to a different tab
- Then immediately switch them back to the locked tab using chrome.tabs.update

4. Edge cases:
- If the locked tab is closed, disable enforcement gracefully
- Do not crash or spam errors

5. Code structure:
- Keep logic inside background.js
- Keep popup.js focused on UI and messaging
- Use chrome.storage for persistence

6. Permissions:
- Add only necessary permissions (e.g., "tabs")

7. Output:
- Show updated:
  - popup.html
  - popup.js (if changed)
  - background.js
  - manifest.json (if changed)

Goal:
When Hard Mode is enabled and the timer is running, the user should not be able to leave the original tab.

Implementing hard mode turned out to be less straightforward than expected. On paper, the idea is simple: detect a tab switch and immediately switch back. In practice, there are a few moving parts: state management, tab context, and timing. That all needs to line up correctly.

The first version Claude generated didn’t work at all. The second worked inconsistently. Only after a couple of iterations did it behave reliably.


A simple yet powerful productivity tool

Most productivity tools are designed to help you stay focused. But when I vibe-coded this product, I assumed that I wouldn’t. Using Claude to build it worked well overall, though there were a few pitfalls along the path. You can find the full code on my GitHub.



Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


Disney+ is embracing the Dark Side, as Star Wars: Maul – Shadow Lord is about to emerge on the service. Before The Mandalorian brought Star Wars into live-action television, the franchise was thriving in animated form, thanks to the initial success of Star Wars: The Clone Wars. Among the many new twists that the series introduced, one of the most notable developments was the return of Darth Maul after his apparent death in Star Wars: The Phantom Menace.

Now, after several series that have developed the character from a terrifying figure to a tragic Sisyphean antagonist, Maul – Shadow Lord will throw the character into a fight against the tyranny of the Empire, leading to tense chases and surprise alliances:

What is Star Wars: Maul – Shadow Lord?

The former Sith Lord returns

Star Wars: Maul – Shadow Lord is set on the newly introduced world of Janix, a planet on the Mid Rim of the galaxy far, far away that has been unbothered by the still young Galactic Empire in the wake of the Clone Wars. While the planet’s Tactical Defense Force keeps the population in check, the planet has become host to individuals looking to avoid Imperial interests, either out of fear for their lives or to rebuild in the shadows.

Following his usurping of Mandalore and escape from Republic custody in The Clone Wars season 7, Maul is attempting to rebuild the Shadow Collective crime syndicate with what remains of his forces, including fellow Dathomirian Zabraks and Mandalorian supercommandos. As Maul’s operations become too much for the TDF to handle, the Empire establishes a foothold on Janix. While grappling with Stormtroopers and Inquisitors, Maul must make an uneasy alliance with a young Jedi on the run if he wants to initiate his plan for revenge.

Who is in Star Wars: Maul – Shadow Lord?

An Oscar nominee joins the cast

Star Wars: Maul – Shadow Lord sees Sam Witwer reprise the role of the former Sith Lord-turned-crime lord from his appearances across Star Wars: The Clone Wars and Star Wars: Rebels. Fellow Rebels stars Vanessa Marshall and Steve Blum join him as the Mandalorian Rook Kast and Zabrak fighter Icarus. Meanwhile, Gideon Adlon takes on the role of the young Twilek Padawan Devon Izara, while Dennis Haysbert’s Master Eeko-Dio Daki hopes to guide her in the Dark Times.

Meanwhile, Oscar-nominee Wagner Moura will provide the voice of TDF captain Brander Lawson, with Richard Ayoade voicing his partner Two-Boots, and Charlie Bushnell voicing his son, Rylee. Chris Diamantopoulos and Stephen Stanton will voice crime lords Looti Vario and Marg Krim, David W. Collins will voice Spybot, and A.J. LoCascio will voice Marrok, the Inquisitor first introduced in Ahsoka.

Subscription with ads

Yes, the Disney Basic plan

Simultaneous streams

Up to 4


When does Star Wars: Maul – Shadow Lord take place?

Stuck between two familiar events

Devon is imprisoned in in Star Wars_ Maul - Shadow Lord. Credit: Lucasfilm

Star Wars: Maul – Shadow Lord is set during the Dark Times, the period of the Star Wars franchise between Revenge of the Sith and A New Hope where the Empire was expanding its power over the galaxy, with those who opposed them choosing to lurk in the shadow. This period has been explored in The Bad Batch, Star Wars Rebels, Obi-Wan Kenobi, Andor, and the Star Wars: Jedi video game franchise, as well as briefly explored in select episodes of the Tales of the Jedi, Tales of the Empire, and Tales of the Underworld anthology series.

Some TV show characters with the Andor logo in the background.


Finished Andor? Stream These Star Wars Shows and Movies Next

The Star Wars universe has plenty to watch to keep the Force flowing now that Andor’s finished.

In the trailer itself, Maul and Devon are seen facing Stormtroopers wearing TK armor, an early version of Stormtrooper armor that was introduced in The Bad Batch season 1. This means that the Empire is still in a time of transition from the Galactic Republic to the forces that we see closer to the Star Wars Original Trilogy. As such, Maul – Shadow Lord events are likely happening concurrently with the events of The Bad Batch’s later two seasons.

Maul – Shadow Lord can finally explain the final years of the Sith Lord’s life

Time to explore new horizons

Maul ignites half of his lightsaber in in Star Wars_ Maul - Shadow Lord. Credit: Lucasfilm

While The Clone Wars successfully resurrected Maul and Rebels would give him a fitting end, there is still a large portion of his story left unexplored. While it is unclear whether the series will receive multiple seasons, the show will explore how he rearranged his forces from the Shadow Collective into Crimson Dawn, the faction first introduced in Solo: A Star Wars Story. Paul Bettany’s Dryden Vos did feature as a cameo in The Clone Wars’s final season, but the arc largely focused on Maul’s Mandalorian forces over his other agents. As such, Maul – Shadow Lord can complete his turn from a man well-aware of Smith’s schemes into his own fully-fledged criminal mastermind.

Furthermore, the presence of Devon in Maul’s story is allowing Lucasfilm to dust off long-scrapped plans. Prior to the Disney acquisition, a Darth Maul-focused game was in development that saw Maul paired with Darth Talon, another red-skinned Twilek, at the behest of George Lucas himself, as the pair took on the galaxy. While Devon may not be a direct adaptation of Talon in the existing canon, Witwer has teased that the series will finally adapt several unused concepts for Maul to screen, and Devon’s visual similarities to Talon could suggest that the series will fulfill one of Lucas’s final ideas for the franchise.

When will Star Wars: Maul – Shadow Lord stream?

Two-episode premiere coming soon

Maul in hiding in in Star Wars_ Maul - Shadow Lord. Credit: Lucasfilm

Star Wars: Maul – Shadow Lord will arrive on Disney+ on April 6th with a two-episode premiere. The series will then release two new episodes every Monday, culminating in the finale on May 4. While one of the shorter Star Wars series, Maul’s long-awaited 10-part story will finally give fans a glimpse into the mind of one of the Dark Side’s most terrifying warriors.



Source link