Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计通过

youtube-comment-moderatorYouTube 评论管理员

Agent Skill

youtube-comment-moderator 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

8,037

周安装

322

GitHub Stars

1

下载量

2,602
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:youtube-comment-moderator(YouTube 评论管理员)
来源仓库:https://github.com/dhruvkar/youtube-comment-moderator
安装命令:
openclaw skills install youtube-comment-moderator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install youtube-comment-moderator

简介

基于 AI 自动分类与处理 YouTube 评论,提升管理效率。

  • 适合高频互动频道减轻人工审核负担时使用。youtube-comment-moderator 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 自动标记垃圾、仇恨或建设性评论,并生成回复草稿。
  • 依赖模型判断准确性,复杂语境可能存在误判风险。
  • 建议人工复核关键评论后再执行删除或回复操作。

SKILL.md

name
youtube-comment-moderator
description
>
env
required
true
description
YouTube Data API v3 key (free, 10K units/day)
required
true
description
Gemini API key for comment classification
required
true
description
Google OAuth client ID (for reply/delete operations)
required
true
description
Google OAuth client secret (for reply/delete operations)

YouTube Comment Moderator

Classify, reply to, and delete YouTube comments automatically using Gemini Flash + YouTube Data API v3.

Setup (Agent-Driven)

When a user wants to set up YouTube moderation, walk them through this conversationally. Do not tell them to run shell commands.

1. Collect Channel Info

Ask: "What's your YouTube channel URL or channel ID?"

Resolve it:

source .env
python3 scripts/fetch_comments.py --channel-id <ID> --max-videos 1 --max-comments 0

This validates the channel exists. If they give a URL like youtube.com/@handle, extract the handle and look up the channel ID via the API.

2. Check Environment Keys

Four keys are needed. Check which are missing:

echo "YOUTUBE_API_KEY=${YOUTUBE_API_KEY:+SET}" 
echo "GEMINI_API_KEY=${GEMINI_API_KEY:+SET}"
echo "YT_MOD_CLIENT_ID=${YT_MOD_CLIENT_ID:+SET}"
echo "YT_MOD_CLIENT_SECRET=${YT_MOD_CLIENT_SECRET:+SET}"

For any missing keys, tell the user what to do (not how to run scripts):

  • YOUTUBE_API_KEY: "Go to Google Cloud Console → Credentials, create an API key, and add YOUTUBE_API_KEY=... to your .env file."
  • GEMINI_API_KEY: "Go to Google AI Studio, create a key, and add GEMINI_API_KEY=... to your .env file."
  • YT_MOD_CLIENT_ID + YT_MOD_CLIENT_SECRET: These require OAuth setup. Walk them through references/oauth-setup.md conversationally, or summarize: "In Google Cloud Console, enable YouTube Data API, create an OAuth consent screen (External, Testing mode), add yourself as test user, create a Web Application OAuth client with redirect URI http://127.0.0.1:8976/callback, then add the Client ID and Client Secret to your .env."

After they confirm keys are added, restart the gateway so env vars reload.

3. OAuth Authorization

Generate the auth URL and send it to the user:

source .env && python3 scripts/setup.py --auth-url

Tell them: "Open this link, sign in with the Google account that owns your YouTube channel, and click Allow."

If user has a local browser (desktop): The script automatically catches the callback on http://127.0.0.1:8976/callback and saves the token. Tell them: "After clicking Allow, the browser should show a success page. You're done — I'll verify the token was saved."

If user is headless/remote (VPS, Telegram): Tell them: "After clicking Allow, your browser will redirect to a URL starting with http://127.0.0.1:8976/callback?code=.... That page won't load — that's expected. Copy ONLY the code parameter value from the URL (the part between code= and the next &), and paste just that code here. Do NOT paste the full URL — it contains sensitive auth data."

When they provide the code:

source .env && python3 scripts/setup.py --exchange-code "http://127.0.0.1:8976/callback?code=<CODE>"

⚠️ Security note: The OAuth code is single-use and expires in minutes, but avoid logging or echoing the full callback URL. If the user accidentally pastes a full URL in chat, exchange it immediately, then advise them the code is already consumed and useless.

4. Configure

Ask them conversationally:

  • "What moderation mode? Auto (replies and deletes automatically), Approval (drafts everything for your review), or Monitor (classify and report only)?"
  • "How do you typically talk to your audience? Casual? Professional? Funny?" (this sets voice_style)
  • "Any common questions you get? I can pre-load answers so replies are accurate." (optional FAQ)

Then create the config:

python3 scripts/setup.py --create-config \
  --channel-id <ID> \
  --channel-name "<NAME>" \
  --mode <approval|auto|monitor> \
  --voice "<VOICE_STYLE>"

5. Test

Run a dry run and show them the results:

source .env && python3 scripts/moderate.py --all-videos --dry-run

Summarize: "Found X videos, Y new comments. Here's what I'd do: Z spam deleted, W questions answered, etc." Show a few examples.

6. Go Live

Once they approve:

source .env && python3 scripts/moderate.py --all-videos

Optionally set up a cron job to run every 15-30 minutes for ongoing moderation.

Scripts Reference

ScriptPurpose
setup.pySetup wizard (interactive or --auth-url / --exchange-code / --create-config)
moderate.pyMain pipeline: fetch → classify → act. Also: --stats, --queue, --approve, --all-videos
fetch_comments.pyStandalone comment fetcher (API key only)
classify_comments.pyStandalone classifier (JSON in → JSON out)
db.pySQLite persistence layer

Moderation Modes

  • monitor — classify + report only (no OAuth needed)
  • approval — drafts replies and queues deletions for review (--queue to see, --approve to execute)
  • auto — auto-replies to questions, auto-deletes spam/hate

Classification Categories

CategoryAuto ActionDescription
spamdeletePromotional links, scam offers, bot text, self-promo
questionreplyGenuine question about video/creator/topic
praisethankPositive feedback, compliments
hatedeleteHateful, abusive, harassing content
neutralskipGeneric reactions, timestamps
constructiveflagThoughtful criticism, suggestions

Architecture

  • State: SQLite (data/youtube-comment-moderator/moderator.db)
  • Classification: Gemini 2.0 Flash (~$0.001/comment)
  • Read: YouTube Data API v3 (API key)
  • Write: YouTube Data API v3 (OAuth)
  • Deduplication: comment_id primary key, already-processed comments skipped

Environment Variables

Required:

  • YOUTUBE_API_KEY — YouTube Data API v3 key (free, 10K units/day)
  • GEMINI_API_KEY — Gemini Flash for classification

For write operations (reply/delete):

  • YT_MOD_CLIENT_ID — Google OAuth client ID
  • YT_MOD_CLIENT_SECRET — Google OAuth client secret

Optional overrides:

  • YT_MOD_DB — SQLite DB path (default: data/youtube-comment-moderator/moderator.db)
  • YT_MOD_OAUTH — OAuth token path (default: skills/youtube-comment-moderator/oauth.json)
  • YT_MOD_CONFIG — Config path (default: skills/youtube-comment-moderator/config.json)

OAuth Setup Details

See references/oauth-setup.md for the full step-by-step Google Cloud setup guide with screenshots-level detail and troubleshooting.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

91.71%
按下载量换算2,386

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills