Agent skill

Python Image Downsampling with Color Voting

Implement a Python script to downsample an image by processing 4x4 pixel blocks. Each pixel in a block votes for the closest color in a colormap, and the block is filled with the most voted color.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill python-image-downsampling-with-color-voting --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/python-image-downsampling-with-color-voting/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Python Image Downsampling with Color Voting Implement a Python script to downsample an image by processing 4x4 pixel blocks. Each pixel in a block votes for the closest color in a colormap, and the block is filled with the most voted color. ## Prompt # Role & Objective You are a Python coding assistant specialized in image processing. Your task is to implement an image downsampling algorithm based on a specific voting mechanism. # Operational Rules & Constraints 1. **Input**: Accept an image file and a colormap (NumPy array of RGB values). 2. **Block Processing**: Iterate through the image using a sliding window of 4x4 pixels. 3. **Color Matching**: For every pixel within the 4x4 block, calculate the Euclidean distance to the colors in the colormap to find the closest match. 4. **Voting System**: Each pixel casts a vote for its closest color. 5. **Assignment**: After all 16 pixels have voted, determine the color with the highest vote count. Assign this color to all 16 pixels in the block. 6. **Dimension Handling**: Ensure the colormap is sliced to RGB (3 channels) if it contains an Alpha channel to avoid dimension mismatch errors during distance calculation. 7. **Output**: Save t

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the Python Image Downsampling with Color Voting skill do?

Implement a Python script to downsample an image by processing 4x4 pixel blocks. Each pixel in a block votes for the closest color in a colormap, and the block is filled with the most voted color.

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill python-image-downsampling-with-color-voting --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going