Communitygithub.com

majiayu000/claude-skill-registry

스크립트를 통해 Google Gemini File API로 파일을 업로드하고 관리합니다. 이미지, 오디오, 비디오, PDF 등 다양한 파일을 Gemini 모델에서 사용할 수 있도록 업로드, 상태 확인, 파일 관리 기능을 제공합니다. "upload file", "file API", "upload image", "upload PDF", "upload video", "file management" 등의 명령어로 트리거됩니다.

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

이 스킬은 Google Gemini File API를 활용하여 이미지, 오디오, 비디오, PDF 등 다양한 파일 형식을 업로드하고 관리하는 방법을 제공합니다. 개발자는 제공된 Python 스크립트를 사용하여 파일을 업로드하고, 상태를 확인하며, 사용자 지정 이름을 지정할 수 있습니다. 특히 `--wait` 플래그를 사용하면 파일이 처리 완료될 때까지 기다린 후 즉시 Gemini 모델에서 사용할 수 있어, 비디오 분석, 문서 처리, 오디오 전사 등 대용량 파일 작업에 유용합니다. 이 스킬은 gemini-text, gemini-image, gemini-batch, gemini-embeddings와 같은 다른 Gemini 스킬과 통합되어 다중 모드 워크플로우를 구성할 수 있습니다. CLI 환경에서 직접 실행 가능하며, Python API를 통한 프로그래밍 방식의 파일 관리도 지원합니다. 파일 크기 제한, MIME 타입 자동 감지, 처리 상태 모니터링 등 파일 생애주기를 효율적으로 관리할 수 있는 모범 사례를 함께 제공합니다.

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

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

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

문서

Gemini File API

Gemini 모델에서 사용할 파일을 실행 가능한 스크립트를 통해 업로드하고 관리합니다. 이미지, 오디오, 비디오, PDF 및 기타 파일 유형을 지원합니다.

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

다음과 같은 상황에서 이 스킬을 사용하세요:

  • 다중 모드 분석을 위한 이미지 업로드
  • 콘텐츠 처리를 위한 비디오 업로드
  • 문서 분석을 위한 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 <uploaded-file-path>

일반적인 문제

"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

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

Conduct domain and industry research. Use when the user says "lets create a research report on [domain or industry]

majiayu000/claude-skill-registry

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

관련 스킬