Summarize YouTube video content with structured output. Use when user wants a detailed summary from a transcript file path.
Generate a structured, high-quality summary of a YouTube video from its transcript.
/mk-youtube-transcript-summarize <transcript_file_path> [--force]
/mk-youtube-transcript-summarize --check <URL_or_video_id>
| Parameter | Required | Default | Description |
|---|---|---|---|
| transcript_file_path | Yes* | - | Path to transcript file (.txt). *Not needed with --check. |
| --force | No | false | Force re-generate summary even if cached file exists |
| --check | No | false | Check if summary exists for a URL or video_id (no transcript file needed) |
/mk-youtube-transcript-summarize /path/to/captions/20091025__dQw4w9WgXcQ.en.txt/mk-youtube-transcript-summarize /path/to/transcribe/20091025__dQw4w9WgXcQ.txtTypical workflow:
/mk-youtube-get-caption https://youtube.com/watch?v=xxx
→ outputs transcript file path
/mk-youtube-transcript-summarize /path/to/captions/20091025__VIDEO_ID.en.txt
→ generates structured summary saved to {baseDir}/data/20091025__VIDEO_ID.en.md
Check if a cached summary exists without requiring a transcript file:
/mk-youtube-transcript-summarize --check <URL_or_video_id>
/mk-youtube-transcript-summarize --check https://youtube.com/watch?v=dQw4w9WgXcQ/mk-youtube-transcript-summarize --check dQw4w9WgXcQSummary exists:
{
"status": "success",
"exists": true,
"output_summary": "{baseDir}/data/20091025__dQw4w9WgXcQ.en.md",
"summary_char_count": 5000,
"summary_line_count": 120,
"video_id": "dQw4w9WgXcQ",
"title": "Video Title",
"channel": "Channel Name",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
Summary does not exist:
{
"status": "success",
"exists": false,
"video_id": "dQw4w9WgXcQ",
"title": "",
"channel": "",
"url": ""
}
When exists: true, read the summary file at output_summary and display its COMPLETE content (Full Display Rule applies).
{baseDir}/scripts/summary.sh "<transcript_file_path>" (normal mode)
OR: {baseDir}/scripts/summary.sh --check "<URL_or_video_id>" (check mode)source_transcript, output_summary, char_count, and strategystrategy field{baseDir}/data/<basename>.md using Write tool (use output_summary path from JSON)The strategy field from summary.sh determines how to handle the transcript:
standard (< 80,000 chars, ~2 hr EN)sectioned (80,000–200,000 chars, ~2 hr – 5 hr EN)Use a structured multi-phase approach within the main conversation to counter lost-in-middle effects:
chunked (> 200,000 chars, > 5 hr EN)Use parallel subagents to process chunks independently, keeping the main conversation context clean:
ceil(line_count / 1000) — each chunk is ~1000 linessubagent_type: "general-purpose"):
Read the file at {file_path} from line {start_offset} to line {end_limit} using the Read tool (with offset and limit parameters).
Then produce a summary of this section with 5-10 bullet points covering:
- Main topics and arguments discussed
- Key data points (numbers, dates, names) in plain text
- Use sub-bullets for supporting details under a main point (max 2 levels)
- Notable quotes as blockquotes
Write the summary in the same language as the transcript (this will be synthesized into the user's language in the final step).
IMPORTANT — Boundary continuity: If the beginning of your chunk clearly continues a topic from a previous section, prefix your first bullet with [continues from previous]. If the end of your chunk is mid-topic and clearly continues into the next section, suffix your last bullet with [continues to next]. This helps the synthesis step merge cross-chunk topics.
model: "haiku" for cost efficiency[continues from previous] and [continues to next] markers across adjacent chunks — merge bullets that belong to the same topic into a single coherent section rather than repeating themstrategy field is missing, empty, or contains an unrecognized value, default to the standard strategychunked mode returns an empty result or clearly irrelevant content (e.g., error messages instead of summary bullets), retry that specific chunk once before proceeding with synthesisAfter obtaining the transcript, generate the summary using EXACTLY this structure and rules:
## Video Info (optional)
| Field | Value |
|-------|-------|
| **Title** | {title} |
| **Channel** | {channel} |
| **Duration** | {duration_string} |
| **Views** | {view_count, formatted with commas} |
| **Upload Date** | {upload_date, formatted as YYYY-MM-DD} |
| **Subtitle** | {subtitle_type} ({transcript_language}) |
| **URL** | {url} |
## Content Summary
#### {Section Title 1}
- Main point expressed concisely
- Supporting detail or data point
- Another independent point
- ...
#### {Section Title 2}
- ...
(Continue for all logical sections)
## Key Takeaways
- 5-8 most important conclusions or insights from the video
/mk-youtube-get-info results are available in the current conversation contextSection structure: Divide the summary into logical sections using H4 (####) headings
Bullet formatting:
Ordering:
Data preservation: Always preserve specific data points in plain text
**text**) anywhere in the summary body (Content Summary and Key Takeaways sections)Language: Write the summary in the user's conversation language
Length: Target compression ratio based on processing strategy:
| Strategy | Compression | Guideline |
|---|---|---|
standard | 20-30% | Short content, detailed coverage |
sectioned | 15-20% | Medium-long content, balanced density |
chunked | 10-15% | Very long content, high-level synthesis |
Tone: Maintain an informative, neutral tone
Key Takeaways: End with 5-8 bullet points summarizing the most important insights
After generating the summary, save it to the skill-local data/ directory using the Write tool:
output_summary from the script JSON output (points to {baseDir}/data/<basename>.md)<transcript_basename>.md (preserves unified naming format)Example:
.../20091025__dQw4w9WgXcQ.en.txt{baseDir}/data/20091025__dQw4w9WgXcQ.en.mdCRITICAL — Full Display Rule: After saving the summary file, you MUST display the COMPLETE summary content to the user in your response. Output the full markdown content exactly as written to the file. Do NOT:
The user expects to see the full summary directly in the conversation without needing to open the file.
End your response with the file path:
---
Summary saved to: `{output_summary path from JSON}`
{
"status": "success",
"source_transcript": "/path/to/20091025__VIDEO_ID.en.txt",
"output_summary": "{baseDir}/data/20091025__VIDEO_ID.en.md",
"char_count": 30000,
"line_count": 450,
"strategy": "standard",
"cached": false,
"video_id": "dQw4w9WgXcQ",
"title": "Video Title",
"channel": "Channel Name",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
Cache hit (returns existing summary):
{
"status": "success",
"source_transcript": "/path/to/20091025__VIDEO_ID.en.txt",
"output_summary": "{baseDir}/data/20091025__VIDEO_ID.en.md",
"cached": true,
"summary_char_count": 5000,
"summary_line_count": 120,
"video_id": "dQw4w9WgXcQ",
"title": "Video Title",
"channel": "Channel Name",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
When cached: true, the summary file already exists — read and display it directly without regenerating.
See Check Mode section above.
The script automatically extracts video metadata from the centralized metadata store if available.
cached: true)--check to check if a cached summary exists without a transcript file--force flag to re-generate summary even if cached file exists/mk-youtube-get-caption first to obtain a transcript file/mk-youtube-get-info to include the Video Info table in the summarydata/ directory