Skip to main content

gemini-feedback

Get feedback from Gemini API on a diagram image for textbook quality review.

설치로 이동

소스 정보

저장소
natolambert/rlhf-book
최근 소스 활동
2026년 2월 16일 21:33
감지된 SKILL.md 언어
영어
스타
2,391
포크
271

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
gemini-feedback
description
Get feedback from Gemini API on a diagram image for textbook quality review.
allowed-tools
Bash(uv run python:*), Read
# Gemini Feedback Get feedback from Gemini API on a diagram image. ## Usage ``` /gemini-feedback <path-to-image> [context] ``` ## Instructions When this command is invoked: 1. Read the image file at the provided path 2. Call the Gemini API to get feedback on the diagram 3. Use this Python snippet to call Gemini (uses the newer `google-genai` package): ```python import base64 import os from google import genai client = genai.Client(api_key=os.environ['GEMINI_API_KEY']) with open('<IMAGE_PATH>', 'rb') as f: img_bytes = f.read() prompt = '''Review this diagram for a textbook. Be concise and specific. Context: <CONTEXT> Please provide: 1. Overall assessment (1-2 sentences) 2. Specific issues to fix (be detailed about visual problems like alignment, overlapping, etc.) 3. Suggestions for improvement ''' response = client.models.generate_content( model='gemini-2.5-flash', contents=[ prompt, genai.types.Part.from_bytes(data=img_bytes, mime_type='image/png'), ], ) print(response.text) ``` 4. Replace `<IMAGE_PATH>` with the actual path provided 5. Replace `<CONTEXT>` with any context provided, or use "Technical diagram for ML/AI textbook" 6. Ensure GEMINI_API_KEY is set in environment 7. Run using: `uv run python -c "..."` 8. Present the feedback to the user ## Example ``` /gemini-feedback diagrams/generated/png/tool_use_generation.png "Diagram showing tool use interleaving in LLM generation" ```
GitHub에서 보기