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★ 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
- Check Playwright MCP tools — confirm
mcp__playwright__browser_navigateand othermcp__playwright__*tools are available. If missing, send the user the install snippet fromreferences/mcp-setup.mdand stop. - Confirm the project root — ask once; default to
/tmp/doc-snapshot-agentif the user has no preference. - Inspect existing artifacts — reuse anything already on disk (see Incremental Execution).
- Parse the case file — merge markers from heading form, HTML-comment form, and the Image Summary table.
- 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.
- Detect tools whose name starts with
mcp__playwright__. Required:browser_navigate,browser_snapshot,browser_take_screenshot. - 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 thepermissions.allow: ["mcp__playwright__*"]note for Claude Code and Codex. - 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
Установить doc-snapshot-agent в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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