Skip to content
Back to skills

Consolidate Transcripts

ASecurity

Consolidate transcripts from a channel into a single file, sorted by date (newest first), up to 800K tokens. Use when preparing transcripts for LLM context or bulk analysis.

  • 666 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 8, 2026
datapythonbashawsgit

Works with

  • cli

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill consolidate-transcripts --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Consolidate Transcripts?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Consolidate Transcripts
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-consolidate-transcripts/badge)](https://www.skillsdirectory.com/skills/majiayu000-consolidate-transcripts)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: consolidate-transcripts
description: Consolidate transcripts from a channel into a single file, sorted by date (newest first), up to 800K tokens. Use when preparing transcripts for LLM context or bulk analysis.
---

# Consolidate Transcripts

**Why?** LLMs have context limits. This skill merges multiple transcripts into a single file with accurate token counting, so you can feed an entire channel's content to Claude or GPT without exceeding limits.

## Quick Start

```bash
python scripts/consolidate_transcripts.py <channel_name>
```

Output: `~/Documents/YTScriber/<channel_name>/<channel_name>-consolidated.md`

> [!NOTE]
> This feature is currently a standalone script. A `ytscriber consolidate` CLI command is planned for a future release.

---

## Workflow

### 1. Identify the Channel

List available channels:
```bash
ls ~/Documents/YTScriber/
```

### 2. Choose Token Limit

| Use Case | Recommended Limit | Flag |
|----------|-------------------|------|
| Claude (200K context) | 150000 | `--limit 150000` |
| GPT-4 Turbo (128K) | 100000 | `--limit 100000` |
| Full archive (Claude Pro) | 800000 | (default) |
| Quick sample | 50000 | `--limit 50000` |

> [!TIP]
> The default 800K limit leaves ~200K tokens for prompts and responses when using Claude's 1M context.

### 3. Run Consolidation

```bash
python scripts/consolidate_transcripts.py <channel_name> [--limit TOKENS] [--verbose]
```

**Examples:**

```bash
# Default (800K tokens)
python scripts/consolidate_transcripts.py library-of-minds

# Custom limit for GPT-4
python scripts/consolidate_transcripts.py aws-reinvent-2025 --limit 100000

# Verbose output showing all included files
python scripts/consolidate_transcripts.py dwarkesh-patel --verbose
```

### 4. Verify Output

Check the consolidated file was created:
```bash
ls -la ~/Documents/YTScriber/<channel_name>/*-consolidated.md
```

---

## Parameters

| Option | Description | Default |
|--------|-------------|---------|
| `channel_name` | Folder name in data directory | Required |
| `--limit, -l` | Maximum tokens to include | 800000 |
| `--verbose, -v` | Show detailed file list | False |

---

## Output Format

The consolidated file includes:

1. **Header** — Generation metadata, total transcripts, token/word counts
2. **Table of Contents** — Dates, titles, tokens, words per transcript
3. **Transcripts** — Full text with title, date, author, source URL

---

## Troubleshooting

| Problem | Cause | Solution |
|---------|-------|----------|
| `ModuleNotFoundError: tiktoken` | tiktoken not installed | `pip install tiktoken` |
| `No transcripts found` | Empty transcripts folder | Run `ytscriber download` first |
| `FileNotFoundError` | Channel doesn't exist | Check `ls ~/Documents/YTScriber/` for valid names |
| Output file is small | Few transcripts available | Use `--verbose` to see what was included |
| Token count seems wrong | Old tiktoken version | `pip install --upgrade tiktoken` |

---

## Common Mistakes

1. **Wrong channel name** — Use the folder name exactly as shown in `ls ~/Documents/YTScriber/`, not the YouTube channel name.
2. **Forgetting to download transcripts first** — Consolidation requires transcripts to exist. Run `ytscriber download` first.
3. **Using too high a limit** — If you exceed your LLM's context, you'll get truncation errors. Use the limit guide above.
4. **Expecting real-time updates** — Re-run consolidation after downloading new transcripts.

---

## Reference

- Transcripts sorted **newest first** (descending by date)
- Files without dates in filename are placed last
- Token counting uses `cl100k_base` encoding (GPT-4/Claude compatible)
- Consolidated files are gitignored (not committed)
- Re-running overwrites the previous consolidated file

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.