Kaleido is a Python library for static image export of Plotly figures (PNG, SVG, PDF, etc.) by rendering them in a headless Chrome browser via the DevTools protocol. The library provides both async and sync APIs, with an optional singleton server mode for reuse across calls. It manages a pool of browser tabs for parallel rendering, supports chunked JSON transfer for large figures (>10MB), and includes profiling capabilities. The architecture is centered around the `Kaleido` class, which orchestrates browser lifecycle, tab allocation, and rendering through `_KaleidoTab` instances. The library is consumed by Plotly.py and can be used standalone or via CLI tools (`kaleido_mocker`, `kaleido_get_chrome`). Dependencies include `choreographer` (Python-DevTools bridge), `orjson`, and `logistro`. The test suite includes extensive integration tests with hundreds of Plotly figure mocks covering a vast range of trace types and layout features.
unslop is a CLI tool that empirically detects repetitive defaults in AI-generated outputs (text or visual) and produces a reusable instruction file (skill.md) to eliminate those patterns. It works by generating a set of prompts for a given domain, running them through Claude Code to produce samples, analyzing the samples for repeated patterns (phrases, structures, visual defaults), and writing a focused 'unslop profile' that tells the model what to avoid. The tool supports both text domains (blog writing, emails, tutorials) and visual domains (landing pages, UI mockups) with optional screenshot rendering via Playwright. The architecture is a single Python script (unslop.py) that orchestrates a multi-step pipeline: prompt generation, sample generation via parallel Claude Code calls, screenshot rendering (visual only), pattern analysis, skill file generation, and a before/after comparison. It uses asyncio for concurrency, a custom terminal UI with live spinners and progress bars, and a robust subprocess wrapper for the Claude CLI that handles streaming JSON output, timeouts, retries, and permission denials. Key entry points are the CLI arguments (--domain, --type, --count, --concurrency, etc.) and the main async run() function. External dependencies are the Claude Code CLI (claude command), Python 3.10+, and optionally Playwright for visual domains. The output is a directory (unslop-output/) containing the skill file, analysis, prompts, samples, screenshots, and before/after comparison. The code demonstrates solid async patterns, clean separation of concerns within a single file, and a well-designed terminal UI abstraction. It is not a library but a self-contained tool that could be adapted for other AI model backends by replacing the claude() function.