Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

report-viewer

БесплатноБез исполняемых скриптовНе проверен

Publish and iterate on browser-viewable reports (Markdown with Mermaid/KaTeX, HTML dashboards, Excalidraw boards, Reveal.js presentations) via the local…

wickmот wickm75 установок в других каталогах

Об этом скилле

Report-Viewer (Skill)

Container-Variant: Direct REST API calls, no MCP server required. The viewer runs at http://localhost:8765 from 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)

  1. List comments for a report:

    curl -s "http://localhost:8765/api/comments?filename=<filename>"
    

    Returns an array of comments: id, author, text, quote, created, optionally resolved, plus contextual anchors: card_ref (int, flashcard — index of the card) and excal_id (string, Excalidraw — the element id the comment is tied to).

  2. 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 the content string.
  3. 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 content instead of source_path.

  4. Mark comments resolved (only AFTER publish succeeded):

    curl -s -X POST http://localhost:8765/api/comments/<comment_id>/resolve
    
  5. Tell 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_report succeeded.
  • Never invent URLs — only the link returned by the publish call.
  • When source_path was 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
Полный SKILL.md на ClawHub

Установить 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), без исполняемых скриптов.

Похожие скиллы

Сравнить report-viewer с