ClaudeModsClaude Code 模组目录
☰
● 0 人在线 · 浏览 0 次
+ 提交作品
探索 CLAUDE CODE MODS

@Troepster

T
Troepster@Troepster
◎

What I learned building a Claude Code mod: a status band above the prompt

So I got my weekly mail from Lydia and saw something very exciting: Claude Code now supports mods, plugins written as function hooks that can draw UI inside the app, in both the terminal and the desktop app. So I went through the docs and built the suggested weather band, very nice. Then what else can I do with it? I recently started using Ponytail with great success and wanted to know what level it's running at, so let's add that… and after that, why not Caveman as well. Bottom line, great fun and very useful. Here's what I learned, then what I made. How a mod draws UI A mod hooks ui.render for a spot like AbovePrompt and returns a tree of a few elements ( Box , Text , Button , Select , Link , Svg ), laid out with flexbox. Not HTML, no CSS. The smallest band is about this: on('ui.render', { component: 'AbovePrompt' }, async ($, e) => { const { Box, Text } = $.ui.resolve(e) return <Box flexDirection="row"><Text>hello from a mod</Text></Box> }) How I did config inline The config took a few goes This was the fun part, because the UI is so limited: Settings live in /config , but that doesn't exist in the desktop app. So first a /overalls weather minimal command, then a ⚙ button that t

What I learned building a Claude Code mod: a status band above the prompt预览
未扫描☆ 0尚未翻译