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.
npx skills add magic3007/dotfiles --skill omp-tui-extension-authoringgit clone --depth 1 https://github.com/magic3007/dotfilesWrote 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.
[](https://agentmods.dev/skills/magic3007/dotfiles/omp-tui-extension-authoring)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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/。
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.
- 19d ago First seen · 102 lines · 49 tokens per session scan A 8d0168a1b4b4
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.
omp-tui-extension-authoring compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| omp-tui-extension-authoringmagic3007/dotfiles | Skill | 11 | 5d ago | MIT | A | 49 | Claude Code, Codex |
| assess-qualityurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 120 | Claude Code |
| create-oss-skillurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 63 | Claude Code |
| extend-oss-skills-to-claudeurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 74 | Claude Code |
| scaffold-nodeurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 119 | Claude Code |
| test-codeurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 101 | Claude Code |
| scaffold-docsurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 196 | Claude Code |