Command Palette

Search for a command to run...

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

doc-snapshot-agent

БесплатноЗапускает вложенные скриптыНе проверен

Automatically illustrate Markdown documents by turning image markers into browser screenshots or AI-generated images, then writing an image-enriched Markdown…

Felo-Incот Felo-Inc★ 251 звезда на GitHub

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

When to Use

Load this skill when a Markdown document needs real images — screenshots of live web pages, AI-generated editorial illustrations, or a rerun that only fixes image placement in an already-processed file.

Use it when the user asks to:

  • add images to a Markdown article
  • process a case file with image markers
  • capture screenshots for documentation
  • generate article visuals and insert them into a document
  • rerun or fix image placement in an already processed document

Do not use it for pure text editing, proofreading, or translation — those tasks do not benefit from browser automation or image generation and should be handled directly.

Architecture

This skill has a single entry point (this file) plus four sibling references for depth. It does not create hidden memory folders, does not persist browser state, and does not send any data beyond what the target workflow requires.

All paths (input cases, output images, illustrated Markdown, cache) resolve under one {project-root} the user names at the start of the run. Browser work routes exclusively through the Playwright MCP server; generated images route through a bundled Python script that calls OpenRouter.

Quick Start

  1. Check Playwright MCP tools — confirm mcp__playwright__browser_navigate and other mcp__playwright__* tools are available. If missing, send the user the install snippet from references/mcp-setup.md and stop.
  2. Confirm the project root — ask once; default to /tmp/doc-snapshot-agent if the user has no preference.
  3. Inspect existing artifacts — reuse anything already on disk (see Incremental Execution).
  4. Parse the case file — merge markers from heading form, HTML-comment form, and the Image Summary table.
  5. Capture, generate, place, write README — follow the Workflow section.

Quick Reference

Topic File
Install Playwright MCP for each client, grant permissions, runtime setup references/mcp-setup.md
Navigate, snapshot, login, capture, verify — full browser loop and tool patterns references/browser-capture.md
Build and maintain site-specific navigation knowledge references/site-explorer.md
Prompt construction and script usage for generated images references/image-generation.md
Image generation CLI scripts/generate_image.py

Approach Selection

Situation Best path Why
Article already has screenshots in output/{article-id}/raw/ and the user only wants the Markdown rebuilt Skip capture, rerun Step 5 (Illustrated Markdown) Browser work is expensive; Markdown regeneration is cheap
Marker type is screenshot and the page is publicly reachable Playwright MCP navigate → snapshot → capture Reliable, inspectable, handles JS rendering
Marker type is screenshot and the page is behind auth Playwright MCP with PLAYWRIGHT_CRED_* env vars Keeps secrets out of prompts and the transcript
Marker type is generated (editorial, hero, conceptual) scripts/generate_image.py via OpenRouter Screenshots cannot render conceptual imagery
Marker landed on the wrong paragraph Reparse case file, reapply semantic placement Re-capturing won't fix placement bugs
Required MCP tools are missing in the runtime Stop, point user to references/mcp-setup.md Workflow cannot proceed without MCP

Workflow

Step 0: Verify Playwright MCP

Run this check at the start of every execution, not just the first time.

  1. Detect tools whose name starts with mcp__playwright__. Required: browser_navigate, browser_snapshot, browser_take_screenshot.
  2. If they are missing, stop and hand the user the matching install snippet from references/mcp-setup.md (Claude Code, Codex, VS Code/Cursor/Kiro, Claude Desktop, or standalone). Include the permissions.allow: ["mcp__playwright__*"] note for Claude Code and Codex.
  3. After the user installs and restarts the client, resume from here rather than restarting the run.

Do not substitute direct Playwright library calls or any browser tool that lacks the mcp__playwright__ prefix. If the prefix is missing, the call does not go through the MCP server.

Step 0.5: Confirm the project root

Ask once:

Which directory should I use as the project root for this run?

  • If the user provides a path, use it as {project-root}.
  • If the user says "no preference", skips, or does not answer, default to /tmp/doc-snapshot-agent.
  • Create the directory if it does not exist.

All subsequent paths (cases/, output/, .cache/, scripts/, references/) resolve under {project-root}/.

Recommended layout inside {project-root}/:

{project-root}/
├── cases/
│   └── {article-id}.md
├── output/
│   ├── {article-id}/
│   │   ├── raw/
│   │   │   ├── A1_example.png
│   │   │   └── A2_example.png
│   │   ├── A1_example.png
│   │   ├── A2_example.png
│   │   └── README.md
│   └── markdowns/
│       └── {article-id
Полный SKILL.md на GitHub

Установить doc-snapshot-agent в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

LICENSEREADME.mdclawhub.jsonreferences/browser-capture.mdreferences/image-generation.mdreferences/mcp-setup.mdreferences/site-explorer.mdscripts/generate_image.py

FAQ

Что делает скилл doc-snapshot-agent?

Automatically illustrate Markdown documents by turning image markers into browser screenshots or AI-generated images, then writing an image-enriched Markdown output. Use when a document needs screenshots, generated visuals, semantic image placement, or end-to-end document illustration automation.

Как установить скилл doc-snapshot-agent?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл doc-snapshot-agent запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить doc-snapshot-agent с