screenshot
Screenshot Skill
Take screenshots using macOS screencapture command via Bash.
Important: Always Resize for Context
Full-resolution screenshots (especially on Retina/5K displays) produce huge base64 that will exceed the model's context length. Always resize before reading.
Take and View a Screenshot
# 1. Capture full screen
/usr/sbin/screencapture -x -t jpg /tmp/alma-screenshot.jpg
# 2. Resize to 1024px wide (critical for context size!)
/usr/bin/sips --resampleWidth 1024 --setProperty formatOptions 60 /tmp/alma-screenshot.jpg --out /tmp/alma-screenshot-thumb.jpg 2>/dev/null
# 3. Get dimensions
/usr/bin/sips -g pixelWidth -g pixelHeight /tmp/alma-screenshot.jpg 2>/dev/null
Then use the Read tool to read /tmp/alma-screenshot-thumb.jpg (the resized version, NOT the full-size one).
Capture Options
# Full screen (default)
/usr/sbin/screencapture -x -t jpg /tmp/alma-screenshot.jpg
# Interactive window selection
/usr/sbin/screencapture -x -w -t jpg /tmp/alma-screenshot.jpg
# Specific region (x,y,w,h)
/usr/sbin/screencapture -x -R 0,0,800,600 -t jpg /tmp/alma-screenshot.jpg
# With 3-second delay
/usr/sbin/screencapture -x -T 3 -t jpg /tmp/alma-screenshot.jpg
Send Screenshot to User (Telegram)
If the user wants to see the screenshot directly, use the alma CLI or just describe what you see. The full-resolution file is at /tmp/alma-screenshot.jpg.
Tips
- Always resize before reading into context — use the thumb version
-xflag suppresses the capture sound-t jpgoutputs JPEG (smaller than PNG)- Use
sips --setProperty formatOptions 60for higher compression if needed
More from ninehills/skills
file-manager
Find, organize, and manage files on the user's computer. Search by name, type, size, or date. Move, rename, compress, and clean up files.
125self-reflection
Daily self-reflection and personal growth. Triggered by heartbeat at end of day. Review the day's experiences, extract lessons, update personality, and write a diary entry.
124send-file
Send files, photos, audio, or videos to the current chat. MUST use whenever you need to deliver any file to the user. Covers: sending images, selfies, generated art, documents, music, videos, voice messages, screenshots, or ANY file the user asks to see. Triggers: 'send it to me', 'send it over', 'let me see', 'send me', 'show me', 'send photo', 'send file', sharing any file path. NEVER paste raw file paths in text — ALWAYS use this skill to send files.
117news-aggregator-skill
Comprehensive news aggregator that fetches, filters, and deeply analyzes real-time content from 8 major sources: Hacker News, GitHub Trending, Product Hunt, 36Kr, Tencent News, WallStreetCN, V2EX, and Weibo. Best for 'daily scans', 'tech news briefings', 'finance updates', and 'deep interpretations' of hot topics.
99tvscreener
Query TradingView screener data for HK, A-share, A-share ETF, and US symbols with deepentropy/tvscreener. Use for stock lookup, technical indicators (price/change/RSI/MACD/volume), symbol filtering, and custom field/filter-based market queries.
65agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
37