SharpPad: Command for Claude Code

.claude/commands/png-to-icons.md

png-to-icons is a command for Claude Code from gaoconggit/SharpPad. It costs 16 tokens per session (1,004 once invoked), scanned C, original, MIT.

A command that converts one PNG image into Windows ICO and macOS ICNS icon files, including common icon sizes. The output files are placed beside the source image.

In plain words
What is it for?
It helps prepare application icons from a PNG for Windows and macOS.
Why use it?
It avoids manually resizing the image and assembling platform-specific icon files for desktop applications.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool.

This is gaoconggit/SharpPad's own configuration. It tells Claude Code how to work on SharpPad itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything SharpPad configures →

Reuse

Borrowing it

Nothing to install: this file belongs to gaoconggit/SharpPad. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/gaoconggit/SharpPad/main/.claude/commands/png-to-icons.md
Clone the repo
git clone --depth 1 https://github.com/gaoconggit/SharpPad

Made for: Claude Code.

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 png-to-icons

README.md
[![agentmods](https://agentmods.dev/badge/commands/gaoconggit/sharppad/png-to-icons/github.svg)](https://agentmods.dev/commands/gaoconggit/sharppad/png-to-icons)
Your own site
<a href="https://agentmods.dev/commands/gaoconggit/sharppad/png-to-icons"><img src="https://agentmods.dev/badge/commands/gaoconggit/sharppad/png-to-icons/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 png-to-icons

Your own site · 80×15
<a href="https://agentmods.dev/commands/gaoconggit/sharppad/png-to-icons"><img src="https://agentmods.dev/badge/commands/gaoconggit/sharppad/png-to-icons.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,004 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00016 $0.01004
Opus 5.5 $0.00006 $0.00402
Sonnet 5.5 $0.00003 $0.00201
Haiku 4.5 $0.00002 $0.00100

Measured 13d ago against content hash 8abc3072d710, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

png-to-icons scanned grade C with 1 finding 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 13d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf favicon.iconset
.claude/commands/png-to-icons.md · 120 lines

How it starts

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

Convert the PNG file at $ARGUMENTS to both ICO and ICNS formats suitable for Windows and macOS applications.

This command will:

  1. Create a Windows ICO file with multiple icon sizes (16x16, 32x32, 48x48, 64x64, 128x128, 256x256)
  2. Create a macOS ICNS file with all standard resolutions including Retina variants
  3. Clean up temporary files

The converted files will be created in the same directory as the source PNG file.

Usage: /png-to-icons path/to/your/file.png

Manual Steps (if command fails)

1. Create ICNS file (macOS format)

# Navigate to the directory containing your PNG file
cd "path/to/your/assets"

# Create iconset directory
mkdir -p favicon.iconset

# Generate all required icon sizes
sips -z 16 16 favicon.png --out favicon.iconset/icon_16x16.png
sips -z 32 32 favicon.png --out favicon.iconset/[email protected]
sips -z 32 32 favicon.png --out favicon.iconset/icon_32x32.png
sips -z 64 64 favicon.png --out favicon.iconset/[email protected]
sips -z 128 128 favicon.png --out favicon.iconset/icon_128x128.png
sips -z 256 256 favicon.png --out favicon.iconset/[email protected]
sips -z 256 256 favicon.png --out favicon.iconset/icon_256x256.png
sips -z 512 512 favicon.png --out favicon.iconset/[email protected]
sips -z 512 512 favicon.png --out favicon.iconset/icon_512x512.png
sips -z 1024 1024 favicon.png --out favicon.iconset/[email protected]

# Convert iconset to ICNS
iconutil -c icns favicon.iconset

# Clean up temporary directory
rm -rf favicon.iconset

2. Create ICO file (Windows format)

Method A: Using Python with PIL/Pillow (recommended)
#!/usr/bin/env python3
from PIL import Image
import os

def create_ico(png_path, ico_path):
    img = Image.open(png_path)
    sizes = [16, 32, 48, 64, 128, 256]
    icons = []
    
    for size in sizes:
        resized = img.resize((size, size), Image.Resampling.LANCZOS)
        icons.append(resized)
    
    icons[0].save(ico_path, format='ICO', sizes=[(size, size) for size in sizes])
    print(f"Successfully created {ico_path}")

# Usage
create_ico("favicon.png", "favicon.ico")

Read the full file on GitHub · 120 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. 13d ago First seen · 120 lines · 16 tokens per session scan C 8abc3072d710

Subscribe to this mod's changes

png-to-icons is a command published in the GitHub repository gaoconggit/SharpPad (83 stars, last pushed 7mo ago), licensed MIT. It adds 16 tokens to every session and 1,004 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.