post-process-logo
Skill834 starsChanged 2 days agoMITView on GitHub
Post-process original logos into standardised 256x256 PNG format
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-curatorSkill
- add-stablecoinSkill
- add-vault-abi-methodsSkill
- add-vault-noteSkill
- add-vault-protocolSkill
- categorise-vault-strategySkill
- check-stablecoinsSkill
- check-top-list-vaultsSkill
- check-vault-onchainSkill
- clean-up-for-prSkill
- document-curator-incidentSkill
- extract-project-logoSkill
- extract-test-setSkill
- extract-vault-protocol-logoSkill
- find-new-curatorsSkill
- fix-sphinx-docsSkill
- get-block-numberSkill
- Identify vault protocolSkill
- maintain-curatorsSkill
- make-releaseSkill
- monthly-vault-reportSkill
- more-vaultsSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 12 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Before starting, gather the following from the user:
- Distinctive: line 18
If any required input is missing, ask the user before proceeding.
- Distinctive: line 22
Ensure the following are available:
- Distinctive: line 47
Always prefer brand marks over word marks as source logo for post processing
- Distinctive: line 62
Prefer transparent variants (PNG with alpha, SVG)
- Distinctive: line 63
If still tied, prefer generic > light > dark
- Distinctive: line 64
If user specified a variant preference: Use that variant regardless of squareness
- Distinctive: line 78
Add transparent padding to make the logo square (if non-square)
- Distinctive: line 79
Remove background if not already transparent
- Distinctive: line 101
If SVG conversion fails:
- Distinctive: line 103
Check if the SVG file is valid XML
- Distinctive: line 109
If the background isn't removed properly:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Post-process logo
This skill transforms original logo images into standardised 256x256 PNG format suitable for vault protocol metadata. It automatically selects the most square variant from available logos and applies padding if needed to create a perfect square output.
Required inputs
Before starting, gather the following from the user:
- Input folder - Folder containing original logo files (e.g.,
eth_defi/data/vaults/original_logos/protocol-name/) - Output folder - Folder where processed logos should be saved (e.g.,
eth_defi/data/vaults/formatted_logos/) - Variant preference (optional) - Which variant(s) to process:
generic,light,dark, orall
If any required input is missing, ask the user before proceeding.
Prerequisites
Ensure the following are available:
- Python dependencies installed:
poetry install --with dev
Python Pillow is installed for detecting image format, dimensions, and transparency.
Logo vocabulary
There is no universal standard how artist name their logo files for dark and light variants. In our case, we always say
light: light (white) text on dark or transparent backgrounddark: dark (black) text on white or transparent background
Following vocabulary is used:
- Brand mark: same as logo mark, the logo without the brand name text
- Word mark: the logo with the brand name text
Step 1: Inventory input logos
List all image files in the input folder and classify them:
- Identify file formats: SVG, PNG, JPG, WEBP, etc.
- Classify by variant based on filename:
{slug}.generic.{ext}- Generic/default theme{slug}.light.{ext}- Light background theme (dark logo){slug}.dark.{ext}- Dark background theme (light logo)
- Always prefer brand marks over word marks as source logo for post processing
- Check aspect ratio of each logo:
- Square aspect ratio: Width equals height (1:1 ratio). Allow 90% tolerance in the detection as there might be one-off pixel errors in the source material.
- Non-square: Width differs from height - will need padding to become square
- Check if logos have transparent backgrounds:
- Transparent background: PNG files with alpha channel transparency
- Assume SVGs are always transparent: SVG files the originals should never contain a solid background
- Report findings to user, noting aspect ratios for each variant
Step 2: Variant selection
Automatic selection priority
- Pick the most square variant: Calculate aspect ratio (min dimension / max dimension) for each variant and select the one closest to 1.0
- If multiple variants have the same squareness:
- Prefer transparent variants (PNG with alpha, SVG)
- If still tied, prefer generic > light > dark
- If user specified a variant preference: Use that variant regardless of squareness
Step 3: Process logo
Process the selected logo variant. The script will automatically add padding to non-square logos to make them square before scaling.
export INPUT_IMAGE=/path/to/original/logo.png
export OUTPUT_IMAGE=/path/to/output/logo.generic.png
poetry run python scripts/logos/post-process-logo.pyThe script will:
- Convert SVG to PNG if needed
- Add transparent padding to make the logo square (if non-square)
- Remove background if not already transparent
- Recolour for dark background (invert colours if logo is too dark to be visible on dark backgrounds)
- Trim any excess padding and scale to 256x256
Step 4: Report results
Provide the user with:
- Processed files - List of all output files created
- File details - Dimensions, file size for each
- Any issues - Note any logos that couldn't be processed or had quality issues
Output naming convention
Output files should follow this naming pattern:
{protocol-slug}/light.png- For light backgrounds{protocol-slug}/dark.png- For dark backgrounds
Troubleshooting
SVG conversion issues
If SVG conversion fails:
- Check if the SVG file is valid XML
- Some complex SVGs may not render correctly
- Try opening in a browser to verify the SVG displays properly
Background removal issues
If the background isn't removed properly:
- The logo may have complex edges or gradients
- Try providing a higher resolution input
- For logos that already have transparency, the script will skip background removal
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

