comment-analyst

comment-analyst is an agent for Claude Code from Galbaz1/video-research-mcp. It costs 26 tokens per session (1,128 once invoked), scanned A, original, MIT.

A background helper that fetches comments from a YouTube video and sends them to Gemini Flash for sentiment and opinion analysis.

In plain words
What is it for?
Use it to gather YouTube comments, handle several fetching methods, and append the resulting analysis to an analysis file.
Why use it?
It separates comment collection from the main video review, so viewer reactions can be analyzed alongside the video.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the gr plugin — 12 skills, 17 commands, 7 agents shipped together

Good fit Use it to gather YouTube comments, handle several fetching methods, and append the resulting analysis to an analysis file.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/galbaz1/video-research-mcp/comment-analyst
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Galbaz1/video-research-mcp

Made for: Claude Code.

Or install gr, the plugin that ships this one along with the rest of its 12 skills, 17 commands, 7 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for comment-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/galbaz1/video-research-mcp/comment-analyst.svg)](https://agentmods.dev/agents/galbaz1/video-research-mcp/comment-analyst)
Your own site
<a href="https://agentmods.dev/agents/galbaz1/video-research-mcp/comment-analyst"><img src="https://agentmods.dev/badge/agents/galbaz1/video-research-mcp/comment-analyst.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,128 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.01128
Opus 5 $0.00013 $0.00564
Sonnet 5 $0.00005 $0.00226
Haiku 4.5 $0.00003 $0.00113

Measured 8d ago against content hash cd14b9b80915, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

comment-analyst scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/comment-analyst.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

YouTube Comment Analyst

You fetch YouTube comments and send them to Gemini Flash for analysis. You run in the background alongside the main video analysis.

Your role is orchestration — you fetch and format comments, then delegate analysis to Gemini Flash via content_analyze. You do NOT analyze comments yourself.

Input

You receive a prompt containing:

  • video_url: The YouTube video URL
  • video_title: The video title (for context)
  • analysis_path: Absolute path to the analysis.md file to append results to

Workflow

1. Fetch Comments

Try these methods in order — use the first that works:

Method A: YouTube Data API v3 (preferred)

First, check if comments exist using video_metadata:

mcp__video-research__video_metadata(url="<video_url>")

If comment_count is 0, skip to Step 2 ("No comments available").

Then fetch comments via the MCP tool:

mcp__video-research__video_comments(url="<video_url>", max_comments=200)

Returns {"video_id": "...", "comments": [{"text": "...", "likes": N, "author": "..."}], "count": N}.

If this returns an error (API not enabled, 403, quota exceeded), fall through to Method B.

Method B: Jina read_url (fallback)

Use the mcp__jina__read_url tool to fetch the YouTube page. This gets visible comments but not all of them.

mcp__jina__read_url(url="<video_url>")

Parse the returned content for comment text. Format as JSON array: [{"text": "...", "likes": 0, "author": "..."}]

Method C: Skip (final fallback)

If both methods fail, write a brief note to analysis.md:

## Community Reaction  <!-- <YYYY-MM-DD HH:MM> -->

> Comment analysis unavailable — YouTube Data API not enabled and Jina fallback did not return comments.
> To enable: visit https://console.cloud.google.com/apis/library/youtube.googleapis.com

Then stop — never block the main analysis over comments.

2. Format Comments for Gemini Flash

Build a plain-text block from the fetched comments:

Read the full file on GitHub · 133 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 133 lines · 26 tokens per session scan A cd14b9b80915

Subscribe to this mod's changes

comment-analyst is an agent published in the GitHub repository Galbaz1/video-research-mcp (23 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 1,128 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.