← 返回 Skills 市场
brunovu20

youtube trending

作者 Bruno · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
50
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install youtube-trending
功能描述
Fetch and display the top trending YouTube videos globally or by country/category. Use when the user asks for trending YouTube videos, what's popular on YouT...
使用说明 (SKILL.md)

YouTube Trending

Fetch the top trending YouTube videos using the official YouTube Data API v3. Requires a free API key (10,000 units/day free — each trending fetch costs 1 unit).

Setup: get a free API key

  1. Go to Google Cloud Console
  2. Create a project (or select an existing one)
  3. Enable YouTube Data API v3 in the API Library
  4. Go to Credentials → Create Credentials → API key
  5. Set the environment variable for your platform (see below)

Setting the environment variable

macOS / Linux (bash/zsh):

export YOUTUBE_API_KEY=your_key_here

To persist across sessions, add that line to ~/.zshrc or ~/.bashrc.

Windows — Command Prompt:

set YOUTUBE_API_KEY=your_key_here

Windows — PowerShell:

$env:YOUTUBE_API_KEY = "your_key_here"

To persist in PowerShell across sessions, add it to your $PROFILE.

Usage

macOS / Linux:

python3 scripts/fetch-youtube-trending.py           # top 25, global
python3 scripts/fetch-youtube-trending.py FR        # France
python3 scripts/fetch-youtube-trending.py US 50     # top 50, US
python3 scripts/fetch-youtube-trending.py US 25 10  # Music
python3 scripts/fetch-youtube-trending.py US 25 20  # Gaming
python3 scripts/fetch-youtube-trending.py US 25 25  # News & Politics

Windows (Command Prompt or PowerShell):

python scripts/fetch-youtube-trending.py
python scripts/fetch-youtube-trending.py FR
python scripts/fetch-youtube-trending.py US 50
python scripts/fetch-youtube-trending.py US 25 10

On Windows, python3 may not be in PATH — use python instead. Both work if Python 3 is installed.

Arguments

Position Default Description
1 (none) Country code — omit for global chart
2 25 Number of videos (max 50)
3 (none) Category ID — omit for all categories

Category IDs

ID Name ID Name
1 Film & Animation 22 People & Blogs
2 Autos & Vehicles 23 Comedy
10 Music 24 Entertainment
15 Pets & Animals 25 News & Politics
17 Sports 26 Howto & Style
20 Gaming 27 Education
28 Science & Technology

Output

For each video: rank, title, channel, duration, publish date, views, likes, comments, and a direct YouTube link.

Data source

  • API: https://www.googleapis.com/youtube/v3/videos?chart=mostPopular
  • Parts fetched: snippet, statistics, contentDetails
  • Quota cost: 1 unit per request (free tier: 10,000 units/day)
  • No pip dependencies: uses only Python stdlib (urllib, json, re)

Workflow for the AI agent

  1. Check YOUTUBE_API_KEY is set; if not, guide the user through the platform-specific setup above
  2. Run python3 scripts/fetch-youtube-trending.py [REGION] [COUNT] [CATEGORY] (use python on Windows if python3 is not in PATH)
  3. Present the results; offer to search for more details on a specific video using WebSearch

Guardrails

  • Never fabricate view counts or video titles — all data comes from the API response.
  • If the API returns a 403, the key is likely invalid or the quota is exhausted for the day.
  • The "global" chart (no region) reflects YouTube's default ranking, which is heavily weighted toward English-language content.
安全使用建议
Install only if you are comfortable providing a YouTube Data API key and allowing requests to Google's YouTube Data API. Use a restricted API key if possible, and avoid putting the key in a persistent shell profile unless you want future terminal sessions to inherit it.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose, metadata, documentation, and Python script all align: fetch trending YouTube videos and print video metadata. The script reads command-line options, reads YOUTUBE_API_KEY, calls the YouTube Data API videos endpoint, and formats the response.
Instruction Scope
Instructions are limited to checking for the API key, running the included script on user request, showing results, and optionally searching for more details about a video. No prompt overrides, hidden role changes, or unrelated agent authority were found.
Install Mechanism
The skill requires Python 3 only and the script uses the standard library; there are no pip installs, package downloads, or bundled executables beyond the readable Python script.
Credentials
The skill needs YOUTUBE_API_KEY and outbound HTTPS access to www.googleapis.com, which is expected for YouTube Data API use and is documented. Users should treat the key as a credential and prefer a restricted Google API key.
Persistence & Privilege
No automatic persistence, privilege escalation, background process, file mutation, or credential harvesting was found. The docs suggest optional user-directed shell profile changes to persist the API key across sessions.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install youtube-trending
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /youtube-trending 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
YouTube Trending 1.0.0 – Initial Release - Fetches and displays top trending YouTube videos by country and/or category. - Uses only Python 3 standard library (no pip dependencies). - Requires a free YouTube Data API v3 key; setup instructions included for all platforms. - Customizable output: choose country, number of results (up to 50), and video category. - Clean output for each video with title, channel, views, likes, and direct link. - Rate limits and API error handling explained for user guidance.
元数据
Slug youtube-trending
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

youtube trending 是什么?

Fetch and display the top trending YouTube videos globally or by country/category. Use when the user asks for trending YouTube videos, what's popular on YouT... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 50 次。

如何安装 youtube trending?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install youtube-trending」即可一键安装,无需额外配置。

youtube trending 是免费的吗?

是的,youtube trending 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

youtube trending 支持哪些平台?

youtube trending 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 youtube trending?

由 Bruno(@brunovu20)开发并维护,当前版本 v1.0.0。

💬 留言讨论