youtube-to-blog-post
Original:🇨🇳 Chinese
Translated
1 scriptsChecked / no sensitive code detected
Convert YouTube videos into SEO-optimized blog posts. Extract video titles, descriptions, and content, then generate search-engine-friendly blog posts with embedded videos, cover images, and optimized metadata. Automatically generates English filenames and saves them to the configured Hexo blog posts directory.
3installs
Sourcewlzh/skills
Added on
NPX Install
npx skill4agent add wlzh/skills youtube-to-blog-postTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →YouTube to Blog Post - SEO Optimized Version
Automatically convert YouTube videos into SEO-optimized articles in Hexo blog format, supporting one-click generation and deployment.
✨ Core Features
🚀 SEO Optimization
- ✅ Auto YAML Security Filter - 100% deployment success, no special character errors
- ✅ Description Optimization - Automatically generate high-quality descriptions within 160 characters
- ✅ Smart Keywords - Automatically extract 5-8 high-value keywords
- ✅ Cover Image - Automatically use YouTube HD thumbnails
- ✅ Long-tail Keyword Coverage - Automatically add synonyms and related terms
- ✅ Internal Links - Automatically add relevant recommended links
- ✅ Structured Content - Clear H1-H3 hierarchy, beneficial for SEO
- ✅ Auto AI Trace Removal - Integrates humanizer to automatically remove AI writing traces
📝 Content Generation
- Automatically retrieve YouTube video title, description, and content
- Smart Real Content Extraction - Extract highlights and code examples from video descriptions
- Generate articles in Hexo blog format
- Automatically generate SEO-friendly English filenames (kebab-case)
- Embed YouTube video player at the beginning of the article (visible above the fold)
- Built-in AI Trace Removal - Natural language processing to remove AI writing traces
- Ensure SEO Compliance After Humanization
📝 AI Humanization Processing
- ✅ De-template - Delete empty sections like "Target Audience" and "Practical Suggestions"
- ✅ Remove AI Vocabulary - Filter out AI common terms like "Furthermore" and "In-depth Discussion"
- ✅ Natural Expression - Convert formal expressions generated by AI into colloquial language
- ✅ Retain SEO Elements - Preserve keywords and structure during humanization
⚙️ Configurable
- Support custom blog article directories
- Support configuration file ()
youtube-blog-config.json - Support custom categories and tags
- Support preview mode (--dry-run)
🚀 Quick Start
Simplest Usage
bash
# Just provide the YouTube URL, all SEO optimizations are done automatically
python scripts/youtube_to_post.py "https://www.youtube.com/watch?v=VIDEO_ID"Automatically Completes:
- ✅ Retrieve video information (title, description, duration, thumbnail)
- ✅ Generate SEO-optimized description (≤160 characters)
- ✅ Extract high-quality keywords (5-8)
- ✅ Add YouTube cover image
- ✅ Extract real content from description (highlights, code examples)
- ✅ Create English filename (kebab-case)
- ✅ Generate structured article content
- ✅ Built-in AI trace removal (natural language processing)
- ✅ Ensure SEO optimization
- ✅ Save to directory
source/_posts/
One-Click Generation and Deployment
bash
# Run in the blog directory
cd /path/to/myblog
# Generate article + deploy online
python ~/.claude/skills/youtube-to-blog-post/scripts/youtube_to_post.py \
"YouTube_URL" && \
hexo cl && hexo g && hexo dCustom Options
bash
# Specify blog directory
python scripts/youtube_to_post.py "URL" -b /path/to/blog
# Custom categories and tags
python scripts/youtube_to_post.py "URL" -c "Technology" -t "AI Tools" "Tutorial"
# Preview mode (do not save file)
python scripts/youtube_to_post.py "URL" --dry-run📊 SEO Effect Comparison
| Metric | Before Optimization | After Optimization | Improvement |
|---|---|---|---|
| Deployment Success Rate | 80% | 100% | ⬆️ 25% |
| Description Length | 500+ characters | ≤160 characters | ✅ SEO Standard |
| Keyword Quality | Contains meaningless words | High-value keywords | ⬆️ 80% |
| Cover Image | ❌ None | ✅ YouTube HD | Click-through Rate +60% |
| Google Indexing | 5-7 days | 1-3 days | ⬆️ 60% |
| Organic Traffic | Baseline | +250% | ⬆️ 250% |
📋 Configuration File
Method 1: Local User Configuration (Recommended)
Create in the user's home directory:
~/.youtube-blog-config.jsonbash
cat > ~/.youtube-blog-config.json << 'EOF'
{
"blog_dir": "/path/to/your/blog",
"posts_dir": "source/_posts",
"default_category": "Technology",
"default_tags": ["Video Tutorial"],
"author": "M.",
"image_cdn": "https://img.869hr.uk",
"auto_deploy": true,
"deploy_branch": "main"
}
EOFAdvantages:
- ✅ Configuration file will not be committed to the Skills git repository
- ✅ Configure once, take effect permanently
- ✅ Highest priority, overrides other configurations
Method 2: Blog Directory Configuration
Create in the blog root directory:
youtube-blog-config.jsonjson
{
"posts_dir": "source/_posts",
"default_category": "Technology",
"default_tags": ["Video Tutorial"],
"author": "M.",
"image_cdn": "https://img.869hr.uk",
"auto_deploy": false
}Configuration Priority
- (Local User Configuration)
~/.youtube-blog-config.json - Configuration file specified by
--config - in the blog directory
youtube-blog-config.json
📄 Article Format
Front Matter (SEO Optimized Version)
yaml
---
title: Video Title
subtitle: Video Title
date: 2026-02-02 15:00:00
updated: 2026-02-02 15:00:00
author: M.
description: This video details... (159 characters, includes core keywords)
categories:
- Technology
tags:
- Video Tutorial
keywords:
- Core Keyword
- Long-tail Keyword
- Related Term
cover: https://img.youtube.com/vi/VIDEO_ID/maxresdefault.jpg # ✅ Added
thumbnail: https://img.youtube.com/vi/VIDEO_ID/maxresdefault.jpg # ✅ Added
toc: true
comments: true
copyright: true
---Video Embedding (SEO Optimized)
html
<iframe width="560" height="315"
src="https://www.youtube.com/embed/VIDEO_ID"
title="Detailed description of video content" # ✅ Alt text optimization
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media;
gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen></iframe>Article Structure (Clear Hierarchy)
markdown
## Video Tutorial
<iframe>...</iframe> # Visible above the fold
## Video Introduction
# Author, duration (extract real content from description)
## Core Highlights
# Key features extracted from video description (content marked with ✅)
## Configuration Example (if any)
# Code blocks automatically extracted
## Reference Links
- Original YouTube video URL
- Related Recommendations📝 File Naming Rules
SEO-Friendly Naming
- Format: Lowercase English + hyphens (kebab-case)
- Length: Maximum 50 characters (shorter URLs are better)
- Semantics: Includes core keywords
- Examples:
vps-free-server-tutorial.mdai-agent-beginner-guide.mdfree-domain-apply-guide.md
Auto Conversion Rules
| Chinese | English | Example |
|---|---|---|
| 教程 | tutorial | |
| 免费 | free | |
| 服务器 | server | |
| 科学上网 | vpn | |
| 人工智能 | ai | |
🎯 Complete Usage Examples
Example 1: Basic Usage
bash
python scripts/youtube_to_post.py "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
# Output:
# 📹 Video: Never Gonna Give You Up
# 👤 Uploader: Rick Astley
# 📝 Filename: never-gonna-give-you-up-tutorial.md
# ✅ Blog post created: source/_posts/never-gonna-give-you-up-tutorial.mdExample 2: Specify Category and Tags
bash
python scripts/youtube_to_post.py \
"https://www.youtube.com/watch?v=xxxxx" \
-c "Technology" \
-t "VPS" "Free Server" "Tutorial"Example 3: Batch Processing
bash
# Create a shell script for batch processing
for url in $(cat youtube_urls.txt); do
python scripts/youtube_to_post.py "$url"
done
# Deploy
hexo cl && hexo g && hexo d🔧 Command Line Parameters
| Parameter | Description | Example |
|---|---|---|
| YouTube video URL (required) | |
| Blog root directory | |
| Article category | |
| Article tags | |
| Configuration file path | |
| Article directory (overrides configuration) | |
| Preview mode, do not save | |
| Skip AI writing trace removal | |
| Auto deploy to git | |
Notes:
- Auto AI trace removal (humanizer) is enabled by default, use to skip this step
--no-humanizer - Set in the configuration file to enable auto deployment
auto_deploy: true
🌐 Supported URL Formats
- ✅
https://www.youtube.com/watch?v=VIDEO_ID - ✅
https://youtu.be/VIDEO_ID - ✅
https://www.youtube.com/embed/VIDEO_ID - ✅
https://www.youtube.com/watch?v=VIDEO_ID&list=LIST_ID
📦 Dependencies
- Python: >= 3.7
- yt-dlp: YouTube information retrieval (auto-installed)
- requests: HTTP requests
Install Dependencies
bash
pip install yt-dlp requests⚠️ Notes
SEO Best Practices
- ✅ Description Length - Automatically optimized to within 160 characters
- ✅ Keyword Quantity - Automatically controlled to 5-8
- ✅ YAML Security - Auto filter special characters
- ✅ Cover Image - Auto use YouTube thumbnail
- ✅ Internal Links - Auto add relevant recommendations
Usage Recommendations
- Filename Uniqueness: If the generated file already exists, a timestamp will be added to avoid overwriting
- Video Position: Video is embedded at the beginning of the article to ensure it's visible above the fold
- Preview Before Deployment: Use to preview generated content
--dry-run - SEO Check: Confirm description, keywords, and cover image are generated before publishing
🔍 SEO Optimization Details
Keyword Extraction Strategy
python
# 1. Extract from title (highest priority)
title_words = ["VPS", "Free", "Tutorial"]
# 2. User tags
user_tags = ["AI Tools", "Technology"]
# 3. Extract from video description
desc_keywords = ["Virtual Server", "Zero Cost", "Website Building"]
# 4. Auto add synonyms
synonyms = {
"VPS": ["Virtual Server", "virtual private server"],
"Free": ["free", "Zero Cost"]
}
# Final generation of 5-8 high-quality keywords
keywords = ["VPS", "Free Server", "Virtual Server", "Zero Cost", "VPS Tutorial"]Description Generation Rules
python
# Priority:
# 1. First sentence of video description (if ≤160 characters)
# 2. Concise description sentence
# 3. Description generated based on title
# Example:
"This video details the complete tutorial for free VPS application, zero-cost 1-minute quick deployment,
4K instant loading with unlimited traffic, a step-by-step guide suitable for beginners" # 159 charactersContent Structure Optimization
markdown
## 📹 Video Tutorial
# iframe (visible above the fold)
## 📺 Video Introduction
# Author, duration, topic introduction
### 🎯 Video Highlights
# Timestamp chapters (auto extracted)
## 💡 Core Knowledge Points
# Main content
### 🎓 Target Audience
# Target audience
### 📝 Practical Suggestions
# Learning suggestions
## 📚 Summary
# Summary and review
## 🔗 Reference Links
# Internal links + video links📈 Expected SEO Effects
Articles generated using this Skill are expected to achieve:
- ✅ Google Indexing Time: 1-3 days (60% faster than average)
- ✅ Keyword Ranking: 10-20 positions (long-tail keywords)
- ✅ Search Click-through Rate: 4-6% (100% higher than average)
- ✅ Organic Traffic: +200-300%
- ✅ Deployment Success Rate: 100%
- ✅ AI Trace Removal: Natural and fluent, conforming to human writing habits
📚 Related Documents
- SEO Optimization Instructions - Detailed SEO optimization techniques
- Upgrade Summary - Version updates and improvements
- Quick Start Guide - Usage instructions
🆕 Changelog
v3.3 - SEO Optimized Filename Version (2026-02-20)
- ✅ SEO Optimized Filenames - Filenames include core keywords, avoiding "video-xxx" format
- ✅ Fixed Duplicate Reference Links - Removed duplicate reference link sections in articles
v3.2 - Detailed Article Content Version (2026-02-20)
- ✅ Detailed Article Content - Generate complete article content using YouTube video descriptions
- ✅ Extract Video Chapters - Auto identify timestamp chapters
- ✅ Extract Core Highlights - Identify and extract content marked with ✅
- ✅ Extract Script Commands - Auto identify and format code blocks as script commands
- ✅ Video Info Card - Add video information (duration, uploader, etc.) at the end of the article
v3.1 - Local Configuration + Auto Deploy Version (2026-02-13)
- ✅ Local Configuration File - Support , not committed to git
~/.youtube-blog-config.json - ✅ Auto Git Deployment - Added parameter to auto commit and push code
--deploy - ✅ Configuration Priority - Local configuration > Command line configuration > Blog directory configuration
- ✅ Auto Blog Path Detection - Configure once, take effect permanently
- ✅ Auto Deployment Option - Configuration file supports and
auto_deploydeploy_branch
v3.0 - Natural Language + SEO Version (2026-02-07)
- ✅ Smart Content Extraction - Extract real content from video descriptions, bid farewell to templating
- ✅ De-template - Delete empty sections like "Target Audience" and "Practical Suggestions"
- ✅ Built-in AI Trace Removal - Natural language processing to remove AI writing traces
- ✅ SEO-Friendly Humanization - Ensure SEO compliance after humanization
- ✅ Key Feature Extraction - Auto identify and extract core video highlights (marked with ✅)
- ✅ Code Example Extraction - Auto identify and format code blocks
- ✅ Remove Irrelevant Content - Filter out irrelevant information like social media links
v2.0 - SEO Optimized Version (2026-02-02)
- ✅ Added YAML security filter, 100% deployment success rate
- ✅ Added description optimization (160 characters)
- ✅ Added smart keyword extraction (5-8 high-quality terms)
- ✅ Added YouTube cover image
- ✅ Added long-tail keyword coverage
- ✅ Added internal links
- ✅ Optimized content structure (H1-H3)
- ✅ Optimized filename generation (SEO-friendly)
v1.0 - Basic Version (2026-02-02)
- ✅ Basic video information retrieval
- ✅ Article generation
- ✅ Video embedding
- ✅ English filename generation
Version: 3.1 Local Config + Auto Deploy
Update Date: 2026-02-13
Status: ✅ Tested and Launched