Logo di Screencapture Mac

Screencapture Mac

Community
BretFisher
screencapture-mac

Captures the user's macOS screen, a window, or a region with the built-in `screencapture` CLI, then reads the image so the agent can see what the user sees. Use it when the user asks to check how a native macOS app looks (SwiftUI, AppKit, Electron, Qt, Tk, Java Swing), verify a window rendered correctly after a build or code change, diagnose a visual bug they describe in a desktop app, confirm a menu, dialog, or layout state, or asks "can you see this?" about anything outside a browser, even if they don't say "screenshot". Web pages and web apps belong to a browser automation tool.

Panoramica

AutoreBretFisher
Repositoryskills
Nome della skillscreencapture-mac
Stelle
21
Fork
1
File inclusi
1
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 1 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da BretFisher su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Screencapture Mac in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/BretFisher/skills/tree/main/plugins/utils/skills/screencapture-mac
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/BretFisher/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/utils/skills/screencapture-mac .claude/skills/screencapture-mac
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Screencapture Mac in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Screencapture Mac non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Screencapture Mac non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

screencapture-mac

macOS ships screencapture, a fast CLI for grabbing the screen. Use it to see what the user sees when working on native GUI software. Web apps belong in a browser-automation tool; this skill is for everything else (SwiftUI/AppKit, Electron, Java/Swing, Qt, Tk, games, system UI, Finder, Xcode, etc.).

Core workflow

  1. Capture to the scratch directory with a unique filename. Pick the directory in this order: the session scratch directory when the host names one in its instructions (Claude Code calls it the scratchpad directory), else $TMPDIR, else /tmp. A session directory is isolated from other sessions and from the user's project, so files there cannot collide or clutter shared space. Set OUT to that path and use it in every command below.
  2. Read the image with the Read tool — Agent is multimodal and will see the PNG inline.
  3. Delete the file immediately after reading. The user wants temp space kept clean; never leave screenshots lying around.

Filename convention: $OUT/screencap-$(date +%s).png. The timestamp prevents collisions if you capture multiple times in one task.

Picking the right mode

GoalCommand
Whole main display, no UI soundscreencapture -x -m $OUT/screencap-<ts>.png
All displaysscreencapture -x $OUT/screencap-<ts>.png (one file per screen — macOS appends suffixes)
User picks a window or region interactivelyscreencapture -x -i $OUT/screencap-<ts>.png
Specific rectangle (x,y,width,height in points, origin top-left)screencapture -x -R 100,100,800,600 $OUT/screencap-<ts>.png
Specific window by idscreencapture -x -l <windowid> $OUT/screencap-<ts>.png
Capture after delay (e.g. to let a menu open)screencapture -x -T 3 $OUT/screencap-<ts>.png

Always pass -x so the shutter sound doesn't startle the user.

-i is interactive: it blocks until the user clicks/drags. Only use it when you genuinely need the user to point at something — for autonomous "show me the app's main window" checks, prefer full-screen (-m) or a known rect (-R).

To find a window id for -l, you can run osascript -e 'tell app "System Events" to get id of windows of process "<AppName>"' or use CGWindowListCopyWindowInfo via a small helper; this is rarely worth it — full-screen capture is usually fine.

Full flag reference

text
usage: screencapture [-icMPmwsWxSCUtoa] [files]
  -c         force screen capture to go to the clipboard
  -b         capture Touch Bar — non-interactive modes only
  -C         capture the cursor as well as the screen. only in non-interactive modes
  -d         display errors to the user graphically
  -i         capture screen interactively, by selection or window
               control key — causes screenshot to go to clipboard
               space key   — toggle between mouse selection and window selection modes
               escape key  — cancels interactive screenshot
  -m         only capture the main monitor, undefined if -i is set
  -D<display> screen capture or record from the display specified. -D 1 is main display, -D 2 secondary, etc.
  -o         in window capture mode, do not capture the shadow of the window
  -p         screen capture will use the default settings for capture. The files argument will be ignored
  -M         screen capture output will go to a new Mail message
  -P         screen capture output will open in Preview or QuickTime Player if video
  -B<bundleid> screen capture output will open in app with bundleid
  -s         only allow mouse selection mode
  -S         in window capture mode, capture the screen not the window
  -J<style>  sets the starting of interactive capture
               selection       - captures screen in selection mode
               window          - captures screen in window mode
               video           - records screen in selection mode
  -t<format> image format to create, default is png (other options include pdf, jpg, tiff and other formats)
  -T<seconds> take the picture after a delay of <seconds>, default is 5
  -w         only allow window selection mode
  -W         start interaction in window selection mode
  -x         do not play sounds
  -a         do not include windows attached to selected windows
  -r         do not add dpi meta data to image
  -l<windowid> capture this windowsid
  -R<x,y,w,h> capture screen rect
  -v         capture video recording of the screen
  -V<seconds> limits video capture to specified seconds
  -g         captures audio during a video recording using default input.
  -G<id>     captures audio during a video recording using audio id specified.
  -k         show clicks in video recording mode
  -U         Show interactive toolbar in interactive mode
  -u         present UI after screencapture is complete. files passed to command line will be ignored
  -H         capture content in HDR
  files      where to save the screen capture, 1 file per screen

Cleanup is mandatory

The user keeps temp space tidy. After every Read of the screenshot, immediately rm it in the same logical step. Don't batch — capture, read, delete, one screenshot at a time. If you need a sequence of screenshots, still delete each one as soon as you've consumed it.

Example flow:

bash
OUT="${SCRATCH_DIR:-${TMPDIR:-/tmp}}"   # SCRATCH_DIR = the session scratch path from the host's instructions, if any
screencapture -x -m "$OUT/screencap-1715300000.png"
# → Read tool on $OUT/screencap-1715300000.png
rm "$OUT/screencap-1715300000.png"

If a capture fails (e.g. no Screen Recording TCC permission), screencapture writes a black or empty image rather than erroring loudly. If the Read shows a black/empty frame, tell the user to grant Screen Recording permission in System Settings → Privacy & Security → Screen Recording for the terminal app running Agent, then retry.

When NOT to use this skill

  • Web pages, web apps, anything in a browser → use the browser automation skill.
  • The user asks for a screen recording (video) → screencapture -v works but is rarely what's wanted; ask first.
  • You just want to know what app is focused → osascript -e 'tell app "System Events" to name of first process whose frontmost is true' is faster and doesn't need TCC.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Screencapture Mac?

Captures the user's macOS screen, a window, or a region with the built-in `screencapture` CLI, then reads the image so the agent can see what the user sees. Use it when the user asks to check how a native macOS app looks (SwiftUI, AppKit, Electron, Qt, Tk, Java Swing), verify a window rendered correctly after a build or code change, diagnose a visual bug they describe in a desktop app, confirm a menu, dialog, or layout state, or asks "can you see this?" about anything outside a browser, even if they don't say "screenshot". Web pages and web apps belong to a browser automation tool.

Perché usare Screencapture Mac su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Screencapture Mac è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Screencapture Mac in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/BretFisher/skills/tree/main/plugins/utils/skills/screencapture-mac. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Screencapture Mac?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Screencapture Mac?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Screencapture Mac: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Screencapture Mac è gratuita?

Sì. È pubblicata su GitHub da BretFisher con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇