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.5 $0.00009 $0.00488
Sonnet 5.5 $0.00004 $0.00244
Haiku 4.5 $0.00002 $0.00122

Measured 1mo ago against content hash 58721b7a8e58, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (7 stars, last pushed 5mo ago), licensed MIT. It adds 22 tokens to every session and 1,219 once invoked, about $0.0001 per session on Opus 5.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

Automate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation.

alivirgo/Major-AI-Skills · 41 tokens

horos

Configure Horos DICOM and PACS workflows, automate DCMTK transfers, and troubleshoot plugins without interpreting clinical findings.

alivirgo/Major-AI-Skills · 27 tokens

drug-repurposing

Reason about drug repurposing strategies in HCLS — choosing between target-based and phenotype-based approaches, evaluating mechanism-of-action overlap, querying drug-gene interaction databases, assessing clinical translatability, and ranking candidates by evidence strength. Use when the user asks to repurpose a drug…

awslabs/hcls-agent-skills · 211 tokens

genomic-variant-interpretation

Reason about germline and somatic variant classification using ACMG/AMP 2015 and AMP/ASCO/CAP frameworks. Use when the user asks to classify a variant, interpret a VCF annotation, resolve a VUS, apply ACMG criteria, weigh ClinVar evidence, evaluate gnomAD allele frequencies, interpret REVEL/CADD/SpliceAI scores…

awslabs/hcls-agent-skills · 188 tokens

pharmacoepidemiology

Reason about pharmacoepidemiologic study design for causal inference from real-world data — choosing active comparator new-user designs, emulating target trials, avoiding immortal time bias, handling time-varying confounding with marginal structural models, and selecting propensity score methods. Use when the user…

awslabs/hcls-agent-skills · 227 tokens

biomarker-discovery

Reason about biomarker discovery and validation in HCLS — classifying biomarker intent, choosing feature-selection and cross-validation strategies, avoiding leakage, and planning external replication. Use when the user asks to discover, develop, or validate a biomarker; select features from high-dimensional omics or…

awslabs/hcls-agent-skills · 185 tokens