Python · YouTube · Claude Code

Find what’s already working on your channels

It compares each recent video with that channel’s usual performance, highlights the ones doing much better, and turns those winners into new video ideas.

muse-canais banner: what works on your YouTube channels
In a nutshell

muse-canais is a Python script that checks your YouTube channels and shows which recent videos are performing well above each channel’s norm. It’s for people who publish frequently and want to repeat what works instead of guessing. It reads each channel’s public feed (the 15 most recent videos, with their view counts), with no login or API key, and compares each video’s view velocity with that of a typical video on the same channel. Videos that exceed 2 times the norm become “winners” and, if you ask, the script turns them into 8 new video ideas. You only need Python 3; the ideas are generated with Claude Code through your subscription.

What it is

A report on what to repeat, channel by channel

Each channel is compared with itself. A small channel won’t disappear next to a large one.

The six steps: public feed, velocity, channel norm, winners, 8 ideas, and your choice

🔓 Public data only

Reads the RSS feed YouTube provides for each channel (a file listing its most recent videos). No password, YouTube API, or API key required.

📊 Fair comparison

Measures each video’s views per hour and divides that by the channel median (the middle value, which isn’t skewed by an outlier). Anything above 2× is a winner.

💡 Ideas you choose

With --ideias, Claude Code reads the winners’ titles and numbers and suggests 8 new videos in the same style, with a title, hook, and format. Nothing is produced automatically: you choose.

How it works

From feed to report

One command does it all. Only the ideas step uses Claude Code; the script calculates everything else itself.

Channel list (canais.json)→ Each channel’s public feed→ Views per hour→ Channel norm→ Winners→ 8 ideas (optional)→ Your choice

Velocity

Views ÷ hours since publication. A video with 900 views in 100 hours gets 9 views per hour.

Channel norm

The median view velocity of channel videos older than 6 hours, with a floor of 0.5 per hour. This prevents a nearly inactive channel from making every video look like a hit.

Winner

At least 2× the norm (adjustable with --limiar), 6 hours to 30 days old, and at least 50 views. The report shows up to 15.

Requirements

What you need

No paid API key required. Runs on Linux, Mac, or Windows through WSL (Linux running inside Windows).

Python 3 and git

The script only uses what comes with Python; there’s nothing to install with pip. git downloads the project. Check that both are available on your machine:

python3 --version && git --version

Claude Code (for ideas only)

The --ideias option calls Claude Code through your subscription (install it from claude.com/claude-code). You need to be signed in: run claude once and sign in before using --ideias. Without it, the winners report works the same; you just won’t get the ideas.

claude --version

Your channels’ addresses

The link to each channel, such as https://www.youtube.com/@seucanal. You can use your own channel and other people’s channels you follow: the feed is public.

Step-by-step user guide

From scratch to your first report

Copyable commands, in order. Paste one block at a time into the terminal.

1

Download the project

Copies the project into the ~/projetos/muse-canais folder and moves into it.

git clone https://github.com/inematds/muse-canais ~/projetos/muse-canais
cd ~/projetos/muse-canais
2

Find each channel’s ID

YouTube’s feed requires the channel ID (a code starting with UC), not the @handle. The script includes a function that finds this code from the channel address. Run it inside the project folder (after the cd in step 1). Replace @seucanal with your handle and repeat for each channel.

python3 -c "import muse; print(muse.resolver_id('https://www.youtube.com/@seucanal'))"

You’ll get something like UC2QbQDyPKuHk93dwo5iq3Sw. If you get None, check the address.

3

Write your channel list

The canais.json included in the project contains INEMA’s channels. Open the file in a terminal editor with nano canais.json (or in VS Code) and replace all its contents with your channels, one block per channel, separated by commas. Don’t delete the file; overwrite its contents. The first word in each block (meucanal, segundo) is a short nickname you choose; it’s used with the --canais option.

{
  "meucanal": {"nome": "My channel", "url": "https://www.youtube.com/@meucanal", "id": "UC…"},
  "segundo": {"nome": "My second channel", "url": "https://www.youtube.com/@segundo", "id": "UC…"}
}

Replace UC… with the ID from step 2. Channels without an ID are skipped. Watch the quotation marks and commas: if one is missing, or there’s an extra comma after the last channel, the script stops with an error. In nano, save with Ctrl+O and Enter, then exit with Ctrl+X. The --atualiza-canais option in the README is only for people who also use yt-pubx (INEMA’s publishing tool); if you wrote the list by hand, you don’t need it.

4

Take a look without saving anything

With --dry, it reads the feeds and only displays the winners on screen, without creating a file or history.

python3 muse.py --dry

The last line tells you how many videos it read, how many winners it found, and which channels were “unresponsive” (when YouTube refuses the feed at that time). If a channel is unresponsive, run it again later.

5

Generate the report with ideas

Without --dry, it saves the report. With --ideias, Claude Code suggests 8 new videos based on the winners (this may take a few minutes). If no video exceeded 2×, there are no ideas that day. If the list has winners and still no ideas came out, the problem is Claude Code (not installed or not signed in): test it with claude -p "hi".

python3 muse.py --ideias

The report is saved to ~/projetos/output/muse-canais/<data>/muse.md (for reading) and muse.json (the same data in JSON, a text format other programs can read). To save it elsewhere, set MUSE_SAIDA before running the command, for example: MUSE_SAIDA=~/relatorios python3 muse.py --ideias.

Note: the prompt for ideas is written for INEMA (channels that teach AI). For a different topic, open muse.py, find the line that starts with Você é o pauteiro do INEMA (“You are INEMA’s editorial planner”), which is in Portuguese, and replace it with a description of your channels. On the very next line, also replace NOSSOS canais (“OUR channels”) if you like, and further down replace the example ex.: lives11 (“e.g.: lives11”) with a nickname from your canais.json. Each idea comes with a format: short 9:16 (vertical short video), 16:9 (standard landscape video), or carrossel (multi-image post).

6

Adjust things whenever you like

You can combine the options. The names after --canais are the nicknames in your canais.json.

12 ideas instead of 8:

python3 muse.py --ideias --n 12

Only videos at least 3× above the norm:

python3 muse.py --limiar 3

Only these channels:

python3 muse.py --canais meucanal,segundo

Starting with the second run (without --dry), the script also saves each video’s view counts in estado/historico.jsonl and records in muse.json how many views each video gained between runs. Whether a video is a winner is still determined by its view velocity since publication.

7

Run it automatically every day (optional)

The project includes a Linux scheduler (systemd) that runs muse.py --ideias every day at 08:00. It’s disabled by default. It works on Linux and WSL with systemd enabled; macOS doesn’t have systemd, so run the command manually. The service expects the project at ~/projetos/muse-canais. To enable it, from inside the project folder:

mkdir -p ~/.config/systemd/user
cp systemd/muse-canais.* ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now muse-canais.timer

If you also use radar-pautas (another INEMA project, which brings together the day’s news and suggests topics), the day’s trending topics are included in the ideas prompt automatically.

Example

A real run on INEMA’s channels

Run from November 1, 2026: 270 videos from 18 channels. Below are 5 of the 15 winners and 2 of the 8 ideas, as they appeared in muse.md (in Portuguese, since these channels publish in Portuguese).

ChannelVideoViewsAge× norm
INEMA TecVocê não precisa de mais tempo — precisa parar de fazer tudo à mão53220 h54.31×
fin-advBolsa caiu 13,88% num dia: Copom, dólar e dívida na semana que vem115011 h48.0×
INEMA FTDRenda Acabando e Nenhuma Resposta? O Erro Que Você Repete Todo Dia50121 h25.72×
INEMA TecA IA que não esquece mais nada: Claude Mem leva 1.723 estrelas e lider…19620 h19.23×
eventosextremos-inemaPrevisão do Dia: calorão agora e tempestade severa com granizo no Sul657420 h5.72×

Notice the last video: 6574 views, but only 5.72× because that channel usually gets many more views. And 196 views already reached 19× on a channel that usually gets few.

Você não precisa programar: um agente da IA faz isso no seu celular

Hook: Seu celular pode fazer sozinho aquilo que você repete todo dia na mão.

Why: repete o "pare de fazer tudo à mão" (54×).

Format: short 9:16

Cinco IAs pequenas juntas venceram uma gigante. O que isso muda pra você

Hook: Uma IA sozinha erra. Cinco trabalhando em equipe acertaram mais.

Why: segue o "Claude Mem lidera o GitHub" (19×): novidade técnica com placar concreto; o dado fica marcado "a confirmar".

Format: short 9:16

Limitations and next steps

What it doesn’t do

So you know what to expect from the report.

Limit
Only the 15 most recent videosThe public feed doesn’t include older videos, watch time, or audience retention.
Limit
Numbers are delayed by a few hoursViews in the feed lag behind YouTube Studio, and sometimes YouTube refuses a channel’s feed; it appears as “unresponsive.”
Limit
Ideas only see titles and numbersThey don’t watch the videos. Every fact or number about a new video needs its own source; the prompt says to mark it “to be confirmed.”
1.0 ✔
Feed, calculations, winners, and ideasChannel norm with a floor, a 6-hour to 30-day window, history between runs, 8 ideas, and daily scheduling ready (disabled).