DEV Community

Cover image for I Built an AI-Powered YouTube Sponsor Skipper Without Paying for LLM APIs
Jagdish Pal
Jagdish Pal

Posted on

I Built an AI-Powered YouTube Sponsor Skipper Without Paying for LLM APIs

Every developer has those moments where a tiny annoyance turns into a weekend project.

Mine started while watching YouTube.

The video itself was great.

Then came:

"Before we continue, today's video is sponsored by..."

It was a VPN.

A few minutes later, another creator was promoting a course.

Another video promoted a betting app.

I already had an ad blocker, so YouTube's ads weren't the problem.

The problem was that these sponsorships were embedded directly into the video itself.

That made me wonder:

Could AI identify sponsor segments automatically?

That question eventually became Skipper AI, an open-source Chrome extension that automatically skips in-video sponsorships.

But the most interesting part wasn't building the extension.

It was figuring out how to do it without paying for AI inference.


The Existing Solution

If you've used YouTube long enough, you've probably heard of SponsorBlock.

It's an amazing open-source project.

I've been using it for years.

The only limitation I kept running into was that it depends on community-submitted timestamps.

That means:

  • Newly uploaded videos usually don't have timestamps.
  • Small creators often never get annotations.
  • Someone has to watch the video first.

SponsorBlock isn't the problem.

It simply solves a different problem.


The Obvious AI Solution

The first idea seemed obvious.

  1. Extract the transcript.
  2. Send it to an LLM.
  3. Ask it to identify sponsor timestamps.
  4. Skip those timestamps.

Technically simple.

Financially... not so much.

Running inference for thousands of users would quickly become expensive.

I wanted the extension to remain completely free.

So I started looking for another approach.


Discovering Ask Gemini

While exploring YouTube I noticed something interesting.

Logged-in users now have:

Ask Gemini about this video

That immediately made me curious.

Instead of running my own LLM...

Could I simply leverage the AI that YouTube already provides?

That idea became the foundation of Skipper AI.


The First Prototype

My first version automated the UI.

It:

  • Opened Gemini
  • Typed a prompt
  • Clicked Send
  • Waited for the answer
  • Parsed the timestamps

It worked...

But it was fragile.

Everything depended on DOM elements.

Any YouTube UI change could break the extension.

So I went back to the drawing board.


A Better Approach

Instead of automating the interface, I explored how the feature actually works.

Using Chrome DevTools, I inspected the network requests generated when asking Gemini about a video.

That led to a much cleaner implementation.

Instead of driving the UI, the extension communicates through the same request flow.

This made the extension faster, cleaner, and far more reliable.


Architecture

User opens YouTube video
        │
        ▼
Check local cache
        │
   ┌────┴────┐
   │         │
 Hit        Miss
   │         │
   ▼         ▼
 Skip     Ask Gemini
              │
              ▼
     Parse timestamps
              │
              ▼
         Store cache
              │
              ▼
        Skip sponsor
Enter fullscreen mode Exit fullscreen mode

Fallback to SponsorBlock

Not every user has Ask Gemini.

Some users aren't logged in.

Some regions don't support it.

Instead of failing, the extension automatically falls back to SponsorBlock.

That means users get:

  • AI detection for new videos.
  • Community timestamps whenever available.

The goal isn't replacing SponsorBlock.

It's complementing it.


Caching

Once sponsor timestamps are generated, they're cached using:

  • Video ID
  • Video Duration

Future views of the same video don't need another AI request.


Open Source

The project is completely open source.

Transparency is important for browser extensions.

Anyone can inspect the implementation, report issues, or contribute improvements.


What's Next?

Some improvements I'm currently exploring:

  • Better multilingual support
  • Smarter timestamp validation
  • Better caching
  • More browser support

Try It

GitHub

https://github.com/jagdishpal02001/skipper

Chrome Extension

https://chromewebstore.google.com/detail/ncchpipphiigdfbpbjofbhbahcgckaob

Website

https://skipperai.netlify.app/

Feedback, suggestions, and criticism are always welcome.

Top comments (0)