skeleton.capture
Measure a page’s real UI at several widths and save a skeleton file of exact boxes for loading placeholders, so placeholders match the layout across breakpoints.
Instructions
Measure the real UI at several widths and save a skeleton (bones) file: the exact boxes a loading placeholder should draw. Elements carrying the marker attribute (default data-skeleton) are used when present; otherwise the layout under selector is decomposed automatically - wrapped text into one bone per visual line, media and controls into their own boxes, and any container that paints a background or a rounded border into a lighter surface bone drawn underneath its children. Circles, pills and asymmetric corners are preserved as such. Bones are matched across widths by DOM position, so an element that only exists on desktop is recorded as absent on mobile rather than shifting the rest. Viewport emulation is always cleared afterwards.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "skeleton.capture"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Navigate here first. Omit to measure the current page. | |
| name | Yes | Name to save the skeleton under; also its filename. | |
| height | No | Viewport height for every width. Default 900. | |
| marker | No | Attribute marking elements to measure. Default "data-skeleton". | |
| mobile | No | Emulate a mobile device as well as the width. Off by default: on a page without a <meta name="viewport"> it forces a 980px layout viewport, so the media queries evaluate at the wrong width and the capture describes the desktop layout. | |
| widths | No | CSS widths to capture. Default [375, 768, 1280]. | |
| replace | No | Discard widths from an earlier capture of this name instead of merging them. By default re-capturing at one width keeps the others. | |
| min_size | No | Ignore boxes smaller than this in CSS px. Default 1, which keeps hairline dividers. | |
| selector | No | Root to measure. Default body. Narrow this to skeleton one component. | |
| leaf_tags | No | Extra tags to capture as a bone when they have no children. Added to p, h1-h6, li, td, th. | |
| max_bones | No | Cap on bones per capture. Default 400. | |
| max_lines | No | Cap on line bones per text run. Default 12. | |
| save_path | No | Also write the .bones.json here. | |
| target_id | No | Target handle (tgt_*). Omit for the active page. | |
| browser_id | No | Browser handle (br_*). Omit to use the only running browser, or auto-launch one. | |
| containers | No | Emit a lighter surface bone for containers that paint a background, image or rounded border, drawn underneath their children so a card reads as a card. Default true. | |
| exclude_tags | No | Tags to skip entirely, with their whole subtree, e.g. ["nav","footer"]. | |
| include_bones | No | Return every bone inline. Off by default: the summary is usually enough. | |
| default_radius | No | Corner radius in px for bones whose element has none. Default 8. | |
| exclude_selectors | No | CSS selectors to skip entirely, with their subtrees, e.g. [".icon","[data-no-skeleton]"]. An invalid selector is ignored rather than failing the capture. | |
| device_scale_factor | No | ||
| capture_rounded_borders | No | Treat a rounded element with a visible border as a surface even when its background is white or transparent. Default true. |