dinotty-viewer

dinotty-viewer is a skill for Claude Code from xichan96/dinotty. It costs 108 tokens per session (1,329 once invoked), scanned A, original, MIT.

A file viewer for showing HTML, Markdown, PDF, office documents, and images in the user's connected Dinotty window.

In plain words
What is it for?
Use it to display generated reports, pages, documents, images, and other deliverables, or to preview a file at the user's request.
Why use it?
It prevents files opened on the agent's own computer from being invisible to a user working through a web or remote interface. It can also stage files outside the workspace before showing them.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is dinotty viewer open ./docs/mockups/layout.html.

Good fit Use it to display generated reports, pages, documents, images, and other deliverables, or to preview a file at the user's request.

Compare 6 skills from other repositories ↓
Install

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.

Clone the repo
git clone --depth 1 https://github.com/xichan96/dinotty
agentmods
npx agentmods add skills/xichan96/dinotty/dinotty-viewer

Made for: Claude Code.

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 dinotty-viewer

README.md
[![agentmods](https://agentmods.dev/badge/skills/xichan96/dinotty/dinotty-viewer/github.svg)](https://agentmods.dev/skills/xichan96/dinotty/dinotty-viewer)
Your own site
<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.

agentmods 80×15 button for dinotty-viewer

Your own site · 80×15
<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>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,329 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.00108 $0.01329
Opus 5.5 $0.00043 $0.00532
Sonnet 5.5 $0.00022 $0.00266
Haiku 4.5 $0.00011 $0.00133

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

Security

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.

skills/dinotty-viewer/SKILL.md · 106 lines

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 是通用入口。

前置检查

  1. command -v dinotty 成功;否则先按 dinotty-cli 安装
  2. 运行在 Dinotty tab 里时 DINOTTY_PANE_ID/DINOTTY_URL 已注入,无需额外参数
  3. 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 错

Read the full file on GitHub · 106 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. 10d ago First seen · 106 lines · 108 tokens per session scan A 62df8adc3b69

Subscribe to this mod's changes

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.

Related

dinotty-viewer compared with skills from other repositories

dinotty-viewer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dinotty-viewerxichan96/dinottySkill741todayMITA108Claude Code
pdfvitoworleone/claude-code-handbookSkill502mo agoMITA32Claude Code, Codex
pdf-readingshahidshabbir-se/my-pi-setupSkill11mo agoMITA115Claude Code, Codex
pdfHmbown/CodeWhaleSkill41kyesterdayMITA31Claude Code, Codex
document-processingericrisco/rsc-harnessSkill6824d agoMITA84Claude Code, Codex
mathodology-award-gatessweetcornna/mathodologySkill3527d agoMITA25Claude Code, Codex
office-export-pdfsingula-ai/alegoSkill110yesterdayMITA18Claude Code, Codex