agentleFS
acfatahacfatah/skills/skills/windows-screenshots/SKILL.md

windows-screenshots

Skill0 starsChanged 7 days agoMITView on GitHub

Locate, list, and read the user's Windows screenshots (Win+PrtScn, Snipping Tool) from WSL or native Windows shells; the folder location comes from the SCREENSHOTS environment variable. Use whenever the user mentions a screenshot they took or wants one found, viewed, compared, or attached - "look at my screenshot", "check the latest screenshot", "list today's screenshots", "the screenshot I just took", "find that capture from yesterday" - even if they say "screen capture", "snip", or "the image I just captured" instead of "screenshot".

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When several were taken today and the user does not say which, take the newest by filename timestamp, name it, and say how many others were …

    line 75
  2. Distinctive:

    If nothing matches today, do not stop there: say no screenshots were taken today, show the 5 newest overall, and ask which one they meant.

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Windows Screenshots v1.1.0

Windows screenshots (Win+PrtScn, Snipping Tool) save to the user's Screenshots folder, usually OneDrive-managed. This skill locates and reads them from WSL or native Windows.

Location (required config)

The SCREENSHOTS environment variable holds the folder path. Reference it in the form native to your shell:

ShellVariablePath shape
bash (WSL)"$SCREENSHOTS"/mnt/c/Users/<winuser>/OneDrive/Pictures/Screenshots
bash (Git Bash)"$(cygpath -u "$SCREENSHOTS")"/c/Users/<user>/OneDrive/Pictures/Screenshots
PowerShell$env:SCREENSHOTSC:\Users\<user>\OneDrive\Pictures\Screenshots
cmd%SCREENSHOTS%same as PowerShell

Detect the environment first: WSL if $WSL_DISTRO_NAME is set or /proc/version mentions microsoft; Git Bash if $OSTYPE is msys or cygwin; otherwise you are in a native Windows shell. On non-Windows platforms without /mnt/c, tell the user this skill targets Windows screenshots and ask for a path if they have one.

Git Bash gotcha: a value set via setx arrives in Windows form (C:\Users\...), and bash's glob engine treats backslashes as escape characters - wildcard commands silently match nothing. In WSL the variable comes from ~/.profile already POSIX-form. So in any bash shell, resolve the folder once and use $SHOTS from then on (cygpath ships with Git Bash):

SHOTS="$SCREENSHOTS"
[[ "$OSTYPE" == msys* || "$OSTYPE" == cygwin* ]] && SHOTS="$(cygpath -u "$SCREENSHOTS")"

Setup: SCREENSHOTS unset or folder missing

Auto-detect candidates, checking OneDrive first (Windows commonly redirects Pictures there):

# WSL
ls -d /mnt/c/Users/*/OneDrive/Pictures/Screenshots* /mnt/c/Users/*/Pictures/Screenshots* 2>/dev/null
# Git Bash
ls -d "$OneDrive/Pictures/Screenshots"* "$USERPROFILE/Pictures/Screenshots"* 2>/dev/null
Get-Item "$env:OneDrive\Pictures\Screenshots*", "$env:USERPROFILE\Pictures\Screenshots*" -ErrorAction SilentlyContinue

Exactly one match: use it for the current request, then tell the user how to persist it. Zero or multiple matches: show what you found and ask which path to use.

Persisting:

  • WSL: echo 'export SCREENSHOTS="<path>"' >> ~/.profile - use ~/.profile, not ~/.bashrc: exports below the interactive guard in .bashrc never reach non-interactive agent shells.
  • Native Windows (covers Git Bash, PowerShell, and cmd at once; applies to new sessions): setx SCREENSHOTS "C:\Users\<user>\OneDrive\Pictures\Screenshots"

Default scope: today only

The folder holds years of captures. When the user asks about "my screenshot" they almost always mean one taken today, so limit results to today's date unless they name a different date, a range, or ask for "all" or "the latest ever".

When several were taken today and the user does not say which, take the newest by filename timestamp, name it, and say how many others were taken today.

Files are named Screenshot YYYY-MM-DD HHMMSS.png, so filtering by filename is reliable even when OneDrive sync perturbs modification times:

ls "$SHOTS"/"Screenshot $(date +%Y-%m-%d)"*.png 2>/dev/null | sort -r
Get-ChildItem "$env:SCREENSHOTS" -Filter "Screenshot $(Get-Date -Format yyyy-MM-dd)*.png" | Sort-Object Name -Descending

From cmd, delegate to PowerShell (powershell -NoProfile -Command "...") - cmd has no usable date formatting or globbing.

If nothing matches today, do not stop there: say no screenshots were taken today, show the 5 newest overall, and ask which one they meant.

ls "$SHOTS"/"Screenshot "2*.png | sort -r | head -5
Get-ChildItem "$env:SCREENSHOTS" -Filter "Screenshot 2*.png" | Sort-Object Name -Descending | Select-Object -First 5

Picking the "latest" screenshot

"Latest" means newest by filename timestamp, not by modification time - OneDrive sync events can touch mtimes out of order. But never lexicographically sort the whole folder: it may also hold legacy Screenshot_YYYYMMDD_*.png names and hand-renamed files, and underscore sorts after space in ASCII, so old files float to the top of a plain reverse sort. Sort within the modern pattern instead - its ISO date makes a plain sort chronological:

ls "$SHOTS"/"Screenshot "2*.png | sort -r | head -1
Get-ChildItem "$env:SCREENSHOTS" -Filter "Screenshot 2*.png" | Sort-Object Name -Descending | Select-Object -First 1

Reading a screenshot

The Read tool renders .png files visually. When the user wants you to look at a screenshot (describe it, debug from it, compare it), Read the file directly instead of only listing it. Pass the path in the form native to your environment - the resolved $SHOTS (bash) or $env:SCREENSHOTS (PowerShell/cmd) already is.

Gotchas

  • Ignore desktop.ini - hidden Windows folder metadata that appears in listings and sorts near the top after syncs.
  • Snipping Tool or third-party tools may use other name patterns; if the name filter finds nothing but the user insists a capture exists, widen the search: bash find "$SHOTS" -newermt today \( -iname '*.png' -o -iname '*.jpg' -o -iname '*.jpeg' \), PowerShell Get-ChildItem "$env:SCREENSHOTS" | Where-Object LastWriteTime -gt (Get-Date).Date.
  • A screenshot taken on another device may lag behind OneDrive sync by a minute or two; if the user says "I just took it" and it is missing, wait briefly and retry once before concluding it does not exist.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.