mac-files
Search, read, create, edit, and manage files on Guy's Macs (Mac Mini or MacBook) over SSH. Use when the user wants to find files, read documents, create or edit files, organize folders, or manage files on their Mac. Includes Spotlight search via mdfind.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/flightpath/mac-filesMac Files (File Operations via SSH)
Manage files on remote Macs over SSH. Access is restricted to allowed directories for safety.
Targets
mini(default) — guym@doclibmacbook— guymackenzie@guy-mac-m1
Allowed Directories
~/Documents~/Desktop~/Downloads~/Projects
All paths must be within these directories. Paths outside them are rejected.
Script
scripts/mac-files.sh <action> <target-mac> [args...]
Actions
Finding files:
search <query> [folder]— Spotlight search (mdfind) across allowed dirs, or within a specific foldergrep <pattern> <folder>— Search file contents for text
Reading files:
ls <path>— List directory contentstree <path> [depth]— Tree view (default depth 2)read <path>— Read entire filehead <path> [lines]— First N lines (default 20)tail <path> [lines]— Last N lines (default 20)info <path>— File size, type, modified datedu <path>— Disk usage of directory contents
Creating & editing:
create <path> <content>— Create a new file (creates parent dirs)write <path> <content>— Overwrite a fileappend <path> <text>— Append text to a filemkdir <path>— Create a directory
Moving & organizing:
mv <source> <dest>— Move or rename (both paths must be in allowed dirs)cp <source> <dest>— Copy (both paths must be in allowed dirs)trash <path>— Move to Trash (safer than delete)open <path>— Open file in its default macOS app
Examples
# Spotlight search for tax docs
bash scripts/mac-files.sh search mini "tax 2025"
# List Documents folder
bash scripts/mac-files.sh ls mini ~/Documents
# Read a file
bash scripts/mac-files.sh read mini ~/Documents/notes.txt
# Create a file
bash scripts/mac-files.sh create mini ~/Projects/ideas.md "# Ideas"
# Search file contents
bash scripts/mac-files.sh grep mini "password" ~/Documents
Notes
- Always use
trashinstead of deleting — confirm with user first searchuses macOS Spotlight (mdfind) which is very fast and searches file names and contentopenrequires the Mac to be unlocked to show the app window- Paths can use
~which expands to the target user's home directory
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-flightpath-mac-files": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
mac-calendar
Read and manage Apple Calendar on Guy's Macs (MacBook or Mac Mini) over SSH. Use when the user wants to check calendar events, create events, or manage Apple Calendar in any way.
guy-fastmail
Access Guy's Fastmail email, contacts, and file storage via JMAP API and WebDAV. Use when the user wants to read, send, search, reply to, or manage email. Also use for contact lookup, searching contacts, or managing files in Fastmail file storage. Supports mailbox management, archiving, flagging, and more.