By omar-hanafy
Package-specific skills for the cached_video_thumbnail Flutter plugin: feed integration and performance tuning, error and cache diagnosis, hermetic testing without native code, and migration from the video_thumbnail package family.
Use when cached_video_thumbnail misbehaves - ThumbnailException errors (timeout, network, unsupportedMedia, extractionFailed), thumbnails failing instantly on retry, wrong or stale images, cache misses or repeated extraction, scroll jank blamed on thumbnails, black or rotated frames, HLS streams, or Android/iOS behavior differences.
Use when adding video thumbnails to a Flutter feed, grid, list, chat, or gallery with the cached_video_thumbnail package, when choosing ThumbnailSpec sizes, priorities, prefetch, or engine configuration, or when reviewing an existing integration for scroll jank and performance problems.
Use when replacing the video_thumbnail, flutter_video_thumbnail_plus, get_thumbnail_video, or fc_native_video_thumbnail package with cached_video_thumbnail, or when code still calls VideoThumbnail.thumbnailData, VideoThumbnail.thumbnailFile, or FcNativeVideoThumbnail and should move to the cached engine.
Use when writing or fixing unit/widget tests for Flutter code that uses cached_video_thumbnail - tests that must run hermetically under flutter test without native plugins, platform channels, or network, or that hit MissingPluginException / path_provider errors from ThumbnailEngine or VideoThumbnailImage.
Uses power tools
Uses Bash, Write, or Edit tools
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A high-performance video thumbnail engine for Flutter. Generates thumbnails from bundle assets, local files, and network URLs through a cached, scheduled, cancellable pipeline built for one goal: in an infinite, fast-flinging feed on a low-end device, thumbnail generation is never the reason the UI janks.
This repo ships an installable agent plugin - package-specific skills for
Claude Code and OpenAI Codex (Codex CLI and the ChatGPT desktop
app). It teaches your assistant this exact engine: feed integration with
physical-pixel specs, error/cache diagnosis, hermetic test setup, and
migration from the video_thumbnail package family. This is developer
tooling distributed from this Git repository; it is not a runtime feature
and is not part of the pub.dev archive.
Claude Code:
claude plugin marketplace add omar-hanafy/cached_video_thumbnail
claude plugin install cached-video-thumbnail@cached-video-thumbnail
OpenAI Codex:
codex plugin marketplace add omar-hanafy/cached_video_thumbnail
codex plugin add cached-video-thumbnail@cached-video-thumbnail
Start a new agent session after installing, then try:
Skills also trigger explicitly: /cached-video-thumbnail:integrate-feed-thumbnails
in Claude Code, $integrate-feed-thumbnails in Codex. Trust note: the
plugin is instructions and reference files only - no hooks, no MCP
servers, no executable scripts, no network access; the bundled Claude
agent is read-only. The plugin version tracks the package version, and its
skills target 0.1.x. Update with claude plugin update /
codex plugin marketplace upgrade; remove with claude plugin uninstall /
codex plugin remove. Details, capabilities, and troubleshooting:
doc/ai/README.md.
Existing packages give you a one-shot video -> image call. That is the easy
20%. The hard 80% is what happens when a feed asks for 40 thumbnails during a
fling: unbounded native decoders, no caching, no deduplication, no
cancellation, bytes shipped over the platform channel, and slow exact-frame
seeks. This package is an engine, not a converter:
| Capability | cached_video_thumbnail |
|---|---|
| Disk cache (deterministic keys, LRU, atomic writes) | yes |
| Cache hits without decoding (dims stored in the entry) | yes |
| Bounded native concurrency (default 2) | yes |
| Newest-first priority scheduling (visible > normal > prefetch) | yes |
| Identical requests coalesce into one extraction | yes |
| Cancellation (free pre-dispatch, native abort on iOS) | yes |
| Negative caching of recent failures | yes |
| Keyframe-fast seeks by default, exact frames opt-in | yes |
| Direct-to-file native encoding (no byte arrays over the channel) | yes |
| Typed errors, metrics, event hook | yes |
Native side: Kotlin MediaMetadataRetriever with OPTION_CLOSEST_SYNC and
getScaledFrameAtTime (decode-time downscaling); Swift
AVAssetImageGenerator with infinite tolerances by default, a precomputed
fit box, and per-request cancellation. No FFmpeg, no extra native
dependencies.
import 'package:cached_video_thumbnail/cached_video_thumbnail.dart';
// The simplest path: drop the provider into any Image widget.
Image(
image: VideoThumbnailImage(
VideoSource.network(Uri.parse('https://cdn.example.com/v.mp4')),
spec: const ThumbnailSpec(maxWidth: 480, maxHeight: 480),
),
fit: BoxFit.cover,
)
Or drive the engine directly:
final engine = ThumbnailEngine.instance;
final thumb = await engine.getThumbnail(
VideoSource.asset('assets/videos/intro.mp4'),
spec: const ThumbnailSpec(maxWidth: 320, maxHeight: 320),
);
// thumb.filePath, thumb.width, thumb.height, thumb.wasCached
VideoSource.asset('assets/videos/intro.mp4', package: 'my_pkg'); // bundle asset
VideoSource.file('/path/to/video.mp4'); // absolute path
VideoSource.network(url, headers: {'Authorization': 'Bearer t'}); // http(s)
evict if a
URL's content genuinely changed.npx claudepluginhub omar-hanafy/cached_video_thumbnail --plugin cached-video-thumbnailPackage-specific Claude Code skills and a read-only bridge reviewer for flutter_monaco.
Package-specific skills for the flutter_helper_utils Flutter package: exact BuildContext/theme/navigation APIs, color parsing and accessibility helpers, adaptive breakpoint UI, TypedListView/TypedSliverList widgets, the v8-to-v9 breaking migration, and version upgrades.
Package-specific skills for the scroll_spy Flutter package: integration, primary-selection tuning, diagnosis, performance optimization, v0.2-to-v1 migration, and visibility_detector conversion.
Package-specific skills for the dart_helper_utils Dart package: exact utility APIs (strings, maps, collections, dates, intl formatting), async timing tools (Debouncer, throttle, stream transformers), the v5-to-v6 breaking migration, and version upgrades.
Compile and verify large SVG sets as deterministic Flutter IconData fonts through a bundled GlyphPact MCP server and project integration skill.
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Complete creative writing suite with 10 specialized agents covering the full writing process: research gathering, character development, story architecture, world-building, dialogue coaching, editing/review, outlining, content strategy, believability auditing, and prose style/voice analysis. Includes genre-specific guides, templates, and quality checklists.
Develop, test, build, and deploy Godot 4.x games with Claude Code. Includes GdUnit4 testing, web/desktop exports, CI/CD pipelines, and deployment to Vercel/GitHub Pages/itch.io.
A growing collection of Claude-compatible academic workflow bundles. Covers scientific figures, manuscript writing and polishing, reviewer assessment, citation retrieval, data availability, paper reading, literature search, response letters, paper-to-PPTX conversion, and evidence-grounded Chinese invention patent drafting. Rules are organized as reusable skill folders with explicit workflows and quality checks.
Comprehensive PR review agents specializing in comments, tests, error handling, type design, code quality, and code simplification
Comprehensive feature development workflow with specialized agents for codebase exploration, architecture design, and quality review