ClaudeModsClaude Code mod directory
☰
● 0 online · Views 0 times
+ Submit a project
← Back to projects
GitHub repositories · Git & code review

hitokoto: A Hitokoto (One-liner) Above the Claude Code Input Box — Claude Code plugin · ClaudeMods

Report this workIs this your work? Claim it

Explore this Claude Code plugin on ClaudeMods and review its source and permissions. hitokoto: A line from Hitokoto (一言) in a band above the prompt, refreshed on a timer, per session, per prompt or once a day.

hhoobnn@hoobnn
Original post image1
Translated

About this mod

hitokoto: A Hitokoto Above the Claude Code Input Box

Simplified Chinese · English

Displays a Hitokoto above the input box: poetry, literature, anime quotes, or philosophical one-liners, with the author and source faintly shown after it. Read one while waiting for Claude to work.

hitokoto: A hitokoto and its source above the input box

Features

  • One-liner plus source: The sentence is followed by the author and source; click the ↻ at the end to change to another one (this button is absent in daily mode).
  • Four refresh modes: interval (default every 30 minutes), daily (same sentence for all sessions, new one after midnight), per session, per prompt.
  • Filter by category: You can request only categories like poetry, literature, philosophy, etc.
  • Saves bandwidth, never blank: No request when the bar is hidden; only one request at a time; 10 seconds without response counts as failure; the last fetched sentence is saved and displayed directly in new sessions or when offline, so it's never blank.
  • No requests in claude -p and SDK.

Installation

claude plugin marketplace add hoobnn/hoobnn-agent-mods
claude plugin install hitokoto@hoobnn-agent-mods

Commands

  • /hitokoto: Immediately change to another one (in daily mode, replaces today's sentence).
  • /hitokoto off, /hitokoto on: Hide or show the bar. This setting is written back to /config and persists across sessions; when re-shown, a new sentence is fetched first.

Options

Modify in /config, or write in pluginConfigs in ~/.claude/settings.json:

| Option | Effect | Default | | --- | --- | --- | | visible | Show the bar (what /hitokoto off / on changes) | On | | refreshMode | interval timed change, daily one per day, session one per session, prompt one per message | interval | | categories | Hitokoto category letters, comma-separated, leave empty for no limit. a anime, b manga, c games, d literature, e original, f internet, g other, h film/TV, i poetry, j NetEase Cloud, k philosophy, l jokes, e.g. d,i,k | Empty | | intervalMinutes | Minutes between changes in interval mode (at least 1) | 30 | | language | Language for /hitokoto replies and errors: auto, en, zh-Hans, zh-Hant, ja, ko, es, fr, de, pt-BR, ru (the sentence itself is Chinese) | auto |

When language is auto, it follows Claude Code's language setting and system locale in order, falling back to English if neither is available.

Related mods

hoobnn-agent-mods also includes a status bar HUD (hud), task progress bar (todo-bar), turn receipt (receipt), running animation and pet (spinner), and Tailscale node status (ts-band), which can be used together.

Development

  • hooks/register.tsx: Hooks (language at session start, /hitokoto and the refresh schedule for each mode, commands and the bar).
  • hooks/config.ts: Options, read once into a typed Config.
  • hooks/parse.ts: Parsing of the API endpoint and response content, source and local date.
  • hooks/i18n.ts: Text for each language.
  • hooks/kit/: A copy of claude-code/kit; run scripts/sync-kit.sh after modifying source files.

Installation

Check the author's README for the marketplace and plugin name first. Commands may change as the repository evolves.

claude plugin marketplace add hoobnn/hoobnn-agent-mods
claude plugin install hitokoto
Original text / README

hitokoto:Claude Code 输入框上方的一言

简体中文 · English

在输入框上方显示一句一言:诗词、文学、动画台词或哲理短句,后面淡淡地附上作者和出处。等 Claude 干活的时候,顺便读一句。

hitokoto:输入框上方的一句一言和出处

功能

  • 一句话加出处:句子后面是作者和出处,点末尾的 ↻ 换一句(daily 模式下没有这个按钮)。
  • 四种更换方式:定时换(默认每 30 分钟)、每天一句(所有会话同一句,过了零点换新的)、每个会话一句、每次发消息换一句。
  • 按分类挑:可以只要诗词、文学、哲学等分类。
  • 省流量、不空白:横条隐藏时不请求;同一时间只发一个请求,10 秒没响应算失败;上次取到的句子会保存,新会话或离线时直接显示它,不会空着。
  • 在 claude -p 和 SDK 里不请求。

安装

claude plugin marketplace add hoobnn/hoobnn-agent-mods
claude plugin install hitokoto@hoobnn-agent-mods

命令

  • /hitokoto:立刻换一句(daily 模式下替换今天的这句)。
  • /hitokoto off、/hitokoto on:隐藏或显示横条。这个设置会写回 /config,以后的会话也会沿用;重新显示时会先取一句新的。

选项

在 /config 里修改,或写在 ~/.claude/settings.json 的 pluginConfigs 里:

| 选项 | 作用 | 默认 | | --- | --- | --- | | visible | 显示横条(/hitokoto off / on 改的就是它) | 开 | | refreshMode | interval 定时换、daily 每天一句、session 每个会话一句、prompt 每次发消息换一句 | interval | | categories | 一言的分类字母,逗号分隔,留空不限。a 动画、b 漫画、c 游戏、d 文学、e 原创、f 网络、g 其他、h 影视、i 诗词、j 网易云、k 哲学、l 抖机灵,例如 d,i,k | 空 | | intervalMinutes | interval 模式下几分钟换一句(至少 1) | 30 | | language | /hitokoto 回复和报错的语言:auto、en、zh-Hans、zh-Hant、ja、ko、es、fr、de、pt-BR、ru(句子本身是中文) | auto |

language 为 auto 时,依次跟随 Claude Code 的 language 设置和系统语言环境,都没有时用英语。

同系列 mod

hoobnn-agent-mods 里还有状态栏 HUD(hud)、任务进度条(todo-bar)、回合回执(receipt)、运行动画和宠物(spinner)和 Tailscale 节点状态(ts-band),可以搭配使用。

开发

  • hooks/register.tsx:钩子(会话开始时的语言、/hitokoto 和对应模式的刷新计划,命令和横条)。
  • hooks/config.ts:选项,一次性读成类型化的 Config。
  • hooks/parse.ts:接口地址和返回内容的解析、出处和本地日期。
  • hooks/i18n.ts:各语言文案。
  • hooks/kit/:claude-code/kit 的副本;改源文件后运行 scripts/sync-kit.sh。
View original source ↗

Similar projects