youtube-full
YouTube: video management, transcript extraction, channel analytics, comments, playlists, upload
What this skill does
## youtube-full
## Purpose
This skill provides tools for interacting with YouTube's API to handle video management, transcript extraction, channel analytics, comments, playlists, and uploads, enabling automation in scripts or applications.
## When to Use
Use this skill for tasks involving YouTube data, such as fetching video transcripts in content analysis, uploading user-generated videos, analyzing channel performance for reports, or managing playlists in media apps. Apply it when Google API access is available and tasks require real-time data extraction or manipulation.
## Key Capabilities
- Video management: Retrieve, search, or delete videos using YouTube Data API v3 endpoints like /youtube/v3/videos.
- Transcript extraction: Fetch captions for videos via the /youtube/v3/captions endpoint, supporting languages like English or auto-generated transcripts.
- Channel analytics: Access metrics such as view counts and subscriber data from /youtube/v3/channels, including parameters for date ranges.
- Comments: Read or post thread comments using /youtube/v3/commentThreads, with moderation flags for spam handling.
- Playlists: Create, update, or delete playlists via /youtube/v3/playlists, including adding video items.
- Upload: Handle video uploads with multipart POST to /youtube/v3/videos, requiring resumable sessions for large files.
## Usage Patterns
Invoke this skill via function calls in your AI agent's code, passing required parameters like video IDs or API keys. Always check for authentication first by setting $YOUTUBE_API_KEY as an environment variable. For example, structure requests in a loop for batch operations, like processing multiple video transcripts. Use JSON payloads for POST requests and query parameters for GET requests. Handle rate limits by adding delays between API calls, e.g., sleep for 1 second after every 10 requests.
## Common Commands/API
- To list videos: Use GET https://www.googleapis.com/youtube/v3/search?part=snippet&q=query&key=$YOUTUBE_API_KEY with query string parameters.
- For transcript extraction: GET https://www.googleapis.com/youtube/v3/captions?videoId=VIDEO_ID&key=$YOUTUBE_API_KEY, then parse the JSON response for text.
- Code snippet for fetching video details:
```python
import requests; import os
api_key = os.environ.get('YOUTUBE_API_KEY')
response = requests.get(f'https://www.googleapis.com/youtube/v3/videos?part=snippet&id=VIDEO_ID&key={api_key}')
data = response.json()
```
- To upload a video: POST https://www.googleapis.com/upload/youtube/v3/videos?part=snippet,status with multipart/form-data, including fields like title and file.
- For channel analytics: GET https://www.googleapis.com/youtube/v3/channels?part=statistics&id=CHANNEL_ID&key=$YOUTUBE_API_KEY, returning JSON with metrics like viewCount.
- Playlist management: POST https://www.googleapis.com/youtube/v3/playlists?part=snippet with JSON body {"snippet": {"title": "New Playlist"}}.
## Integration Notes
Integrate by importing the skill in your AI agent's codebase and ensuring $YOUTUBE_API_KEY is set in the environment for OAuth or API key authentication. Use a config file like JSON for storing endpoint defaults, e.g., {"base_url": "https://www.googleapis.com/youtube/v3"}. For secure handling, avoid hardcoding keys; instead, use libraries like google-auth in Python. If using OAuth, redirect users for token exchange, but for simple API access, $YOUTUBE_API_KEY suffices. Test integrations in a sandbox environment to avoid quota exceedance.
## Error Handling
Check HTTP status codes in responses; for example, if status == 403, log "Quota exceeded" and retry after a delay. Handle specific YouTube errors like invalid video IDs (error code 404) by validating inputs before requests. Use try-except blocks in code for network issues:
```python
try:
response = requests.get(url)
response.raise_for_status()
except requests.exceptions.HTTPError as err:
print(f"Error: {err} - Check API key or parameters")
```
Implement exponential backoff for rate limit errors (e.g., 403 with quota message), waiting 2^x seconds before retrying up to 3 times. Log all errors with context, such as the API endpoint and parameters used.
## Usage Examples
1. Extract transcript for a specific video: First, set $YOUTUBE_API_KEY. Then, call the API with GET https://www.googleapis.com/youtube/v3/captions?videoId=VIDEO_ID&key=$YOUTUBE_API_KEY. In code, parse the response to extract text: import json; transcript = [item['text'] for item in response.json()['items']]. Save the output to a file for further processing.
2. Upload a video to a channel: Ensure $YOUTUBE_API_KEY is set and you have upload permissions. Use POST https://www.googleapis.com/upload/youtube/v3/videos with multipart data including the video file and JSON metadata like {"snippet": {"title": "Uploaded Video"}}. After upload, retrieve the video ID from the response and update its status if needed.
## Graph Relationships
- Relates to: google-api (for shared authentication and endpoints)
- Depends on: authentication-service (for handling $YOUTUBE_API_KEY)
- Connects to: video-processing skills (for post-extraction analysis)
- Integrates with: storage-services (for managing uploaded files)
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.