| name | lark-doc-longshot |
| description | This skill should be used when the user wants to turn a Feishu/Lark Doc, Wiki, document URL, or pasted content into one or more long screenshots by rendering the page/content in a browser-like presentation, reading, or wide-screen mode instead of using the official PDF export. It is especially useful when API PDF export cuts off tables, embedded sheets, wide blocks, images, or complex layouts. |
| description_zh | 飞书文档长图截图 |
| description_en | Lark doc long screenshot |
| disable | false |
| agent_created | true |
lark-doc-longshot
When to use
Use this skill when any of these are true:
- The user provides a Feishu/Lark Doc, Wiki, or document link and asks to export it as a long image, long screenshot, poster, or vertical image.
- The user says official Feishu/Lark PDF export has layout problems, especially table truncation, embedded sheet truncation, image clipping, or page-break issues.
- The user asks to switch a Feishu/Lark document into presentation, reading, full-screen, or wide-screen mode and then screenshot it.
- The user provides Markdown, HTML, pasted notes, or other content and asks to render it as a long image using a document-like visual layout.
Do not use this skill for pure text summarization, PDF API export, or editing Feishu document content. For official Feishu content reading/editing, use lark-doc first; for exporting official PDF specifically, use lark-wiki-pdf-export.
Core principle
Prefer browser-real rendering over official PDF export. The target result should match what a human sees in the Feishu/Lark web page or in a controlled HTML renderer, not what the export API produces.
Default decision:
- For Feishu/Lark links: open the live page in a browser context with login access, normalize the page into a clean reading/wide-screen view, then screenshot and stitch.
- For pasted content: create a temporary local HTML renderer, apply print-like readable CSS, then screenshot and stitch.
- For very wide tables: either expand the viewport/zoom out first, or capture the table separately and include it as an additional image. Do not rely on a narrow full-page screenshot if the table has horizontal scrolling.
Workflow
1. Classify the input
- If the input is a Feishu/Lark URL, keep the URL as the primary source. Do not fetch via official PDF export unless the user explicitly requests PDF.
- If the input is Markdown, HTML, or pasted text, render it into a local HTML file first.
- If the input contains both a URL and extra instructions, treat the URL as source and the extra instructions as rendering preferences.
2. Prepare browser rendering
Use available browser automation capabilities. If the environment requires a skill for browser work, load the browser/webapp testing skill before interacting with the page.
Non-intrusive browser policy
Run browser rendering in the background by default. Do not steal focus, open visible windows, or disrupt the user's daily browsing experience unless login or manual authorization is strictly required.
Default browser strategy:
- Prefer a headless/background browser session with a dedicated temporary profile under the current workspace output directory.
- Reuse that dedicated profile for the current task only when login state is needed; do not attach to or modify the user's normal browser profile.
- Never bring the browser to foreground merely for screenshots. Avoid
open/visible Chrome unless authentication is blocked.
- If login is required, ask the user before opening a visible login window. After the user finishes login, close the visible window and continue capture in background/headless mode using the same dedicated profile.
- Do not close the user's daily Chrome/Safari/Edge windows. Only close browser processes started for this task, identified by their dedicated profile path.
- If background/headless rendering causes visual corruption or missing content, try non-focused headed automation first; only then ask the user whether a visible foreground browser is acceptable.
For Feishu/Lark links:
- Open the URL in a background browser context that has, or can obtain, Feishu login state.
- If login is missing, ask the user to authenticate in a temporary visible login window or provide an accessible exported/public version. Do not try to bypass access control.
- Wait until the document body, images, tables, embedded blocks, and lazy-loaded sections finish rendering.
- Prefer these UI adjustments in order:
- hide left/right sidebars, outline panels, comments, floating toolbars, and top navigation where possible;
- enable reading mode or wide-screen mode if available;
- use presentation mode only if it preserves continuous content; if it paginates slides, avoid it for long-image output unless the user wants slide-by-slide screenshots;
- set browser zoom between 80% and 100%; use 67% only for very wide tables.
For pasted content:
- Create a local HTML file under the current workspace output directory.
- Use a clean article layout: width 900-1200px, white background, 16-18px body text, visible table borders,
table-layout: auto, and overflow: visible where possible.
- Render code blocks, callouts, and tables in a way that preserves readability in a long PNG.
3. Capture long screenshots
Prefer segmented screenshots plus stitching instead of a single full-page screenshot when the page is long.
Recommended capture strategy:
- Measure full scroll height and viewport height.
- Set viewport width based on content:
- normal documents: 1200-1440px;
- wide tables: 1600-2200px, or zoom out before capture;
- Xiaohongshu-style vertical cards: capture at 1080px width after redesign/cropping.
- For Feishu Wiki/Doc pages, identify the real scroll container (often a
bear-web-x-container-like inner container) rather than assuming window is scrollable.
- Store a stable reference to the chosen scroll container before scrolling; avoid relying only on DOM indexes because Feishu may re-render and shift indexes.
- Warm lazy-loaded content by scrolling the chosen container to the bottom and back to top before final capture.
- Move the mouse to a harmless blank corner and hide tooltip/popover elements before screenshots to avoid repeated hover bubbles in every segment.
- Scroll from top to bottom with 10-30px overlap between segments.
- Wait briefly after each scroll for lazy-loaded images and sticky elements to settle.
- Hide or neutralize sticky headers/toolbars before each capture when possible.
- Crop away Feishu chrome such as top bar, side navigation, and wiki outline when the user wants a clean long image.
- Stitch segments vertically, removing overlap bands if duplicated content is obvious.
- If the stitched image exceeds practical limits, split into multiple PNGs by logical sections.
Read the detailed checklist in @references/browser-longshot-checklist.md when executing this skill.
4. Handle tables and embedded content
For tables, embedded sheets, or wide blocks:
- Check whether horizontal scrolling exists before screenshotting.
- Try wide-screen mode, larger viewport width, and browser zoom-out before capture.
- If the table still clips horizontally, capture the table as a separate wide image and mention this in the final result.
- If an embedded sheet/bitable is inside the doc and the visible area is not enough, open the embedded resource directly if accessible, then capture it separately.
- Do not claim the long image fully preserves a table unless the screenshot was visually checked.
5. Verify the output
Before delivering the image, inspect the final PNG or sample segments:
- Confirm the top and bottom are not missing.
- Confirm no repeated sticky header appears in every segment.
- Confirm tables are not cut horizontally or vertically.
- Confirm images and embedded blocks are loaded.
- Confirm text is readable at expected viewing width.
- Confirm the file path is under the workspace or a user-requested output directory.
6. Deliver results
Deliver the final long PNG first. If the output is split, deliver all PNGs in reading order. If any table or embedded block had to be captured separately, deliver those supporting images after the main long image.
When the source file is outside the workspace and the user is on Mini Program, remind the user to enable artifact return if needed. Do not delete intermediate screenshots until the user confirms the result is acceptable.
Pitfalls
- Official PDF export often truncates complex tables; avoid using it as the main path for this skill.
- Presentation mode may paginate content and is not always suitable for a single long image.
- Full-page screenshot APIs can fail or produce blank areas on very tall pages; segmented capture is safer.
- Feishu/Lark documents require authorization. Never bypass login, tokens, or permissions.
- Visible browser windows can interrupt the user's workflow. Keep rendering and screenshots in background/headless mode by default; request visible login only when unavoidable.
- Horizontal table scroll is the main failure mode. Always check it explicitly.
- Browser sticky headers and floating toolbars can be duplicated in stitched images; hide them or crop overlaps.
- Hover tooltips can persist after clicking wiki/sidebar items and repeat in every segment; move the mouse away and hide tooltip/popover elements before capture.
- Feishu may scroll inside an inner document container rather than
window; choose and reuse the real scroll container.
- Very large PNGs may exceed viewer limits. Split into multiple vertical images when necessary.
Verification
A task using this skill is complete only when:
- At least one final PNG exists and opens successfully.
- The document/table areas that motivated the request are visible and not truncated.
- The user receives the output files as attachments or a previewable result.
- Any known limitations are stated briefly and concretely.