AI-powered YouTube content guardian for young children
English | ็น้ซไธญๆ
Event: Built with Opus 4.6: The Claude Code Hackathon
Team Size: 1
Timeline: Feb 10-16, 2026
Every parent knows this scenario:
Your 5-year-old sits down at the computer. Within seconds, they've opened YouTube (not YouTube Kids) and started clicking through autoplay recommendations. By the time you notice, they've stumbled onto content that's inappropriate, scary, or just plain weird.
YouTube's age verification? A joke. Kids just click "I'm over 18" without reading.
Restricted Mode? One toggle away from being disabled.
YouTube Kids? Great, but kids don't know the difference โ they just see "the video app."
Parents can't monitor 24/7. We need AI to help.
"Sure, you might say: just don't let kids touch screens or YouTube โ problem solved!"
But here's my reality as a father of three:
My first child grew up without TV or tablets until elementary school. Just books. By kindergarten, he was reading at a 4th-grade level.
Then came child #2, and #3. Suddenly it's just Mom and Dad managing three kids. We can't give each one the same one-on-one attention. We can't even catch our breath.
That's when we needed help. Not to replace parenting, but to extend our reach when we physically can't be everywhere at once.
This is where AI can truly help families:
- Not just AdGuard or simple blocklists
- Intelligent, context-aware protection that understands what kids are actually watching
- Low-cost, embedded assistance that doesn't require a computer science degree
- A safety net for when parents are cooking dinner, helping with homework, or just trying to survive the day
Many people say they're afraid to have kids, or don't know how to raise them. What if AI could make parenting more manageable? What if technology could be a guardian, not just a babysitter?
That's the idea behind KidGuard.
KidGuard uses Claude's vision capabilities to create a real-time content guardian:
[YouTube Opens]
โ
[Webcam Check] โ Who's watching? (Age estimation / Family member ID)
โ
Under 12?
โ Yes
[Capture 5-sec clip]
โ
[Claude Vision Analysis] โ Is this kid-appropriate?
โ
Inappropriate?
โ Yes
[Auto-skip / Redirect to safe channel]
โ
[Notify parent via Telegram]
- Vision API analyzes video frames for violence, horror, adult themes, and "YouTube rabbit hole" content
- Nuanced understanding โ not just keyword blocking, but contextual analysis
- Multi-modal โ can analyze both visuals AND audio transcription
- Fast enough for real-time intervention
| Component | Technology | Notes |
|---|---|---|
| YouTube Detection | Browser extension / Process monitor | Detects youtube.com |
| Face Recognition | OpenCV + face_recognition | Local processing, privacy-first |
| Age Estimation | Claude Vision | Fallback for unknown faces |
| Screen Capture | ffmpeg / Windows API | 5-second clips |
| Content Analysis | Claude Vision API | Core intelligence |
| Browser Control | Puppeteer / Extension API | Skip / redirect |
| Parent Notification | Telegram Bot | Real-time alerts |
- All face recognition runs locally
- Video clips are analyzed and immediately deleted
- No data leaves the device except API calls to Claude
- Parent controls what gets logged
- Detect YouTube browser activity
- Webcam-based viewer identification
- Age estimation for unknown viewers
- Screen capture of YouTube content
- Claude Vision content analysis
- Auto-skip inappropriate content
- Redirect to whitelisted channels
- Telegram notifications to parents
- ๐ Parent custom rules (language, actions, audio, themes, keywords)
- ๐ Smart video transition detection - Only analyzes when videos change (saves API costs)
- ๐ Window title extraction - Gets video info without Selenium/OCR
- ๐ Auto monitoring mode - Hands-free protection
- Family member profile management
- Viewing history dashboard
-
Custom filter rulesโ DONE - Fully configurable parent rules -
Video transition detectionโ DONE - Smart cost-saving analysis - Audio analysis (screaming, profanity detection)
- Cross-platform support (tablet, phone)
- Integration with router-level controls
- Per-child custom rules
KidGuard now supports highly customizable filtering rules that let parents define exactly what content is appropriate for their children:
| Rule Type | Examples | Configuration |
|---|---|---|
| ๐ Language | Only Chinese, Only English, etc. | Block non-allowed languages |
| ๐คบ Actions | No sword fighting, No dangerous stunts | Detect specific movements |
| ๐ Audio | No screaming, No loud yelling | Analyze facial expressions |
| ๐จ Visual Style | No dark themes, No blood | Check visual aesthetics |
| ๐บ Themes | No gambling, No pranks | Context understanding |
| ๐ค Keywords | Custom blacklist | Title/description matching |
Strict Mode (Ages 4-7):
custom_rules:
language:
allowed_languages: ["ไธญๆ"] # Chinese only
actions:
blocked_actions:
- "็ ๆๆฎ็ " # No sword fighting
- "ๅฑ้ช็นๆ" # No dangerous stunts
audio:
blocked_audio_types:
- "ๅฐๅซ" # No screamingRelaxed Mode (Ages 10-12):
custom_rules:
language:
allowed_languages: ["ไธญๆ", "่ฑๆ"]
action: "warn" # Warn but don't block
themes:
blocked_themes:
- "่ณญๅ้ๆฒ" # Gambling only๐ Full Documentation: See docs/CUSTOM_RULES.md for detailed guide
๐ง Config Templates:
config/config.strict.yaml- For young children (ages 4-7)config/config.relaxed.yaml- For older children (ages 10-12)
No more editing YAML files! Configure KidGuard through a beautiful web interface.
โจ 5 Configuration Tabs:
- ๐ง Basic Settings - API keys, detection rules, safe channels
- ๐จโ๐ฉโ๐งโ๐ฆ Family Members - Add/manage family profiles
- ๐ฏ Custom Rules - Visual configuration of all filtering rules
- ๐ฑ Notifications - Telegram alerts setup
- ๐ Quick Templates - Pre-configured strict/relaxed modes
๐จ User-Friendly:
- Checkboxes and dropdowns instead of text editing
- Real-time validation
- Preview before saving
- Test API connection with one click
- Mobile-responsive design
python web_ui.py
# Open http://localhost:5555๐ Full Web UI Guide: See docs/WEB_UI.md
KidGuard offers three monitoring modes to fit different use cases:
Smart, cost-efficient, hands-free
python live_monitor_auto.pyโจ Features:
- Video transition detection - Only captures when videos change
- Window title extraction - Gets video info without Selenium/OCR
- Cost-saving - ~90% fewer API calls vs. fixed interval
- Dual analysis modes - AI analysis OR keyword filtering
- Automatic - No manual intervention needed
How it works:
- Monitors YouTube window title every 2 seconds
- Detects when video changes (title change)
- Captures screenshot + extracts video info (title, channel, description)
- Choose analysis mode:
- AI Mode (use_ai_analysis: true): Claude analyzes screenshot โ You execute recommended action
- Keyword Mode (use_ai_analysis: false): Keyword filtering โ Auto-suggest action
- Repeats for next video
๐ฐ Cost:
- AI Mode: ~$0.01 per video (~0.3 TWD)
- Keyword Mode: $0 (completely free!)
Full control, manual triggering
python live_monitor_manual.pyโจ Features:
- Press Enter to capture screenshot
- Execute actions via commands
- Best for spot-checking
Commands:
Enter- Capture screenshotclose- Close current tabredirect- Go to safe channelpause- Pause videowarn- Show warningok- Content is safe
Complete protection with user identification
python kidguard.pyโจ Features:
- Webcam-based viewer identification
- Age-based rule enforcement
- Automatic intervention
- Telegram notifications
KidGuard supports two analysis modes - choose based on your needs and budget:
When to use:
- Need deep content understanding
- Detect subtle inappropriate content
- Analyze visual elements (violence, horror, etc.)
- Best accuracy
How it works:
- Extract video title + channel from window
- Capture screenshot
- Send to Claude Vision API for analysis
- Claude provides detailed assessment + recommended action
- You confirm and execute
Cost: ~$0.01 per video (~0.3 TWD)
Configuration:
# config/config.yaml
analysis:
use_ai_analysis: true
claude:
api_key: "your-api-key"When to use:
- Budget-conscious (zero API costs)
- Simple blacklist filtering is enough
- Block obvious inappropriate content
- Fast decision making
How it works:
- Extract video title + channel from window
- Check against keyword blacklist
- Auto-suggest action if match found
- You confirm and execute
- Screenshot saved for records (optional)
Cost: $0 (completely free!)
Configuration:
# config/config.yaml
analysis:
use_ai_analysis: false
keyword_filter:
blocked_keywords:
- "้ฌผ"
- "ๆๆ"
- "ๆดๅ"
# ... more keywords
blocked_channels:
- "ๆๆ"
- "้็ฐ"| Feature | AI Analysis | Keyword Filtering |
|---|---|---|
| Cost | ~$0.01/video | $0 (Free) |
| Accuracy | โญโญโญโญโญ Very High | โญโญโญ Good |
| Visual Analysis | โ Yes | โ No |
| Context Understanding | โ Yes | โ No |
| Speed | ~2-3 seconds | Instant |
| Setup | Need API key | Just keywords |
| Best for | Deep protection | Budget-conscious |
๐ก Recommendation:
- Start with Keyword Mode to save costs
- Upgrade to AI Mode when you need deeper analysis
- Hybrid approach: Use keyword as pre-filter, AI for edge cases
Claude analyzes captured content for:
| Category | Examples | Action |
|---|---|---|
| ๐ด Violence | Fighting, weapons, gore | Immediate skip |
| ๐ด Horror | Jump scares, creepy content | Immediate skip |
| ๐ด Adult | Sexual content, drugs | Immediate skip |
| ๐ก Inappropriate | Excessive consumerism, clickbait | Warn + log |
| ๐ก Rabbit Hole | Elsagate-style, weird animations | Redirect to safe content |
| ๐ข Safe | Educational, age-appropriate | Allow |
# Using uv (recommended)
pip install uv
uv venv
uv pip install -r requirements.txt
# Or using pip
pip install -r requirements.txtFastest way to start protecting - no configuration needed!
# Clone the repo
git clone https://github.com/sharbui/kidguard.git
cd kidguard
# Install dependencies
uv pip install -r requirements.txt
# Start monitoring
uv run python live_monitor_auto.py
# Open YouTube and play videos
# Monitor will auto-detect video changes and capture screenshots# Launch Web UI
python web_ui.py
# Open http://localhost:5555 in your browser
# Configure settings through the friendly web interface# Configure
cp config/config.example.yaml config/config.yaml
# Edit config.yaml with your settings
# Run
python kidguard.py# config.yaml
claude_api_key: "your-api-key"
family:
- name: "ๅฐ้"
age: 8
face_encoding: "encodings/chicken.pkl"
- name: "้ดจ้ดจ"
age: 6
face_encoding: "encodings/duck.pkl"
- name: "่ญ้ญ"
age: 4
face_encoding: "encodings/fish.pkl"
rules:
max_child_age: 12
auto_skip: true
safe_channels:
- "UCX6OQ3DkcsbYNE6H8uQQuVA" # MrBeast
- "UC295-Dw_tDNtZXFeAPAQKEw" # Cocomelon
notifications:
telegram_bot_token: "your-bot-token"
telegram_chat_id: "your-chat-id"[Demo video will be here]
Scenario:
- Child opens YouTube on family computer
- KidGuard detects YouTube + identifies viewer as "้ดจ้ดจ" (age 6)
- Child clicks on a horror game video
- KidGuard captures 5 seconds, Claude analyzes โ "Horror content detected"
- Video auto-skips to a Cocomelon episode
- Parent receives Telegram notification with details
- 4.5 billion videos are watched on YouTube daily
- 80% of parents worry about what their kids watch online
- Elsagate showed us how algorithm-driven content can harm children
- Existing parental controls are easily bypassed
KidGuard puts AI to work protecting the most vulnerable internet users.
MIT License โ Use it, modify it, protect your kids with it.