omp-tui-extension-authoring

omp-tui-extension-authoring is a skill for Claude Code, Codex from magic3007/dotfiles. It costs 49 tokens per session (1,406 once invoked), scanned A, original, MIT.

A guide to creating, type-checking, installing, and testing an omp terminal user interface (TUI) extension. It covers slash commands, keyboard shortcuts, editor text, one-off language-model requests, packaging, and a real terminal smoke test.

In plain words
What is it for?
Use it when building an omp extension, adding a manual command or shortcut, editing the composer, or adapting a plugin from another host.
Why use it?
It reduces mistakes from guessing an extension API or using an unsupported request path. It also provides a way to verify the extension in a terminal multiplexer instead of relying only on static checks.

Skill for Claude CodeCodex

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

Good fit Use it when building an omp extension, adding a manual command or shortcut, editing the composer, or adapting a plugin from another host.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magic3007/dotfiles/omp-tui-extension-authoring
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-authoring
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-authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/magic3007/dotfiles/omp-tui-extension-authoring/github.svg)](https://agentmods.dev/skills/magic3007/dotfiles/omp-tui-extension-authoring)
Your own site
<a href="https://agentmods.dev/skills/magic3007/dotfiles/omp-tui-extension-authoring"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/omp-tui-extension-authoring/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-authoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/magic3007/dotfiles/omp-tui-extension-authoring"><img src="https://agentmods.dev/badge/skills/magic3007/dotfiles/omp-tui-extension-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,406 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.00049 $0.01406
Opus 5.5 $0.00020 $0.00562
Sonnet 5.5 $0.00010 $0.00281
Haiku 4.5 $0.00005 $0.00141

Measured 19d ago against content hash 8d0168a1b4b4, 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-authoring 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-authoring/SKILL.md · 102 lines

How it starts

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

omp TUI 扩展:写、装、验

适用于给 omp 加一个「用户手动触发」的功能(slash command / 快捷键 / 编辑器回填),或把别的 harness 的插件移植过来。

1. 定位 API(不要猜)

omp 的扩展类型定义在已安装包里,直接读源码:

ls ~/.bun/install/global/node_modules/@oh-my-pi/pi-coding-agent/
# 类型总入口:src/extensibility/extensions/types.ts
#   ExtensionAPI(约 1795 行起):registerCommand / registerShortcut / registerTool / exec / events
#   ExtensionUIContext(约 316 行起):select / notify / setStatus / getEditorText / setEditorText / supportsEditor
#   ExtensionContext(约 748 行起):ui / models / runEphemeralTurn? / sessionManager / setInterval…

现成样例:examples/extensions/*.ts(api-demo.ts 最小骨架,plan-mode.ts 有命令 + 快捷键)。

关键判断:

  • 要发 LLM 请求 → ctx.runEphemeralTurn()(见下)。没有别的官方 one-shot 通道。
  • 要读写输入框 → ctx.ui.getEditorText() / setEditorText()。
  • 要固定模型 + 固定 key → 手写 fetch 打 OpenAI 兼容端点;omp 未把 pi-ai 的 streamSimple 暴露给扩展。

2. 旁路 LLM 调用

const { replyText } = await ctx.runEphemeralTurn({
  promptText,                 // 指令 + 素材放这里;system prompt 是会话的那份(走 prompt 缓存)
  tools: false,               // 不带工具定义;Cursor 等强制原生工具的 transport 会拒绝 → 降级重试一次
  dedupeReply: false,         // 默认 true 会去重重复行并截到 4 KiB,代码/prompt 类内容必须关掉
  minimizeEffort: true,
  maxTokens: cfg.maxTokens,   // 部分 transport 拒绝调用方输出上限,不确定就别传
  signal,
});

结果不进会话历史,所以适合「润色 / 生成候选 / 摘要」这类不该污染 agent 上下文的功能。

3. 入口形态:一个都不能少

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

用户想做的事 正确入口
处理「已经在输入框里」的文本 pi.registerShortcut("ctrl+alt+p", …)
处理「现敲」的文本 pi.registerCommand("x", { handler: (args, ctx) => … }),文本写在参数里

两者共用同一个内部函数,用一个 explicitText?: string 参数区分来源;只有「来自输入框」那条路需要在回填前比对 getEditorText() !== draft(期间用户可能继续打字,此时丢弃结果而不是覆盖)。

选快捷键前先查默认键位是否冲突:

grep -rn "defaultKeys" ~/.bun/install/global/node_modules/@oh-my-pi/pi-tui/src/{app-keybindings,keybindings}.ts

select() 只回传 label 字符串,所以 label 必须是能反查回业务键的值。

4. 打包与安装

{ "name": "…", "version": "0.1.0", "type": "module",
  "omp": { "extensions": ["extension"] } }

三种装法:omp plugin install github:user/repo(git spec 可用)、omp plugin install <本地路径>、或把 .ts 软链进 ~/.omp/agent/extensions/。

Read the full file on GitHub · 102 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 · 102 lines · 49 tokens per session scan A 8d0168a1b4b4

Subscribe to this mod's changes

omp-tui-extension-authoring is a skill published in the GitHub repository magic3007/dotfiles (11 stars, last pushed 5d ago), licensed MIT. It adds 49 tokens to every session and 1,406 once invoked, about $0.0002 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-authoring compared with skills from other repositories

omp-tui-extension-authoring next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
omp-tui-extension-authoringmagic3007/dotfilesSkill115d agoMITA49Claude Code, Codex
assess-qualityurmzd/dotfilesSkill64d agoApache-2.0A120Claude 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
scaffold-docsurmzd/dotfilesSkill64d agoApache-2.0A196Claude Code