AgentSkillsCN

frontpage

在电子墨水设备上显示报纸头版。当用户希望查看、展示、呈现或发送报纸头版至其电子墨水显示屏时,可使用此功能。支持诸如“显示《纽约时报》头版”“给我看看《华盛顿邮报》”“把《洛杉矶时报》放到我的电子墨水屏上”,或仅仅“显示[报纸名称]”等请求。同时支持常见的缩写形式(NYT、WaPo、LAT等)。

SKILL.md
--- frontmatter
name: frontpage
description: Display newspaper front pages on an eink device. Use when users want to view, display, show, or send a newspaper's front page to their eink display. Supports requests like "display the New York Times front page", "show me the Washington Post", "put the LA Times on my eink", or just "show [newspaper name]". Handles common abbreviations (NYT, WaPo, LAT, etc.).

Frontpage Skill

Display newspaper front pages from frontpages.com on an eink device.

Workflow

  1. Check/refresh URLs - Read /home/slzatz/headlines/frontpageurls.json.

    • If the file doesn't exist, run retrieve_fp_urls to create it.
    • If the date in any URL path doesn't match today's date (format: /g/YYYY/MM/DD/...), run retrieve_fp_urls to refresh.
    • Note: Refreshing takes 1-2 minutes as it uses Playwright to visit each newspaper's page on frontpages.com. Inform the user this is happening.
  2. Match newspaper name - Convert user input to the slug format. See references/newspapers.md for aliases.

    • If the requested newspaper isn't in the JSON file, inform the user it's not currently tracked and offer to show available newspapers from the JSON keys.
  3. Download front page - Run get_front_page <newspaper-slug> (saves to /home/slzatz/headlines/fp.jpg)

  4. Send to display - Run send_to_display /home/slzatz/headlines/fp.jpg. If it fails with a network error, retry up to 5 times with a 5-second delay between attempts before reporting failure.

Commands

bash
retrieve_fp_urls                         # Refresh URL list (once daily, takes 1-2 min)
get_front_page <newspaper-slug>          # Download front page image
send_to_display /home/slzatz/headlines/fp.jpg  # Send to eink

Expected Output

retrieve_fp_urls:

code
Fetching: new-york-post
  -> /g/2026/01/20/new-york-post-114445yde2cwt.webp
Fetching: the-new-york-times
  -> /g/2026/01/20/the-new-york-times-070523265avuz.webp
...
Updated 11 newspaper URLs

get_front_page:

code
Fetching: https://www.frontpages.com/g/2026/01/20/the-new-york-times-...
Image saved to fp.jpg

send_to_display (success):

code
Processing /home/slzatz/headlines/fp.jpg...
...
Success! Image sent to frame.

send_to_display (failure): Look for connection errors, timeouts, or "Failed" messages. The ESP32 can be flaky - retry up to 5 times with 5-second delays.

Example

User: "Display the NYT front page"

  1. Read /home/slzatz/headlines/frontpageurls.json - check dates are current
  2. Match "NYT" → "the-new-york-times"
  3. Run get_front_page the-new-york-times
  4. Run send_to_display /home/slzatz/headlines/fp.jpg
  5. Confirm: "The New York Times front page is now on your eink display."