pillow-grayscale

pillow-grayscale is a skill for Claude Code, Codex from cxcscmu/SkillLearnBench. It costs 23 tokens per session (312 once invoked), scanned A, original, MIT.

A Python guide for converting color images to 8-bit grayscale with Pillow, replacing each original file with the gray version.

In plain words
What is it for?
Use it to convert one image or batch-convert matching PNG files while preserving the file extension.
Why use it?
It removes the need to handle image conversion manually and explains what the resulting image mode means.

Skill for Claude CodeCodex

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

Good fit Use it to convert one image or batch-convert matching PNG files while preserving the file extension.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cxcscmu/skilllearnbench/pillow-grayscale
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 pillow-grayscale
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 pillow-grayscale

README.md
[![agentmods](https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/pillow-grayscale.svg)](https://agentmods.dev/skills/cxcscmu/skilllearnbench/pillow-grayscale)
Your own site
<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/pillow-grayscale"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/pillow-grayscale.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 312 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 20
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
How audits are shown
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.00023 $0.00312
Opus 5 $0.00012 $0.00156
Sonnet 5 $0.00005 $0.00062
Haiku 4.5 $0.00002 $0.00031

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

Security

Grade A, and why

pillow-grayscale 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 4d 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-claude-sonnet-4-6/video-object-counting/pillow-grayscale/SKILL.md · 47 lines

What it actually says

Pillow Grayscale Conversion

Installation

pip install Pillow

Convert Single Image In-Place

from PIL import Image

def convert_to_grayscale_inplace(image_path):
    img = Image.open(image_path)
    gray = img.convert("L")      # "L" mode = 8-bit grayscale
    gray.save(image_path)        # overwrite the original file

Convert Multiple Images

from PIL import Image
import glob

def batch_convert_grayscale(pattern):
    for path in glob.glob(pattern):
        img = Image.open(path).convert("L")
        img.save(path)

Modes Reference

Mode Description
"L" 8-bit grayscale (0-255)
"RGB" 24-bit color
"RGBA" 32-bit color with alpha
"1" 1-bit black & white

Notes

  • .convert("L") handles all source formats (RGB, RGBA, etc.)
  • Saving back to PNG preserves lossless quality
  • After conversion, the file on disk is grayscale but retains the .png extension
  • OpenCV's cv2.imread() will still read the file; use cv2.IMREAD_GRAYSCALE or the image will have 3 identical channels
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. 4d ago First seen · 47 lines · 23 tokens per session scan A 2dcdfa866b51

Subscribe to this mod's changes

pillow-grayscale is a skill published in the GitHub repository cxcscmu/SkillLearnBench (83 stars, last pushed 2mo ago), licensed MIT. It adds 23 tokens to every session and 312 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

Ferramenta Python de Divisão de Áudio com GUI e FFmpeg Local

Cria um script Python completo com interface gráfica (Tkinter) para dividir arquivos de áudio em segmentos, utilizando um executável FFmpeg localizado na mesma pasta do script.

ECNU-ICALK/AutoSkill · 51 tokens

manimgl-best-practices

Trigger when: (1) User mentions "manimgl" or "ManimGL" or "3b1b manim", (2) Code contains from manimlib import , (3) User runs manimgl CLI commands, (4) Working with InteractiveScene, self.frame, self.embed(), ShowCreation(), or ManimGL-specific patterns. Best practices for ManimGL (Grant Sanderson's 3Blue1Brown…

calesthio/OpenMontage · 167 tokens

comfyui-node-registry

Authoring & publishing ComfyUI custom nodes to the Comfy Registry, covering node structure, pyproject.toml spec, comfy-cli publishing, and CI.

artokun/comfyui-mcp · 38 tokens

rdkit

Cheminformatics toolkit for fine-grained molecular control. SMILES/SDF parsing, descriptors (MW, LogP, TPSA), fingerprints, substructure search, 2D/3D generation, similarity, reactions. For standard workflows with simpler interface, use datamol (wrapper around RDKit). Use rdkit for advanced control, custom…

benchflow-ai/skillsbench · 80 tokens

pcap-analysis

Guidance for analyzing network packet captures (PCAP files) and computing network statistics using Python, with tested utility functions.

benchflow-ai/skillsbench · 28 tokens

composing-with-pytheory

Compose music with PyTheory — chord progressions, melodies, basslines, drum grooves, and full multi-part arrangements written in pure Python and rendered to audio or MIDI. Use whenever the user wants to write, sketch, generate, or arrange music — "write me a bossa nova in G minor", "make a four-chord pop loop", "lay…

kennethreitz/pytheory · 138 tokens