Agent skill
sketch-ai-provider-debug
Debug OpenAI/Gemini image generation failures for Sketch Magic. Use when `/api/convert` returns 500, when models are unsupported, when outputs are empty, or when provider timeouts/quota errors appear.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/sketch-ai-provider-debug
SKILL.md
Sketch AI Provider Debug
Overview
Provide a consistent debug flow for image generation failures across OpenAI and Gemini providers without leaking secrets.
Workflow
1) Verify configuration
- Confirm
OPENAI_API_KEY/GEMINI_API_KEYexist. - Confirm
DEFAULT_PROVIDER,OPENAI_IMAGE_MODEL,GEMINI_IMAGE_MODELmatch supported models. - Use
/api/healthto confirm defaults.
2) Reproduce with a controlled request
- Use a tiny PNG and short prompt.
- Use
curlto hit/api/convert(multipart form data). - Keep logs visible (server + client).
3) Interpret common failures
- 500: provider error, missing key, quota, or model mismatch.
- 400: invalid image type, size, or prompt.
- Timeout: provider latency or host timeout config.
4) Fix or adjust
- Swap to a known-good model.
- Reduce image size or prompt complexity.
- Confirm provider SDK versions align with supported endpoints.
5) Report safely
- Do not log API keys or raw image bytes.
- Summarize error codes and timing only.
References
references/openai-image-api.mdreferences/gemini-image-api.md
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?