Keybase Unused Assets
Developmentkeybase-unused-assetsKeybase Unused Assets is an Agent Skill for development published in the keybase/client repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use when finding or deleting unused image/icon assets in the Keybase client codebase (icons, illustrations, iconfont SVGs).
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/keybase/client/blob/HEAD/skill/keybase-unused-assets/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/keybase-unused-assets, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
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.