docs-media — Media Analysis
Before Starting#
- Get the repository. Ask for the GitHub repo URL or
{user}/{repo}. - Check Docsbook. Run
mcp__docsbook__list_workspacesto find the workspace.- If found → use
mcp__docsbook__get_doc_graphandmcp__docsbook__read_doc_sectionsto scan image references in markdown. - If not found → offer to add it first.
- If found → use
- Check the graph. If
get_doc_graphreturns an empty graph or no data → runmcp__docsbook__reindex_doc_graphto generate it, then retry. If it returns a stale warning, offer to reindex before proceeding. - Two levels of analysis. From Docsbook MCP, detect issues visible in markdown (missing alt, generic filenames in links, missing captions). Physical file checks (size, age) require local repo access — note which checks need it.
- Skip if no media. If
read_doc_sectionsfinds no image or video references, skip this skill.
Core Principles#
1. Text is primary, media amplifies#
Images, videos, and diagrams should strengthen the text — not replace it. A page that is 80% screenshots is an anti-pattern.
2. Stability over beauty#
UI changes. Full-page screenshots go stale fastest. For frequently-changing UI, a text description ages better than a screenshot.
3. Lightweight by default#
Large media files slow page load and hurt SEO. PNG screenshots under 500 KB, GIF under 2 MB.
4. Diagrams as code#
A Mermaid diagram in markdown versions with the code, renders automatically, and updates in a PR. A static PNG requires a designer and goes stale silently.
Checklist#
File Formats#
| Content type | Recommended format | Notes |
|---|---|---|
| UI screenshot | PNG (or WebP) | Sharp text; never JPG for UI |
| Photo / illustration | WebP > JPG | Natural images |
| Short animation | GIF or MP4 | ≤ 5 seconds |
| Long video | YouTube/Loom embed | > 5 seconds — do not commit video files |
| Architecture diagram | Mermaid in markdown | Code-first, versions in git |
| Logo / icon | SVG | Scalable, no quality loss |
- PNG for UI screenshots — not JPG (JPG degrades text rendering)
- GIF only for short animations — ≤ 5 seconds, ≤ 2 MB
- No video files committed to the repo — use YouTube, Loom, or Vimeo embeds
- Mermaid preferred over static PNG for diagrams and flowcharts
File Size (local repo check)#
- PNG screenshot < 500 KB
- GIF < 2 MB
- Total media per page < 5 MB
- No MP4/MOV files committed to repo
# Find large media files
find . -type f \( -name '*.png' -o -name '*.jpg' -o -name '*.gif' -o -name '*.mp4' \) -size +500k -exec ls -lh {} \;File Names (detectable from markdown links)#
- kebab-case —
workspace-settings-api-keys.png - Descriptive — name describes content, not position: not
screenshot1.png,image.png,Screenshot 2024-01-15.png - No spaces or special characters in file names
- No timestamps in file name — content description, not capture date
- Prefix by type optionally —
ui-,diagram-,icon-
Alt Text (detectable from markdown)#
- All informative images have alt —
not - Decorative images have empty alt —
 - Alt describes content — "Workspace settings with API key field" not "Screenshot"
- Alt is not "image of" / "screenshot of" — screen reader already announces it
- Length ≤ 125 characters — longer descriptions go in the body
UI Screenshots#
- Cropped to the relevant area — not the full browser window with chrome
- No personal data — use test accounts, placeholder names/emails
- No timestamps visible on the screenshot itself (they go stale)
- Important area is highlighted — box, arrow, or highlight overlay
- Consistent theme — all screenshots in light mode OR all in dark mode
Screenshot Freshness (local repo check)#
Screenshots older than 180 days in an actively developed product are very likely stale:
# Screenshots older than 180 days
find . -name '*.png' -mtime +180 -exec ls -lh {} \;From Docsbook MCP: check last_updated of pages containing screenshots — if a page hasn't been updated in 180+ days and contains screenshots, flag for manual review.
Videos#
- Captions/subtitles on all videos
- Transcript or summary in the page text
- Not auto-play
- Described in text before the embed — what the video shows, how long it is
- Hosted externally — YouTube, Loom, Vimeo — not committed as a file
Diagrams#
- Mermaid in markdown for flowcharts, architecture, ER diagrams:
```mermaid graph LR GitHub --> Docsbook Docsbook --> CDN CDN --> Users ``` - Source file saved alongside PNG export —
.excalidraw,.drawio— so diagrams can be updated - Text alternative for complex diagrams that can't be Mermaid
- Readable in both light and dark mode
What to Look For#
| Severity | Problem | Detection |
|---|---|---|
critical |
Informative image with no alt | ![]() in markdown |
high |
PNG > 1 MB | find by size (local) |
high |
Generic filename — screenshot1.png, image.png |
Regex on image links in markdown |
high |
Video file committed to repo (> 5 MB) | find *.mp4 *.mov (local) |
high |
JPG used for UI screenshot | .jpg extension on UI images |
high |
Full browser screenshot (not cropped) | Width > 1500px (local exif/identify) |
medium |
GIF > 2 MB | find by size (local) |
medium |
Screenshot on a page not updated in 180+ days | Page last_updated + image presence |
medium |
Static PNG diagram that could be Mermaid | PNG with architecture/flow content |
medium |
Video without caption note | No "captions" / "transcript" near embed |
low |
Timestamp in filename | Regex \d{4}-\d{2}-\d{2} in filename |
low |
Missing highlight on screenshot | No mention of highlight/annotation |
Output Format#
{
"file": "docs/quick-start.md",
"line": 34,
"severity": "critical",
"rule": "image-missing-alt",
"found": "Line 34:  — informative image with no alt text.",
"suggestion": "Add descriptive alt: ''"
}{
"file": "docs/guides/api-setup.md",
"line": 67,
"severity": "high",
"rule": "generic-filename",
"found": "Line 67:  — filename 'screenshot1.png' is not descriptive and will be impossible to identify when the folder has many screenshots.",
"suggestion": "Rename to a descriptive kebab-case name: 'screenshots/api-settings-key-field.png'. Update the link in the markdown."
}{
"file": "docs/architecture.md",
"line": 12,
"severity": "medium",
"rule": "diagram-could-be-mermaid",
"found": "Line 12:  — static PNG diagram. Hard to keep updated without design tools.",
"suggestion": "Convert to Mermaid:\n```mermaid\ngraph LR\n GitHub --> Docsbook\n Docsbook --> CDN\n CDN --> Users\n```\nMermaid renders automatically, versions in git, and updates in a PR without design software."
}Task-Specific Questions#
When invoked directly, ask:
- Is local repo access available? File size and age checks require it.
- What's the screenshot freshness threshold? Default is 180 days.
- Convert PNG diagrams to Mermaid? Or just report them?
Tool Integrations#
| Tool | Purpose |
|---|---|
mcp__docsbook__list_workspaces |
Find workspace |
mcp__docsbook__get_doc_graph |
Page list with timestamps |
mcp__docsbook__read_doc_sections |
Scan image references in markdown |
find + stat (Bash, local) |
File size and age checks |
identify / exiftool (local) |
Image dimensions |
Related Skills#
docs-accessibility— alt text is an a11y requirementdocs-maintenance— stale screenshots are a maintenance issuedocs-seo— descriptive filenames and alt text help SEOdocs-analyze— orchestrator