khatt-predict3: a 46-line zero-dependency skill for agent image generation with RTL self-verification
Yuri_Aura · reddit · 2026-12-02
Solo open-source author releases khatt-predict3 (v1.0.0, MIT), a minimal skill letting coding agents (Cursor, Claude Code, Codex CLI, Antigravity) generate and visually verify images without headless browsers or heavy SDKs:
- 46-line pure-stdlib Python (gen.py), auth via X-goog-api-key header, with a UTF-8 BOM-safe .env loader so Windows-edited .env files don't break key parsing.
- Three Gemini image tiers: fast (gemini-2.5-flash-image), smart (gemini-3.1-flash-image-preview), pro (gemini-3-pro-image-preview).
- 4th-arg image-to-image editing: pass an existing image path to edit or refine an asset.
- Zero-browser RTL self-healing loop: the agent inspects the saved PNG with its multimodal vision tool and retries up to 2x on pro if Arabic glyphs, ligatures or direction are wrong — no Playwright needed.
- Guardrails: per-user daily quota via KHATTDAILYLIMIT; clean detection of Free Tier "limit: 0" when Tier 1 billing isn't enabled.
- Installers for four agents plus a ChatGPT OpenAPI 3.1 schema.
More from coding & agent
- Stardock CEO Brad Wardell Shares His Full AI Agent Game-Dev Workflow: Catalog First, Then a Producer Agent — draginol · 2026-12-02
- Indie dev kills Google Docs-style comment threads for drafts, ships a simple share button instead — alfred_lua · 2026-12-02
- Indie dev resists adding Google Docs-style comments despite Claude Code making it trivial — alfred_lua · 2026-12-02
- Scope creep warning: Claude Code can ship it in an hour, but should you? — alfred_lua · 2026-12-02
- LangChain Academy Runs Three-Day Agentic Advent Week Workshops on Agents Starting Dec 8 — LangChain · 2026-12-02
- Google Docs comment threads are most useful and Claude Code can clone them in minutes—yet something felt off — alfred_lua · 2026-12-02