remove-similar-image
Analyze local image files with ImageHash and OpenCV to detect near-duplicate photos and blurry shots, then preview or remove them. Use when Codex needs to clean a photo folder, deduplicate similar images, identify blur, or safely delete/move bad images after reviewing a report.
What this skill does
# Remove Similar Image ## Core Goal - Scan one local image or a directory tree of local images. - Use ImageHash to cluster exact duplicates and near-duplicates. - Use OpenCV variance-of-Laplacian blur scoring to flag blurry shots. - Preview actions first, then permanently delete or move candidates to a trash folder when requested. ## Required Script - Use `scripts/remove_similar_images.py`. - Start with `doctor` if dependency availability is unknown. - Treat `analyze` without `--apply` as the safe default. - Prefer `--trash-dir` before permanent deletion so the user can review results. ## Dependency - This skill requires Pillow, ImageHash, numpy, and OpenCV: ```bash python3 -m pip install Pillow ImageHash numpy opencv-python-headless ``` - If `doctor` reports missing dependencies, stop and surface the install command instead of pretending the scan ran. ## Workflow 1. Check dependencies: ```bash python3 scripts/remove_similar_images.py doctor ``` 2. Preview similar groups and blurry images for a folder: ```bash python3 scripts/remove_similar_images.py analyze \ --input-path /path/to/photos ``` 3. Preview safe cleanup by moving similar non-keepers and blurry files into a trash folder: ```bash python3 scripts/remove_similar_images.py analyze \ --input-path /path/to/photos \ --delete-similar \ --delete-blurry \ --trash-dir /path/to/review-trash ``` 4. Apply the move after the preview looks correct: ```bash python3 scripts/remove_similar_images.py analyze \ --input-path /path/to/photos \ --delete-similar \ --delete-blurry \ --trash-dir /path/to/review-trash \ --apply ``` 5. Permanently delete only similar non-keepers: ```bash python3 scripts/remove_similar_images.py analyze \ --input-path /path/to/photos \ --delete-similar \ --apply ``` ## Main Arguments - `--input-path`: source image file or directory. - `--no-recursive`: scan only the top-level directory. - `--extra-extension`: include additional suffixes not covered by default. - `--limit`: cap the number of scanned files for quick tests. - `--hash-method`: `phash`, `dhash`, `ahash`, or `whash`. - `--hash-size`: larger hashes are stricter and slower. - `--similar-threshold`: maximum Hamming distance considered similar. - `--blur-threshold`: Laplacian-variance cutoff for blurry images. - `--keep-policy`: choose the keeper in each similar group with `best`, `largest`, `newest`, or `oldest`. - `--delete-similar`: mark non-keeper files in similar groups as removal candidates. - `--delete-blurry`: mark blurry files as removal candidates even when they are unique. - `--trash-dir`: move files into a review directory instead of permanently deleting. - `--apply`: execute removals or moves. Without this flag the script only reports. - `--report-json`: save a machine-readable report for later review. - `--print-json`: print the full report as JSON to stdout. ## Default Heuristics - Default similarity detection uses `phash` with `hash_size=8` and `similar-threshold=5`. - Default blur detection uses a variance-of-Laplacian cutoff of `100.0`. - Default `keep-policy=best` prefers non-blurry images, then sharper images, then larger images. - Similar groups are connected components: if `A` is close to `B`, and `B` is close to `C`, they are treated as one group even if `A` and `C` are slightly farther apart. ## Usage Notes - Review the preview before adding `--apply`. - Use `--trash-dir` for the first pass on any valuable photo collection. - Lower `--similar-threshold` to be stricter. Raise it when near-duplicates are being missed. - Lower `--blur-threshold` if too many acceptable images are marked blurry. Raise it when obvious blur is missed. - Expect format support to follow Pillow and OpenCV availability in the local environment. ## Output - Text mode prints scan counts, similar groups, blurry images, and planned or applied actions. - JSON mode includes per-image metadata, unreadable files, similar groups, planned actions, and action results. ## Script - `scripts/remove_similar_images.py`
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.