publish

publish is a command for Claude Code from digitalsamba/claude-code-video-toolkit. It costs 7 tokens per session (1,916 once invoked), scanned A, original, MIT.

A command for uploading a rendered video project to YouTube using metadata from its project file.

In plain words
What is it for?
Use it to locate a project video, preview its metadata, upload it, and save the resulting YouTube video ID and URL.
Why use it?
It organizes the upload steps and checks that the video and required YouTube sign-in setup are ready first.

Command for Claude Code

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.

agentmods
npx agentmods add commands/digitalsamba/claude-code-video-toolkit/publish
Clone the repo
git clone --depth 1 https://github.com/digitalsamba/claude-code-video-toolkit

Made for: Claude Code.

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 publish

README.md
[![agentmods](https://agentmods.dev/badge/commands/digitalsamba/claude-code-video-toolkit/publish.svg)](https://agentmods.dev/commands/digitalsamba/claude-code-video-toolkit/publish)
Your own site
<a href="https://agentmods.dev/commands/digitalsamba/claude-code-video-toolkit/publish"><img src="https://agentmods.dev/badge/commands/digitalsamba/claude-code-video-toolkit/publish.svg" alt="Measured on agentmods" height="20"></a>
Per session 7 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,916 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00007 $0.01916
Opus 5 $0.00003 $0.00958
Sonnet 5 $0.00001 $0.00383
Haiku 4.5 $0.00001 $0.00192

Measured 3d ago against content hash 645d2801b8b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

publish 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 3d 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.

.claude/commands/publish.md · 168 lines

How it starts

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

Publish to YouTube

Upload a rendered project to YouTube, auto-filling the metadata from project.json. Wraps tools/youtube_upload.py (OAuth 2.0 + Data API v3, resumable upload).

project.json + rendered MP4 → metadata draft → dry-run → upload → write back videoId/URL

One-time setup required. YouTube uploads need OAuth (not an API key). If the user hasn't set this up, point them at docs/youtube-upload.md and stop until YOUTUBE_CLIENT_SECRETS_FILE is in .env and uv run tools/youtube_upload.py --auth has been run once. Don't attempt an upload without a cached token.

Entry Point

Step 1: Locate the project and its rendered video

If the user named a project, use it. Otherwise scan for candidates:

cd /path/to/claude-code-video-toolkit && ls projects/*/project.json

Read the chosen project.json defensively — real files carry render, format, and publish blocks beyond the lib/project/types.ts schema. Resolve the video file:

  1. render.file if present (e.g. out/ai-agent-short.mp4), relative to the project dir.
  2. Else scan the project's out/*.mp4 and pick the most recent.
  3. Confirm the resolved path exists and is non-empty before continuing.

If the project's phase isn't complete, warn the user and confirm they still want to publish.

Step 2: Assemble metadata (into a publish block)

Build a publish object and write it back into project.json so it's reviewable, editable, and re-runnable. If a publish block already exists, use it as defaults.

Field How to derive
title Existing publish.title, else the hook/title scene's title, else the project name (humanized). Keep ≤100 chars.
description Existing publish.description, else auto-draft: a 1–2 line summary from the scene narration/titles + a channel footer (links, hashtags). Keep ≤5000 chars.
tags Existing publish.tags, else derive 5–12 topical tags from scene titles + the brand. Comma-joined when passed to the tool.
category Default "22" (People & Blogs). Override per channel/topic — e.g. "28" (Science & Tech), "27" (Education), "24" (Entertainment).
thumbnail Look for out/thumbnail.* or public/thumbnail.*. If none and the user wants one, offer to generate via tools/ideogram4.py (see the ideogram4 skill).
privacy Default private (safe — the video uploads but stays hidden until you flip it). Offer unlisted, public, or a scheduled go-live (--publish-at, e.g. next morning ~09:00 local in UTC) if the user asks.
playlist Optional; only if the user has one.

Read the full file on GitHub · 168 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. 3d ago First seen · 168 lines · 7 tokens per session scan A 645d2801b8b1

Subscribe to this mod's changes

publish is a command published in the GitHub repository digitalsamba/claude-code-video-toolkit (2,035 stars, last pushed 2d ago), licensed MIT. It adds 7 tokens to every session and 1,916 once invoked, about $0.0000 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.