report-viewer
БесплатноБез исполняемых скриптовНе проверенPublish and iterate on browser-viewable reports (Markdown with Mermaid/KaTeX, HTML dashboards, Excalidraw boards, Reveal.js presentations) via the local…
от wickm75 установок в других каталогахОб этом скилле
Report-Viewer (Skill)
Container-Variant: Direct REST API calls, no MCP server required. The viewer runs at
http://localhost:8765from the OpenClaw container. The skill checks the backend on every invocation and starts it automatically if needed.
Prerequisites
- The skill checks the backend health on every invocation.
- If the backend is not running, the skill starts it automatically via
start.sh. - If the backend is running, it is reused as-is.
- No external URLs are ever invented — always use the link returned by
POST /api/publish.
0. Pre-flight: ensure backend is up
# Check health
HEALTH=$(curl -s -m3 http://localhost:8765/api/health 2>/dev/null || echo "")
if echo "$HEALTH" | grep -q '"status": "ok"'; then
echo "Backend already running"
else
echo "Backend not running — starting it..."
cd /config/clawd/skills/report-viewer
nohup ./start.sh >/tmp/rv.log 2>&1 &
sleep 2
# Verify
HEALTH=$(curl -s -m3 http://localhost:8765/api/health 2>/dev/null || echo "")
if echo "$HEALTH" | grep -q '"status": "ok"'; then
echo "Backend started successfully"
else
echo "ERROR: Backend failed to start. Check /tmp/rv.log"
exit 1
fi
fi
1. Format selection
| Format | Use for |
|---|---|
md |
Reports, analyses, architecture docs, tables, Mermaid blocks, KaTeX ($...$ / $$...$$) |
html |
Interactive dashboards (Chart.js, Plotly, ECharts), complex web layouts |
html (Quiz/Flashcard) |
Interactive quizzes & flashcards — take references/quiz-template.html, replace placeholders, publish as html |
excalidraw |
A real .excalidraw board (JSON as content or source_path) — includes mindmaps |
| revealjs | Slide presentations from Markdown (slides separated by ---). Plugins: highlight, zoom (Ctrl+Scroll), search (Ctrl+F) |
Not supported (container): Quarto/.qmd, <stem>_files/. Desktop-only.
2. Publish a report
Inline content:
curl -s -X POST http://localhost:8765/api/publish \
-H "Content-Type: application/json" \
-d '{"title":"<short title>","format":"md|html|excalidraw|revealjs","content":"<raw content>"}'
From a file on disk:
curl -s -X POST http://localhost:8765/api/publish \
-H "Content-Type: application/json" \
-d '{"title":"<short title>","format":"md|html|excalidraw|revealjs","source_path":"/path/to/file"}'
Response contains filename, url, created (true on first publish, false on overwrite).
Give the URL to the user exactly as returned. Never construct URLs yourself.
3. Feedback loop (browser comments → source)
List comments for a report:
curl -s "http://localhost:8765/api/comments?filename=<filename>"Returns an array of comments:
id,author,text,quote,created, optionallyresolved, plus contextual anchors:card_ref(int, flashcard — index of the card) andexcal_id(string, Excalidraw — the element id the comment is tied to).Update the source:
- With
source_path: patch the original file (e.g. the brain vault.md) so the working copy stays in sync. - Without
source_path: rewrite thecontentstring.
- With
In-place overwrite (same URL stays):
curl -s -X POST http://localhost:8765/api/publish \ -H "Content-Type: application/json" \ -d '{"title":"<title>","format":"md|html|excalidraw|revealjs","source_path":"<same path>","filename":"<existing filename>"}'or with
contentinstead ofsource_path.Mark comments resolved (only AFTER publish succeeded):
curl -s -X POST http://localhost:8765/api/comments/<comment_id>/resolveTell the user: what was patched, that they should press F5.
4. Hard rules (never break)
- Iterations always overwrite the same
filename— no new timestamped file (unless the user explicitly asks for a new version). - Resolve comments only after
publish_reportsucceeded. - Never invent URLs — only the link returned by the publish call.
- When
source_pathwas used, keep that file patched (working copy ↔ viewer sync). - If the backend cannot be started → refuse to run, tell the user to check
/tmp/rv.log. - No Quarto, no
.qmd— those are desktop-only.
4.5 Quiz and flashcards (interactive HTML, working)
Both formats are interactive HTML pages served by the viewer. Each one is a single self-contained file in reports/.
Working examples (verified, HTTP 200):
- Quiz, all four question types:
http://localhost:8765/view/quiz-beispiel-alle-formate-v1.html - Flashcards (flip card, right/wrong):
http://localhost:8765/view/flashcards-llm-governance-eu-ai-act.html
Quiz question types (array QUESTIONS in references/quiz-template.html):
type |
Fields | Evaluation |
|---|---|---|
mc |
q, options, correct (index), why |
click an option |
tf |
q, correct (true/false), why |
click true or false |
cloze |
q (with __ as gap), answer |
Установить report-viewer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл report-viewer?
Publish and iterate on browser-viewable reports (Markdown with Mermaid/KaTeX, HTML dashboards, Excalidraw boards, Reveal.js presentations) via the local report-viewer REST API. Use whenever a structured visual report, dashboard, diagram, or presentation should be created or revised and a browser comment-loop is wanted. Not for plain chat answers, not for desktop-only features (Quarto/qmd).
Как установить скилл report-viewer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл report-viewer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic