keybase-unused-assets

star 9.2k

Use when finding or deleting unused image/icon assets in the Keybase client codebase (icons, illustrations, iconfont SVGs).

keybase By keybase schedule Updated 6/8/2026

name: keybase-unused-assets description: Use when finding or deleting unused image/icon assets in the Keybase client codebase (icons, illustrations, iconfont SVGs).

Keybase Unused Assets

Find and delete PNG icons, illustrations, and iconfont SVGs no longer referenced in any TypeScript source.

Finding Unused Assets

./skill/keybase-unused-assets/find-unused-assets.sh

Scans all .ts/.tsx files (excluding generated icon constants) and reports assets whose name — or any prefix of it — isn't referenced. Prefix matching catches dynamically-constructed names like `icon-phone-revoke-background-${n}`.

Light/dark icon pairs (icon-foo / icon-dark-foo) are treated as a unit: if either is referenced, both are kept.

Deleting Unused Assets

Pass asset names (without extension) to the delete script:

./skill/keybase-unused-assets/delete-unused-assets.sh icon-foo-bar illustration-welcome

This removes all variants (@2x, @3x, etc.) for each name across all asset directories, then runs yarn gen:icon-constants to regenerate the icon constants files.

Install via CLI
npx skills add https://github.com/keybase/client --skill keybase-unused-assets
Repository Details
star Stars 9,219
call_split Forks 1,292
navigation Branch main
article Path SKILL.md
More from Creator