contour-analysis

contour-analysis is a skill for Claude Code, Codex from aeren23/image-processing-skills. It costs 22 tokens per session (1,219 once invoked), scanned A, original, MIT.

A guide to measuring and classifying shapes found in images using contours, bounding boxes, centroids, and ratios such as aspect ratio, extent, solidity, and eccentricity.

In plain words
What is it for?
Use it to count objects, measure their dimensions or area, classify shapes, draw boxes or centers, and extract measurements for image-analysis workflows.
Why use it?
It turns detected outlines into measurable information about size, elongation, regularity, and location. The input also describes a medical-image use for comparing regular and irregular tumor shapes, but shape measurements alone do not establish a diagnosis.

Skill for Claude CodeCodex

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

Good fit Use it to count objects, measure their dimensions or area, classify shapes, draw boxes or centers, and extract measurements for image-analysis workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aeren23/image-processing-skills/05-contour-analysis
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 aeren23/image-processing-skills --skill 05-contour-analysis
Clone the repo
git clone --depth 1 https://github.com/aeren23/image-processing-skills

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 contour-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/aeren23/image-processing-skills/05-contour-analysis/github.svg)](https://agentmods.dev/skills/aeren23/image-processing-skills/05-contour-analysis)
Your own site
<a href="https://agentmods.dev/skills/aeren23/image-processing-skills/05-contour-analysis"><img src="https://agentmods.dev/badge/skills/aeren23/image-processing-skills/05-contour-analysis/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 contour-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/aeren23/image-processing-skills/05-contour-analysis"><img src="https://agentmods.dev/badge/skills/aeren23/image-processing-skills/05-contour-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,219 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.00022 $0.01219
Opus 5 $0.00011 $0.00609
Sonnet 5 $0.00004 $0.00244
Haiku 4.5 $0.00002 $0.00122

Measured 8d ago against content hash 58721b7a8e58, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

contour-analysis 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 8d 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/05-contour-analysis/SKILL.md · 141 lines

How it starts

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

Contour Analysis

When to Use This Skill

  • Counting objects in an image
  • Measuring object area, perimeter, or physical dimensions
  • Classifying shapes (round vs elongated, regular vs irregular)
  • Medical image analysis (tumor shape assessment)
  • Drawing bounding boxes or centroids on detected objects

Decision Framework

Shape Metric Selection

Metric Formula Range Tells You
Aspect Ratio width / height 0→∞ Shape elongation (1.0 = square/circle)
Extent Object Area / Bounding Box Area 0→1.0 How much the box is filled
Solidity Object Area / Convex Hull Area 0→1.0 Surface regularity (1.0 = smooth, <1.0 = irregular)
Eccentricity Minor Axis / Major Axis 0→1.0 Circularity (0 = circle, 1 = line)

Medical Application — Tumor Shape Classification

Solidity value?
├── ≈ 1.0 (smooth, convex surface)
│   └── Likely BENIGN — regular, well-defined boundary
│
└── << 1.0 (irregular, spiculated surface)
    └── Likely MALIGNANT — irregular projections, infiltrative margin

Solidity is a gold-standard feature in medical image analysis for distinguishing benign vs malignant masses. Convex Hull wraps the object tightly — if the actual area is much smaller than the hull, the surface has indentations/spikes (suspicious morphology).

Contour Finding Parameters

Parameter Recommended Alternative When
Mode RETR_EXTERNAL RETR_TREE External = outer boundaries only. Tree = nested hierarchy
Method CHAIN_APPROX_SIMPLE CHAIN_APPROX_NONE Simple = corner points only (saves memory). None = all boundary pixels

Critical Gotchas

1. Image MUST Be Binary Before findContours

gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
_, binary = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY)
contours, _ = cv2.findContours(binary, cv2.RETR_EXTERNAL,
                                cv2.CHAIN_APPROX_SIMPLE)

Read the full file on GitHub · 141 lines

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. 8d ago First seen · 141 lines · 22 tokens per session scan A 58721b7a8e58

Subscribe to this mod's changes

contour-analysis is a skill published in the GitHub repository aeren23/image-processing-skills (5 stars, last pushed 3mo ago), licensed MIT. It adds 22 tokens to every session and 1,219 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-08-31.

Related

Other skills, from other repositories

3d-slicer

Comprehensive operational skill specification for Anthropic Claude to automate, script, troubleshoot, and optimize 3D Slicer, MRML scene graphs, VTK/ITK pipelines, DICOM databases, and Segment Editor workflows.

alivirgo/Major-AI-Skills · 50 tokens

horos

Comprehensive operational skill specification for Anthropic Claude to automate, script, troubleshoot, and optimize Horos DICOM viewer, PACS networking (C-STORE/C-FIND/C-MOVE), DCMTK pipelines, and Objective-C plugins.

alivirgo/Major-AI-Skills · 51 tokens

imaging-study-design

Reasoning skill for medical imaging study design and biomarker selection. Use when the user asks to plan an imaging study, choose a preprocessing strategy, select an imaging biomarker, design a radiomics pipeline, handle DICOM de-identification, plan longitudinal imaging analysis, or pick a registration target.…

awslabs/hcls-agent-skills · 171 tokens

radiology-preprocessing

Structural MRI/CT preprocessing pipeline for radiology workflows covering skull stripping, bias field correction, registration, and intensity normalization. Triggers on skull stripping, bias correction, registration, ANTs, FSL, HD-BET, N4, brain extraction, normalization, FLIRT, FNIRT, SyN, fslreorient2std, MNI…

awslabs/hcls-agent-skills · 82 tokens

dicom-processing

DICOM and NIfTI medical image processing pipeline. Triggers on DICOM, NIfTI, dcm2niix, de-identification, pydicom, DICOM header, conversion, anonymization, BIDS, DICOM tags, medical image format conversion, "DICOM to NIfTI", "burned-in PHI", "SeriesInstanceUID", "nibabel", "DICOM anonymization".

awslabs/hcls-agent-skills · 91 tokens

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens