SkillsGrove
SkillsGrove/숏폼 영상 및 크리에이터/tsukhani/jclaw/youtube-transcript

youtube-transcript

설치

$npx skills add https://github.com/tsukhani/jclaw --skill youtube-transcript
$git clone --depth 1 https://github.com/tsukhani/jclaw.git /tmp/jclaw && mkdir -p ~/.claude/skills && cp -r /tmp/jclaw/skills/youtube-transcript ~/.claude/skills/youtube-transcript
이 Agent Skill을 설치해 주세요: https://github.com/tsukhani/jclaw/tree/e6d2b5ef0f1a0a0f3b1e60097ef0a1ee0ffddcc5/skills/youtube-transcript — 먼저 SKILL.md와 스크립트를 읽고, 안전하다고 확인한 뒤에만 제 skills 폴더에 설치해 주세요.

요약

원문 설명 · MITRetrieve the transcript text from a YouTube video given a URL or video ID.
아래 SKILL.md는 tsukhani/jclaw(커밋 e6d2b5e)에서 MIT 라이선스에 따라 게시한 것입니다. 본문은 변경하지 않았으며, 파일 상단의 메타데이터만 생략하고 이미지는 링크로 표시하며 매우 긴 파일은 일부만 표시합니다. Copyright 2026 Abundent Sdn Bhd. 라이선스: LICENSE. 지침 파일만 표시되며 스크립트 등은 원본 저장소를 참고하세요.

YouTube Transcript

When asked to retrieve a transcript from a YouTube video:

  1. Extract the video ID

    • If the user provides a full URL (e.g. https://www.youtube.com/watch?v=VIDEO_ID or https://youtu.be/VIDEO_ID), parse out the 11-character video ID.
    • If the user provides just the raw video ID, use it directly.
  2. Fetch the transcript

    • Use the exec tool to run a one-liner Python script that calls the youtube_transcript_api library: python3 -c "from youtube_transcript_api import YouTubeTranscriptApi; api=YouTubeTranscriptApi(); t=api.fetch('VIDEO_ID'); print('TOTAL:{}'.format(len(t))); [print('{:06.2f}|{}'.format(s.start, s.text)) for s in t]"
      • The output is a series of lines: TOTAL:508 followed by entries like 72.50|Hello world
    • If it fails with ModuleNotFoundError, the library is missing: run python3 -m pip install "youtube-transcript-api==1.2.4" --quiet once with exec, then run the fetch again. Install only then, and only this version, which is the one the skill is tested with.
    • If the library raises any other error (e.g. TranscriptsDisabled, NoTranscriptFound, or connectivity issues), report the error text concisely and stop.
  3. Parse the response

    • Split the output by lines.
    • Skip the TOTAL: line (used only for verification).
    • For each remaining line: split on the first | — the left side is the timestamp in seconds (float), the right side is the caption text. Decode HTML entities on the caption text (e.g. &amp; → &, &quot; → ", &#39; → ', &lt; → <, &gt; → >).
    • Format each timestamp as [MM:SS] from the float seconds (e.g. 72.50 → [01:12]).
    • Combine each caption into a single line: [MM:SS] {decoded_text}.
    • Join all lines with a newline into the final transcript string.
  4. Deliver the result

    • If the combined transcript exceeds 4000 characters, save it to a file:
      • Create the directory youtube-transcript/ at the root of the workspace if it doesn't exist.
      • Write the content to youtube-transcript/{VIDEO_ID}-transcript.txt using the filesystem tool.
      • Report back with a markdown file link: [{VIDEO_ID}-transcript.txt](<youtube-transcript/{VIDEO_ID}-transcript.txt>)
    • If the transcript is short, return it directly in chat wrapped in a markdown code block for readability.
  5. Error handling

    • If the library or transcript fetch fails, report the error text concisely.
    • If the video has no captions/transcript available, report this plainly to the user.
    • Be concise and factual when reporting errors.

Output Location: If this skill generates files, they are written to youtube-transcript/ at the root of the agent's workspace (e.g., youtube-transcript/abc123-transcript.txt).

라이선스 전문 보기(MIT)
MIT License

Copyright (c) 2026 Abundent Sdn Bhd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.