omp-tui-extension-ux

omp-tui-extension-ux is a skill for Claude Code, Codex from magic3007/dotfiles. It costs 76 tokens per session (2,238 once invoked), scanned A, original, MIT.

A design guide for adding user interactions to an omp terminal user interface (TUI), such as shortcuts, draft editing, choices, and progress status. It explains how to map these interactions to the extension API and cover each UI state.

In plain words
What is it for?
Use it when planning an omp extension that reads or replaces composer text, adds a shortcut, shows progress, or makes a one-off language-model request.
Why use it?
It prevents an extension from blocking the interface, using the wrong widget, or overlooking cases such as unavailable editing or changed drafts. It also helps define the API surface before writing the implementation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when planning an omp extension that reads or replaces composer text, adds a shortcut, shows progress, or makes a one-off language-model request.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magic3007/dotfiles/omp-tui-extension-ux
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add magic3007/dotfiles --skill omp-tui-extension-ux
Clone the repo
git clone --depth 1 https://github.com/magic3007/dotfiles

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for omp-tui-extension-ux

README.md
[![agentmods](https://agentmods.dev/badge/skills/magic3007/dotfiles/omp-tui-extension-ux/github.svg)](https://agentmods.dev/skills/magic3007/dotfiles/omp-tui-extension-ux)
Your own site
<a href="https://agentmods.dev/skills/magic3007/dotfiles/omp-tui-extension-ux"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/omp-tui-extension-ux/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for omp-tui-extension-ux

Your own site · 80×15
<a href="https://agentmods.dev/skills/magic3007/dotfiles/omp-tui-extension-ux"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/omp-tui-extension-ux.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,238 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00076 $0.02238
Opus 5.5 $0.00030 $0.00895
Sonnet 5.5 $0.00015 $0.00448
Haiku 4.5 $0.00008 $0.00224

Measured 19d ago against content hash 81fe6c96f96e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

omp-tui-extension-ux scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

omp/skills/omp-tui-extension-ux/SKILL.md · 166 lines

How it starts

The opening of the file, as written. The whole thing — 166 lines — stays where its author put it; the contents beside it link to each section on GitHub.

omp TUI 扩展:交互设计契约

用于「用户手动触发」的 omp 扩展:润色/改写草稿、生成候选、摘要、任何要回填输入框的功能。

分工:

  • 本文管交互形态与状态覆盖(为什么会被一个示例带偏、漏掉哪些状态)。
  • omp-tui-extension-authoring 管机制:打包、类型检查、tmux 真机验证。

1. 第一步永远是枚举 API 面

不要从示例倒推能力。先读已安装包的类型定义:

ls ~/.bun/install/global/node_modules/@oh-my-pi/pi-coding-agent/dist/types/index.d.ts
# ExtensionUIContext 里至少包含:
#   select / notify / setStatus / getEditorText / setEditorText / supportsEditor / custom
# ExtensionContext 里至少包含:
#   ui / model / modelRegistry / runEphemeralTurn? / sessionManager

判断依据:

需求 正确 API 错误做法
显示运行中 ctx.ui.setStatus(key, text) 用 ui.custom 卡片占屏
让用户选一项 ctx.ui.select(title, options) 让用户背参数
读当前草稿 ctx.ui.getEditorText() 要求用户把草稿写进命令参数
回填草稿 ctx.ui.setEditorText(text) 直接发消息给会话
判断能否编辑 ctx.ui.supportsEditor === false 时警告 只查 ctx.hasUI
一次不进会话的 LLM 调用 ctx.runEphemeralTurn(...)(可选路径) import @oh-my-pi/pi-ai 的 completeSimple

单看一个示例会把方案锁死在那个示例的形态上。 examples/hooks/qna.ts 用 ui.custom,因为它要一个问答面板;它不代表“显示进度”就该占屏。

2. 交互形态:默认非阻塞

形态 适用 代价
非阻塞:状态栏 + 原地回填 默认;短请求(1–30 s);用户还要读/改草稿 需要处理“草稿被改”
阻塞:ui.custom 非 overlay 卡片 必须独占输入;请求长到你确定用户不该打字 用户看不见草稿;容易顺手覆盖输入

规则:

  • 进度只写状态栏,键要唯一(如 prompt-polish),结束时 setStatus(key, undefined)。
  • 阻塞卡片只在“输入必须冻结”时用。用就配 AbortSignal.any([loader.signal, AbortSignal.timeout(ms)]),Esc 才有取消。
  • 非阻塞时,回填前必须比对 ctx.ui.getEditorText() !== draft;不一致就丢弃结果并提示,不覆盖。
  • 失败和取消绝不 setEditorText 恢复原文;原草稿本来就没被动过。

3. 入口矩阵:两种都要

slash command 会消费整行输入。所以:

用户手里的文本 入口
已在输入框 pi.registerShortcut("ctrl+alt+p", { handler })
现敲/带参数 pi.registerCommand("x", { handler: (args, ctx) => … })

两者共用一个内部函数,参数 explicitText?: string 区分来源:

const fromEditor = explicitText === undefined;
const draft = fromEditor ? ctx.ui.getEditorText() : explicitText;
// 命令无草稿时回落到输入框,而不是报“没有内容”

选项用 getArgumentCompletions 补全 + select 兜底;select() 只回 label 字符串,label 必须能反查回业务键。

Read the full file on GitHub · 166 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago First seen · 166 lines · 76 tokens per session scan A 81fe6c96f96e

Subscribe to this mod's changes

omp-tui-extension-ux is a skill published in the GitHub repository magic3007/dotfiles (11 stars, last pushed 5d ago), licensed MIT. It adds 76 tokens to every session and 2,238 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-11.

Related

omp-tui-extension-ux compared with skills from other repositories

omp-tui-extension-ux next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
omp-tui-extension-uxmagic3007/dotfilesSkill115d agoMITA76Claude Code, Codex
style-brandurmzd/dotfilesSkill64d agoApache-2.0A107Claude Code, Codex
manage-themeurmzd/dotfilesSkill64d agoApache-2.0A188Claude Code
create-oss-skillurmzd/dotfilesSkill64d agoApache-2.0A63Claude Code
extend-oss-skills-to-claudeurmzd/dotfilesSkill64d agoApache-2.0A74Claude Code
scaffold-nodeurmzd/dotfilesSkill64d agoApache-2.0A119Claude Code
test-codeurmzd/dotfilesSkill64d agoApache-2.0A101Claude Code