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,402
分支
275

安装方式

默认使用会先检查来源的 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 查看