evo-template-matching-counter

evo-template-matching-counter is a skill for Claude Code, Codex from OpenLAIR/OpenSkill. It costs 52 tokens per session (632 once invoked), scanned A, original, Apache-2.0.

An image-analysis tool that counts matching game objects such as coins, enemies, and turtles in grayscale keyframes. It compares each image with a supplied example object and removes duplicate detections before writing counts to CSV.

In plain words
What is it for?
Use it to load object templates, count each object type in keyframe images, and export frame IDs with the resulting counts.
Why use it?
It turns gameplay footage into per-frame object counts instead of requiring someone to count sprites manually. Duplicate overlapping matches are filtered out.

Skill for Claude CodeCodex

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

Good fit Use it to load object templates, count each object type in keyframe images, and export frame IDs with the resulting counts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/openlair/openskill/evo-template-matching-counter
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 OpenLAIR/OpenSkill --skill evo-template-matching-counter
Clone the repo
git clone --depth 1 https://github.com/OpenLAIR/OpenSkill

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 evo-template-matching-counter

README.md
[![agentmods](https://agentmods.dev/badge/skills/openlair/openskill/evo-template-matching-counter/github.svg)](https://agentmods.dev/skills/openlair/openskill/evo-template-matching-counter)
Your own site
<a href="https://agentmods.dev/skills/openlair/openskill/evo-template-matching-counter"><img src="https://agentmods.dev/badge/skills/openlair/openskill/evo-template-matching-counter/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for evo-template-matching-counter

Your own site · 80×15
<a href="https://agentmods.dev/skills/openlair/openskill/evo-template-matching-counter"><img src="https://agentmods.dev/badge/skills/openlair/openskill/evo-template-matching-counter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 632 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.00052 $0.00632
Opus 5 $0.00026 $0.00316
Sonnet 5 $0.00010 $0.00126
Haiku 4.5 $0.00005 $0.00063

Measured yesterday against content hash b55201351c6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

evo-template-matching-counter 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/counter_utils.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

tasks-evolved/mario-coin-counting/environment/skills/evo-template-matching-counter/SKILL.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

evo-template-matching-counter

Overview

Counts game sprites (coins, enemies, turtles) in grayscale keyframe images using OpenCV template matching with NMS deduplication, outputs results to CSV.

Key Concepts

  • Uses cv2.TM_CCOEFF_NORMED - normalized correlation coefficient, best for rigid 2D pixel art
  • Default threshold: 0.8 (optimal for Super Mario sprites with MP4 compression artifacts)
  • Non-Maximum Suppression (NMS) with IoU overlap threshold of 0.3 to deduplicate detections
  • Both frame and template MUST be grayscale (single channel) for matching
  • np.where(result >= threshold) returns (y_coords, x_coords) - row/column order
  • Template must be smaller than frame in both dimensions
  • CSV output columns: frame_id (full path like /root/keyframes_001.png), coins, enemies, turtles

Functions

load_template(template_path)

Loads template image as grayscale. Returns 2D numpy array.

non_max_suppression(boxes, overlap_thresh=0.3)

Malisiewicz et al. NMS algorithm. Input: (N,4) array of [x1,y1,x2,y2]. Returns filtered boxes.

count_objects_in_frame(frame_gray, template_gray, threshold=0.8, nms_overlap=0.3)

Counts single object type in a frame. Returns integer count.

count_all_objects_in_frame(frame_path, templates_dict, threshold=0.8, nms_overlap=0.3)

Counts all object types in one frame. templates_dict maps label->template array. Returns dict of counts.

generate_results_csv(frame_paths, templates_dict, output_csv, threshold=0.8, nms_overlap=0.3)

Processes all keyframes and writes CSV with columns: frame_id, coins, enemies, turtles. Returns DataFrame.

Usage

import sys
sys.path.insert(0, '/app/environment/skills/evo-template-matching-counter/scripts')
from counter_utils import load_template, generate_results_csv

# Load templates as grayscale
templates = {
    "coins": load_template('/root/coin.png'),
    "enemies": load_template('/root/enemy.png'),
    "turtles": load_template('/root/turtle.png'),
}

# frame_paths from extraction step
frame_paths = [f'/root/keyframes_{i:03d}.png' for i in range(1, 28)]

# Generate CSV
df = generate_results_csv(frame_paths, templates, '/root/counting_results.csv', threshold=0.8)

Read the full file on GitHub · 59 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 59 lines · 52 tokens per session scan A b55201351c6b

Subscribe to this mod's changes

evo-template-matching-counter is a skill published in the GitHub repository OpenLAIR/OpenSkill (90 stars, last pushed 2d ago), licensed Apache-2.0. It adds 52 tokens to every session and 632 once invoked, about $0.0003 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-11.

Related

Other skills, from other repositories

map-blockout

Procedurally design an AAA-style open-world FPS map blockout (roads, POIs, fields, forests/treelines, railway/bridges) from a landscape, validate it through gated checks, and materialize it into engine geometry. Use when the user asks to block out or lay out an open-world/FPS map, place roads/POIs/forests/railways…

kevinpbuckley/VibeUE · 104 tokens

Cursor rules for ASCII simulation game development

Skill "Cursor rules for ASCII simulation game development" from AmariahAK/atlarix-skills, covering cursor rules for ascii simulation game development, when to use this skill and source.

AmariahAK/atlarix-skills · 7 tokens

GameMaker Language (GML) rules for scripts, objects, events, rooms, data structu

GameMaker Language (GML) rules for scripts, objects, events, rooms, data structures, and performance-minded game code.

AmariahAK/atlarix-skills · 20 tokens

dialogue-graph

A library for building, validating, visualizing, and serializing dialogue graphs. Use this when parsing scripts or creating branching narrative structures.

Raidriar7170/hermes-skilleval · 32 tokens

dialogue-graph

A library for building, validating, visualizing, and serializing dialogue graphs. Use this when parsing scripts or creating branching narrative structures.

Raidriar7170/hermes-skilleval · 32 tokens

gameobject-component-destroy

Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.

IvanMurzak/Unity-MCP · 49 tokens