image-object-detection

image-object-detection is a skill for Claude Code, Codex from cxcscmu/SkillLearnBench. It costs 19 tokens per session (441 once invoked), scanned A, original, MIT.

A Python and OpenCV approach for preparing images and finding repeated instances of a sample image inside a larger image. OpenCV is a computer-vision library, and template matching compares the sample with areas of the source image.

In plain words
What is it for?
Use it to convert images to grayscale, locate template matches, and count objects while grouping nearby matches to reduce duplicate counts.
Why use it?
It removes the need to count matching objects by hand when they have a similar appearance and position in an image.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to convert images to grayscale, locate template matches, and count objects while grouping nearby matches to reduce duplicate counts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cxcscmu/skilllearnbench/image-object-detection
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cxcscmu/SkillLearnBench --skill image-object-detection
Clone the repo
git clone --depth 1 https://github.com/cxcscmu/SkillLearnBench

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for image-object-detection

README.md
[![agentmods](https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/image-object-detection.svg)](https://agentmods.dev/skills/cxcscmu/skilllearnbench/image-object-detection)
Your own site
<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/image-object-detection"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/image-object-detection.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 441 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00019 $0.00441
Opus 5 $0.00010 $0.00220
Sonnet 5 $0.00004 $0.00088
Haiku 4.5 $0.00002 $0.00044

Measured 3d ago against content hash 15630662c02b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

image-object-detection scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/b1-one-shot-gemini-3-flash-preview/video-object-counting/image-object-detection/SKILL.md · 57 lines

What it actually says

Image Object Detection

This skill covers grayscale conversion and template matching using Python's opencv-python and numpy.

Grayscale Conversion

Converting an image to grayscale simplifies the data and is often a prerequisite for template matching.

import cv2

def convert_to_grayscale(image_path):
    img = cv2.imread(image_path)
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    cv2.imwrite(image_path, gray) # Overwrite original

Template Matching for Object Counting

Template matching finds instances of a small "template" image within a larger "source" image.

import cv2
import numpy as np

def count_objects(source_path, template_path, threshold=0.8):
    source = cv2.imread(source_path, 0) # Read as grayscale
    template = cv2.imread(template_path, 0) # Read as grayscale
    w, h = template.shape[::-1]

    res = cv2.matchTemplate(source, template, cv2.TM_CCOEFF_NORMED)
    loc = np.where(res >= threshold)
    
    # Group nearby matches to avoid double counting
    points = list(zip(*loc[::-1]))
    if not points:
        return 0
    
    rects = []
    for pt in points:
        rects.append([pt[0], pt[1], pt[0] + w, pt[1] + h])
    
    # Use cv2.groupRectangles to merge overlapping detections
    rects, weights = cv2.groupRectangles(rects, 1, 0.2)
    return len(rects)

Key Considerations:

  • Threshold: Adjust the threshold (usually 0.7 to 0.9) to balance precision and recall.
  • Scale: Template matching is sensitive to scale. Ensure the template and objects in the source are roughly the same size.
  • Preprocessing: Grayscale conversion is crucial for consistent results.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 57 lines · 19 tokens per session scan A 15630662c02b

Subscribe to this mod's changes

image-object-detection is a skill published in the GitHub repository cxcscmu/SkillLearnBench (83 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 441 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

ceo-setup

One-time onboarding for the executive/manager commitment workflow — delegation-heavy, meeting prep, decision capture, morning and evening digests. Creates a commitments project and installs two dashboard widgets. After successful setup this skill is excluded from selection until the marker file is deleted.

suyoumo/ClawProBench · 60 tokens

content-creator-setup

One-time onboarding for the content creator workflow — content pipeline stages, trend expiration, cross-platform cascades, heavy idea parking. After successful setup this skill is excluded from selection until the marker file is deleted.

suyoumo/ClawProBench · 47 tokens

github

GitHub API integration via HTTP tool with automatic credential injection.

suyoumo/ClawProBench · 13 tokens

idea-parking

Park interesting ideas for later consideration, resurface them periodically, and promote to commitments when ready.

suyoumo/ClawProBench · 23 tokens

agentsop-llm-artifact-versioning

Enhancement overlay — version the WHOLE deployable LLM-app artifact as one bundle: prompts + compiled programs + model snapshot pins + retrieval config + eval-set version, versioned together so a deploy is reproducible and rollback is atomic. Activate when preparing to deploy an LLM app, when asking "what exactly is…

agentsope/SkillAlchemy · 223 tokens

agentsop-llamaindex

Operating-system distillation of LlamaIndex — the leading RAG / document-agent framework. Activate when the calling agent must build, debug, harden, or evaluate a Retrieval-Augmented Generation pipeline over unstructured/private data, decide between RAG primitives (Index types, retrievers, query engines, routers…

agentsope/SkillAlchemy · 178 tokens