Daniel Avila #1880 5771dfa
Claude Mod. A mod is a complete Claude Code plugin built on function hooks (Anthropic's mods/ layout); it is on by default in Claude Code 2.1.287+. Hooks module: hooks/register.tsx. Options: siteUrl, columns, pictures (set in user or managed settings pluginConfigs, or /config). Run claude plugin validate on the installed folder to see every event it hooks and every $ call it makes.
README.md

/gallery opens a side pane of picture cards for the aitmpl.com catalog. Each card is one button that holds the component's share card (the picture its page on aitmpl.com uses), its name and type, how many people installed it this week and the change from last week. Press a card anywhere to open it.

aitmpl gallery                                    refresh  close
▸ Rising  This week  Skills  Agents  Commands  MCPs  Hooks  …
╭──────────────────────────────────╮ ╭──────────────────────────────────╮
│ ┌──────────────────────────────┐ │ │ ┌──────────────────────────────┐ │
│ │  creative-design/            │ │ │ │  creative-design/            │ │
│ │  frontend-design      [▣]    │ │ │ │  ui-ux-pro-max        [▣]    │ │
│ │  (the component's share card)│ │ │ │                              │ │
│ └──────────────────────────────┘ │ │ └──────────────────────────────┘ │
│ frontend-design            skill │ │ ui-ux-pro-max              skill │
│ 859 installers · +84%     open ⏎ │ │ 590 installers · +75%     open ⏎ │
╰──────────────────────────────────╯ ╰──────────────────────────────────╯
  • Tabs: Rising (the site's rising list), This week (most installed across types) and one per type (Skills, Agents, Commands, MCPs, Hooks, Settings, Mods, Loops), ordered by unique installers this week. The order comes only from the site's public trending-data.json: nothing paid is ever shown or promoted here.
  • Grid: one to three cards per row, depending on the pane's width. The grid scrolls in its own box under the header and tabs (mouse wheel, or the arrows while the pane has focus).
  • Detail: a bigger picture, installers and downloads, the install command, and three buttons. Install here (i) runs npx claude-code-templates@latest --{type} {path} --yes as a fixed argv (validated path, no shell) and shows a spinner until it finishes. Put in prompt (c) writes the request into the prompt without sending it. aitmpl.com ↗ (o) opens the page in your browser. b goes back.
/gallery            Rising
/gallery week       This week
/gallery skills     one type's tab
/gallery stop       close

Pictures

Pictures show in terminals that can draw them: kitty, Ghostty, iTerm2 3.5 or later in fullscreen mode (/tui fullscreen), and tmux with allow-passthrough and focus-events on. Each share card (about 55 KB) is downloaded once per session with curl (https only, at most 1 MiB, checked to be a PNG) into the session's own scratchpad folder; at most four downloads run at once. kitty and Ghostty read the file. iTerm2, tmux and a terminal on another machine (ssh) take only bytes, so there the mod sends each picture as PNG bytes read from the same file, up to about 33 pictures in one view (the engine allows 2 MiB of pictures per pane; the rest show their name). A session without a scratchpad gets text cards. The data and pictures come from siteUrl, which must be an https origin (http only for localhost).

Once the first picture is on screen the mod asks the terminal whether it drew it, and switches to bytes or to text cards from the answer. Text cards (with a one-line note above the grid) are what you get in Terminal.app, in iTerm2 outside fullscreen mode, in tmux without passthrough, and always in Claude Desktop and VS Code, which do not draw pictures for mods. They show the category where the picture would be. After fixing the terminal (for example /tui fullscreen in iTerm2), press r in the pane to check again.

Options

Set them in your user settings under pluginConfigs["gallery@skills-dir"].options:

Option Default What it does
siteUrl https://www.aitmpl.com The site whose trending-data.json and share cards are shown
columns 72 Width asked for the docked pane (40-160)
pictures true false keeps text cards and downloads nothing

Requirements

  • Claude Code 2.1.337 or later (picture cards, scrolling boxes and the progress spinner are new in that release).
  • curl on the PATH for pictures (macOS, Linux and Windows 10+ ship it), and npx (Node.js) for Install here.
  • Install: npx claude-code-templates@latest --mod ui/gallery, then open claude in a trusted project, or copy the folder to ~/.claude/skills/gallery/.

Tests

cd cli-tool/components/mods && claude plugin test ui/gallery

Next step

More mods in ui, in alphabetical order.