ワンクリックで
add-icon
Add a new icon to logo-ls by updating the icon maps
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Add a new icon to logo-ls by updating the icon maps
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | add-icon |
| description | Add a new icon to logo-ls by updating the icon maps |
You are helping the user add a new icon to the logo-ls project. This project uses Nerd Fonts glyphs to display icons next to file and directory names in terminal listings.
The icon system consists of four files in the icons/ directory:
icons/icons_map.go — IconSet map: defines all available icons. Each entry has a name (key), a glyph (Unicode codepoint), and an RGB color. This is where every new icon must be registered first.icons/icons_ext.go — IconExt map: maps file extensions (e.g. "js", "py") to entries in IconSet.icons/icons_files.go — IconFileName map: maps specific file names (e.g. "tsconfig.json", ".babelrc") to entries in IconSet.icons/icons_sub_ext.go — IconSubExt map: maps compound sub-extensions (e.g. "spec.ts", "d.ts", "gitlab-ci.yml") to entries in IconSet. Used to override the default extension icon for specific patterns.The IconInfo struct looks like this:
type IconInfo struct {
Glyph string
Color [3]uint8 // RGB color
IsExecutable bool
}
Follow these steps interactively:
Ask the user:
IconSet (e.g. "markdown", "docker", "rust"). Check icons/icons_map.go to see if it already exists. If it does, skip to Step 2.U+E7A8 or e7a8). The user should look this up at https://www.nerdfonts.com/cheat-sheet.66, 165, 245).Ask the user which type of mapping they want. They can choose one or more:
icons/icons_ext.go)icons/icons_files.go)icons/icons_sub_ext.go)Then ask for the specific extension(s), file name(s), or sub-extension(s) to map.
If the icon is new, add an entry to IconSet in icons/icons_map.go. Insert it in alphabetical order within the map. Follow the existing formatting style:
"icon-name": {Glyph: "\U0000XXXX", Color: [3]uint8{R, G, B}},
The codepoint must be formatted as an 8-digit uppercase Unicode escape (e.g. \U0000E7A8).
Add entries to the appropriate mapping file(s), also in alphabetical order, following the existing formatting style:
icons/icons_ext.go: "ext": IconSet["icon-name"],icons/icons_files.go: "filename": IconSet["icon-name"],icons/icons_sub_ext.go: "sub.ext": IconSet["icon-name"],Verify the changes compile by running go build ./....
Show the user a summary of what was added: