Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/xichan96/dinottynpx agentmods add skills/xichan96/dinotty/dinotty-viewerWrote 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/xichan96/dinotty/dinotty-viewer)<a href="https://agentmods.dev/skills/xichan96/dinotty/dinotty-viewer"><img src="https://agentmods.dev/badge/skills/xichan96/dinotty/dinotty-viewer/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/xichan96/dinotty/dinotty-viewer"><img src="https://agentmods.dev/badge/skills/xichan96/dinotty/dinotty-viewer.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.00108 | $0.01329 |
| Opus 5.5 | $0.00043 | $0.00532 |
| Sonnet 5.5 | $0.00022 | $0.00266 |
| Haiku 4.5 | $0.00011 | $0.00133 |
Grade A, and why
dinotty-viewer 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 10d 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 — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
用 Dinotty 打开文件
用户经常通过网页端 / 远程操作 Dinotty:在本机 open file.html 开的窗口用户
看不到。所有要给用户看的文件都推到 Dinotty 的文件查看器;Web 端会以全屏
overlay 呈现,桌面端在主窗口内打开。
何时使用
- 交付物是 HTML / Markdown / PDF / office 文档 / 图片,需要用户直接看
- 用户说「打开 / 预览 / 展示这个文件」,或要求用文件浏览器打开
- 文件在
/tmp等当前工作区之外,需要 Dinotty 自动复制进工作区
只需要管理 tab、读屏或写文件时,用 dinotty-tabs / dinotty-sessions /
dinotty-workspace。HTML 专用的老流程(含 legacy Python 兜底)在
dinotty-html-viewer,本 skill 是通用入口。
前置检查
command -v dinotty成功;否则先按dinotty-cli安装- 运行在 Dinotty tab 里时
DINOTTY_PANE_ID/DINOTTY_URL已注入,无需额外参数 - Dinotty 主界面(桌面窗口或浏览器端)已连接;否则返回
NO_UI_CLIENT
dinotty tabs list # 确认实例和 pane 可用(只读)
dinotty --help # 确认 CLI 已安装
命令
dinotty viewer open /path/to/report.pdf
dinotty viewer open ./docs/mockups/layout.html
dinotty viewer open --json ./chart.png
指定实例 / pane / token(不在 Dinotty tab 里时):
dinotty --url http://127.0.0.1:8999 --pane <pane_id> viewer open /tmp/page.html
成功输出:
Opened .claude/artifacts/page.html
request_id: 2ce0f5b3-...
delivered_clients: 2
delivered_clients 为 0 表示没有连着的 UI(通常是 NO_UI_CLIENT)。
路径与 staging
| 情况 | 处理 |
|---|---|
| 文件在工作区内 | 按工作区相对路径直接打开 |
文件在工作区外(/tmp、~/Downloads 等) |
先复制到 <workspace>/.claude/artifacts/;同名同内容复用,同名不同内容加 -1、-2 |
| 相对路径 | 相对于 CLI 当前目录解析,再 canonicalize |
| 目录 / 特殊文件 | NOT_A_FILE |
| 超过查看器上限 | FILE_TOO_LARGE |
path jail 与工作区文件浏览器一致:GET /api/workspace/cwd?pane_id=... 决定
工作区根;跨工作区文件通过 .claude/artifacts/ 进入。
文件类型
查看器是只读的,按扩展名决定渲染方式:
.html:预览 iframe(allow-scripts,不带 same-origin),自包含页面可交互.md/.markdown:Markdown 渲染.pdf:内嵌 PDF.docx/.xlsx/.pptx等 office:转换为预览.png/.jpg/.webp/.gif等图片:直接显示- 其他文本:语法高亮只读文本
HTML 引用同目录 CSS/JS/图片时,Dinotty 通过 preview-token 解析相对路径;把 资源放在 HTML 旁边即可。
错误处理
| code | 处理 |
|---|---|
NO_UI_CLIENT |
让用户先打开 Dinotty 桌面窗口或网页端 |
UNKNOWN_PANE |
DINOTTY_PANE_ID 过期(tab 已关);在当前 tab 重跑,或先 tabs list |
PATH_NOT_FOUND |
路径不存在/不可读;用绝对路径重试 |
OUTSIDE_WORKSPACE |
staging 失败;检查工作区是否可写 |
CWD_UNAVAILABLE / SSH_UNSUPPORTED |
SSH/远程 pane 没有本地工作区,查看器不可用 |
REQUEST_FAILED |
Dinotty 没启动或 --url 错 |
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.
- 10d ago First seen · 106 lines · 108 tokens per session scan A 62df8adc3b69
dinotty-viewer is a skill published in the GitHub repository xichan96/dinotty (741 stars, last pushed today), licensed MIT. It adds 108 tokens to every session and 1,329 once invoked, about $0.0004 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-20.
dinotty-viewer compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| dinotty-viewerxichan96/dinotty | Skill | 741 | today | MIT | A | 108 | Claude Code |
| pdfvitoworleone/claude-code-handbook | Skill | 50 | 2mo ago | MIT | A | 32 | Claude Code, Codex |
| pdf-readingshahidshabbir-se/my-pi-setup | Skill | 1 | 1mo ago | MIT | A | 115 | Claude Code, Codex |
| pdfHmbown/CodeWhale | Skill | 41k | yesterday | MIT | A | 31 | Claude Code, Codex |
| document-processingericrisco/rsc-harness | Skill | 682 | 4d ago | MIT | A | 84 | Claude Code, Codex |
| mathodology-award-gatessweetcornna/mathodology | Skill | 352 | 7d ago | MIT | A | 25 | Claude Code, Codex |
| office-export-pdfsingula-ai/alego | Skill | 110 | yesterday | MIT | A | 18 | Claude Code, Codex |