Communitygithub.com

majiayu000/claude-skill-registry

스크립트를 통해 Google Gemini File API를 사용하여 파일을 업로드하고 관리합니다. 이미지, 오디오, 비디오, PDF 등 다양한 파일 형식을 Gemini 모델과 함께 사용할 수 있도록 지원합니다. 파일 업로드, 상태 확인 및 파일 관리 기능을 제공합니다.

claude-skill-registry란 무엇인가요?

이 스킬은 Google Gemini File API와 상호작용할 수 있는 실행 가능한 스크립트 모음입니다. 사용자는 이미지, 오디오, 비디오, PDF 및 기타 파일 형식을 Gemini 모델에 업로드하고 관리할 수 있습니다. 주요 특징으로는 사용자 정의 이름으로 파일 업로드, 처리 완료 대기(--wait 플래그), 파일 상태(PROCESSING, ACTIVE, FAILED) 확인 등이 있습니다. 이 스킬은 gemini-text, gemini-image, gemini-batch, gemini-embeddings와 같은 다른 Gemini 스킬과 원활하게 통합되어 다중 모드 분석, 문서 처리, 배치 작업 등을 가능하게 합니다. 사용자는 업로드된 파일을 참조하여 고급 AI 워크플로우를 구축할 수 있습니다.

지원 대상✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/majiayu000/claude-skill-registry/tree/HEAD/skills/data/gemini-files

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Gemini File API

실행 가능한 스크립트를 통해 이미지, 오디오, 비디오, PDF 및 기타 파일 형식을 Gemini 모델과 함께 사용할 수 있도록 파일을 업로드하고 관리합니다.

이 스킬을 사용해야 하는 경우

다음과 같은 경우에 이 스킬을 사용하세요:

  • 다중 모드 분석을 위한 이미지 업로드
  • 콘텐츠 처리를 위한 비디오 업로드
  • 문서 분석을 위한 PDF 업로드
  • 전사 또는 처리를 위한 오디오 업로드
  • 배치 작업을 위한 파일 사전 업로드
  • 파일 처리 상태 확인
  • 업로드된 파일 목록 및 관리
  • 다른 Gemini 스킬(텍스트, 이미지 등)과 함께 파일 사용

사용 가능한 스크립트

scripts/upload.py

목적: Gemini File API에 파일 업로드

사용 시기:

  • Gemini 처리를 위한 모든 파일 업로드
  • 다중 모드 생성을 위한 파일 준비
  • 분석을 위한 문서 업로드
  • 배치 파일 준비

주요 매개변수:

매개변수설명예시
path파일 경로 (필수)image.jpg
--name, -n표시 이름"my-document"
--wait, -w처리 완료 대기플래그

출력: 파일 이름, URI 및 상태 정보

워크플로우

워크플로우 1: 기본 파일 업로드

python scripts/upload.py image.jpg
  • 용도: 빠른 업로드, 간단한 파일
  • 출력: API 사용을 위한 파일 이름 및 URI
  • 상태: PROCESSING 또는 ACTIVE

워크플로우 2: 사용자 정의 이름으로 업로드

python scripts/upload.py document.pdf --name "2026년 4분기 분기별 보고서"
  • 용도: 파일 구성, 업로드 추적
  • 사용 시기: 원본 파일 이름이 충분히 설명적이지 않은 경우
  • 표시 이름: 파일 목록에 표시됨

워크플로우 3: 업로드 후 처리 완료 대기

python scripts/upload.py video.mp4 --wait
  • 용도: 대용량 파일, 비디오, 오디오
  • 파일이 ACTIVE 상태가 될 때까지 대기
  • 사용 시기: 업로드 후 즉시 파일을 사용해야 하는 경우

워크플로우 4: 분석을 위한 이미지 업로드

# 1. 이미지 업로드
python scripts/upload.py photo.png --name "제품-사진"

# 2. gemini-text를 사용하여 분석
python skills/gemini-text/scripts/generate.py "이 이미지를 설명해주세요" --image photo.png
  • 용도: 이미지 분석, 캡셔닝, 시각적 Q&A
  • 다음과 결합: gemini-text를 사용한 다중 모드 처리

워크플로우 5: 콘텐츠 추출을 위한 PDF 업로드

# 1. PDF 업로드
python scripts/upload.py research-paper.pdf --name "AI-연구-논문" --wait

# 2. gemini-text로 콘텐츠 추출
python skills/gemini-text/scripts/generate.py "이 문서에서 주요 결과를 추출해주세요" --image research-paper.pdf
  • 용도: 문서 처리, 콘텐츠 추출
  • 다음과 결합: gemini-text를 사용한 분석

워크플로우 6: 배치를 위한 여러 파일 업로드

# 1. 여러 파일 업로드
for file in *.jpg; do
    python scripts/upload.py "$file"
done

# 2. 업로드된 파일을 사용하여 배치 작업 생성 (gemini-batch 스킬)
  • 용도: 배치 처리를 위한 파일 준비
  • 다음과 결합: gemini-batch를 사용한 대량 작업

워크플로우 7: 전사를 위한 오디오 업로드

# 1. 오디오 업로드
python scripts/upload.py interview.mp3 --name "인터뷰-001" --wait

# 2. gemini-text로 처리 (전사 가능한 경우)
python skills/gemini-text/scripts/generate.py "이 오디오를 전사하고 요약해주세요" --image interview.mp3
  • 용도: 오디오 처리, 전사, 팟캐스트 분석
  • 다음과 결합: gemini-text를 사용한 오디오 분석

워크플로우 8: 콘텐츠 분석을 위한 비디오 업로드

# 1. 비디오 업로드 (시간이 걸릴 수 있음)
python scripts/upload.py product-demo.mp4 --name "데모-비디오" --wait

# 2. gemini-text로 분석
python skills/gemini-text/scripts/generate.py "이 제품 데모 비디오를 분석해주세요" --image product-demo.mp4
  • 용도: 비디오 분석, 콘텐츠 요약
  • 참고: 비디오는 상당한 처리 시간이 필요할 수 있음

매개변수 참조

지원되는 파일 형식

유형확장자최대 크기처리 시간
이미지jpg, jpeg, png, gif, webp20MB몇 초
오디오mp3, wav, aac, flac25MB몇 초~몇 분
비디오mp4, mov, avi, webm2GB몇 분~몇 시간
문서pdf, txt50MB몇 초~몇 분

MIME 유형

스크립트가 확장자를 기반으로 자동 감지:

  • 이미지: image/jpeg, image/png, image/gif, image/webp
  • 오디오: audio/mpeg, audio/wav
  • 비디오: video/mp4, video/quicktime, video/webm
  • 문서: application/pdf, text/plain

파일 상태

상태설명사용 가능 여부
PROCESSING파일이 분석 중입니다아니요
ACTIVE파일이 준비되었습니다예
FAILED처리에 실패했습니다아니요

출력 해석

업로드 응답

Uploading photo.png...
Uploaded: files/abc123...
URI: gs://generation-tmp/abc123...
State: PROCESSING
  • 파일 이름: API 호출에 사용
  • URI: 내부 Google Cloud Storage 참조
  • 상태: PROCESSING = 대기, ACTIVE = 준비

--wait 플래그 사용 시

Uploading video.mp4...
Uploaded: files/xyz789...
URI: gs://generation-tmp/xyz789...
State: PROCESSING
Waiting for processing...
Still processing...
File ready!
  • 스크립트가 상태가 ACTIVE가 될 때까지 폴링
  • 처리가 필요한 대용량 파일에 사용
  • 비디오의 경우 몇 분이 소요될 수 있음

업로드된 파일 사용

업로드 후 파일 이름으로 참조:

# gemini-text와 함께 사용
python skills/gemini-text/scripts/generate.py "분석" --image <업로드된-파일-경로>

일반적인 문제

"google-genai가 설치되지 않음"

pip install google-genai

"파일을 찾을 수 없음"

  • 파일 경로가 올바른지 확인
  • 상대 경로가 실패하면 절대 경로 사용
  • 파일 확장자가 지원되는 형식인지 확인

"파일이 너무 큼"

  • 파일 형식의 크기 제한 확인
  • 가능하면 이미지/비디오 압축
  • 대용량 파일을 더 작은 부분으로 분할

"지원되지 않는 파일 형식"

  • 지원되는 확장자 확인
  • 가능하면 지원되는 형식으로 변환
  • 이미지: jpg, png, gif, webp
  • 비디오: mp4, mov, avi, webm

"처리 실패"

  • 파일이 손상되지 않았는지 확인
  • 파일을 다시 업로드해 보세요
  • 파일 형식이 유효한지 확인
  • API 할당량 제한 확인

"파일이 아직 처리 중입니다" (--wait 없이)

  • 파일 상태가 PROCESSING이고 ACTIVE가 아님
  • --wait 플래그를 사용하거나 나중에 상태 확인
  • 대용량 파일(특히 비디오)은 시간이 걸림
  • 처리하는 데 몇 분에서 몇 시간이 소요될 수 있음

모범 사례

업로드 전략

  • 즉시 사용할 파일에는 --wait 사용
  • 시간을 절약하려면 배치 업로드 시 --wait 건너뛰기
  • 구성을 위해 설명적인 --name 사용
  • 나중에 사용할 수 있도록 파일 이름 추적

파일 구성

  • 일관된 명명 규칙 사용
  • 이름에 날짜 또는 버전 포함
  • 관련 파일을 함께 그룹화
  • 코드에 파일 이름 문서화

성능 팁

  • 별도의 프로세스로 여러 파일을 병렬 업로드
  • 배치 작업을 위해 파일 사전 업로드
  • API 호출에서 사용하기 전에 파일 상태 확인
  • 오래된 파일을 삭제하여 스토리지 관리

오류 처리

  • 업로드 후 반환 상태 확인
  • 실패한 업로드 재시도
  • 업로드 전 파일 무결성 확인
  • 감사 추적을 위해 파일 이름 기록

다른 스킬과의 통합

  • gemini-text: 다중 모드 분석, 문서 처리
  • gemini-image: 업로드된 참조를 기반으로 이미지 생성
  • gemini-batch: 배치 작업에서 업로드된 파일 사용
  • gemini-embeddings: 파일 콘텐츠에서 임베딩 생성

파일 수명 주기

  • 업로드 → PROCESSING → ACTIVE → API에서 사용
  • 오래된 파일을 삭제하여 스토리지 확보
  • 파일은 특정 기간 후에 만료될 수 있음
  • 백업을 위해 중요한 파일 다운로드

관련 스킬

  • gemini-text: 텍스트 생성을 통해 업로드된 파일 분석
  • gemini-image: 업로드된 참조를 기반으로 이미지 생성
  • gemini-batch: 배치 처리에서 업로드된 파일 사용
  • gemini-embeddings: 파일 콘텐츠에서 임베딩 생성

빠른 참조

# 기본 업로드
python scripts/upload.py image.jpg

# 사용자 정의 이름
python scripts/upload.py document.pdf --name "내 문서"

# 처리 완료 대기
python scripts/upload.py video.mp4 --wait

# 여러 파일
for file in *.jpg; do python scripts/upload.py "$file"; done

파일 관리 API

스크립트에 포함되어 있지 않지만 Python을 통해 파일을 관리할 수도 있습니다:

from google import genai

client = genai.Client()

# 모든 파일 나열
for file in client.files.list():
    print(f"{file.name}: {file.display_name} ({file.state})")

# 파일 정보 가져오기
file = client.files.get(name="files/abc123...")
print(f"상태: {file.state}")

# 파일 삭제
client.files.delete(name="files/abc123...")

참고 자료

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

majiayu000/claude-skill-registry

Builds, edit or validate Agent Skill through conversational discovery. Use when the user requests to "Create an Agent", "Optimize an Agent" or "Edit an Agent".

majiayu000/claude-skill-registry

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry

Edit existing BMAD agents while maintaining compliance

majiayu000/claude-skill-registry

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry

Edit existing BMAD modules while maintaining coherence

majiayu000/claude-skill-registry

Analyzes current state and user query to answer BMad questions or recommend the next workflow or agent. Use when user says what should I do next, what do I do now, or asks a question about BMad

majiayu000/claude-skill-registry

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry

Build AI agents with Google ADK Python (Agent Development Kit). Use for multi-agent systems, workflow agents (sequential/parallel/loop), Vertex AI deployment, tool integration, human-in-the-loop.

majiayu000/claude-skill-registry

Portfolio allocation and rebalancing optimizer. Manages asset allocation across stocks/cash/bonds, performs periodic rebalancing, and ensures diversification according to market regime and risk tolerance.

majiayu000/claude-skill-registry

Create a hilarious and ultra-realistic video of an anthropomorphic animal acting like a human vlogger in a real-world setting.

majiayu000/claude-skill-registry

Speech-to-text transcription and translation via OpenAI Audio API -- models, response formats, timestamps, prompting, streaming, chunking, and diarization

majiayu000/claude-skill-registry

BlockRun works with Claude Code and Google Antigravity.

majiayu000/claude-skill-registry

This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.

majiayu000/claude-skill-registry

小省导购员数字人带货版即梦视频提示词生成系统,基于四大智能体协同(提示词生成师、质量管控师、知识库运维师、跨环节适配师),按照"主体+运动+场景+(镜头语言+光影+氛围)"公式输出中英文双版提示词,适配5s短视频。确保人物一致性、视觉连贯性、情绪连贯性,支持知识库智能复用和跨工具适配(Suno音乐、AI绘画),为数字人带货视频提供高质量提示词生成服务。

majiayu000/claude-skill-registry

Upload and manage files using Google Gemini File API via scripts/. Use for uploading images, audio, video, PDFs, and other files for use with Gemini models. Supports file upload, status checking, and file management. Triggers on "upload file", "file API", "upload image", "upload PDF", "upload video", "file management".

majiayu000/claude-skill-registry

CRITICAL: Use for MolyKit AI chat toolkit. Triggers on: BotClient, OpenAI, SSE streaming, AI chat, molykit, PlatformSend, spawn(), ThreadToken, cross-platform async, Chat widget, Messages, PromptInput, Avatar, LLM

majiayu000/claude-skill-registry

AI and machine learning workflow covering LLM application development, RAG implementation, agent architecture, ML pipelines, and AI-powered features.

majiayu000/claude-skill-registry

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry

Analyze images/audio/video with Gemini API (better vision than Claude). Generate images (Imagen 4), videos (Veo 3). Use for vision analysis, transcription, OCR, design extraction, multimodal AI.

majiayu000/claude-skill-registry

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

관련 스킬