skills/launchd-helper/SKILL.md
Auto-triggered when working with launchd agents, plist files, or background automation on macOS. Proactively checks for common pitfalls and applies learned patterns to prevent issues before they occur.
npx skillsauth add szoloth/skills launchd-helperInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Proactive assistant for macOS launchd agents and background automation. Applies learned patterns to prevent common pitfalls.
.plist files in ~/Library/LaunchAgents/launchctlProblem: Without a timeout, hung processes accumulate as zombies.
Rule: Every plist should have TimeoutSeconds set (typically 300-600 for most jobs).
<key>TimeoutSeconds</key>
<integer>300</integer>
Check: If missing, warn and suggest adding it.
Problem: /usr/bin/python3 is restricted by macOS security. Scripts fail silently or with permission errors.
Rule: Use the user-installed Python path (typically from Homebrew or pyenv).
<!-- Wrong -->
<string>/usr/bin/python3</string>
<!-- Correct -->
<string>/opt/homebrew/bin/python3</string>
<!-- or -->
<string>~/.pyenv/shims/python3</string>
Check: If /usr/bin/python appears in ProgramArguments, flag it.
Problem: launchd agents run in a restricted context. Operations that need user context (GUI access, certain file operations) fail.
Rule: Wrap permission-sensitive scripts in osascript to bypass sandboxing.
<key>ProgramArguments</key>
<array>
<string>/usr/bin/osascript</string>
<string>-e</string>
<string>do shell script "/path/to/your/script.sh"</string>
</array>
Check: If the script interacts with GUI apps, Finder, or user directories, suggest the osascript wrapper.
Problem: Node.js child processes (spawn, exec) don't die when the parent is killed. Zombies accumulate.
Rule: Use spawn({detached: true}) and process.kill(-pid) to kill the entire process group.
const child = spawn('command', args, { detached: true });
// Later, to kill the entire tree:
process.kill(-child.pid);
Check: If the launchd agent runs Node.js scripts that spawn children, verify cleanup pattern is used.
When I see a plist being created or edited, I will:
/usr/bin/pythonUser: Create a launchd agent that runs my backup script every hour
Claude: I'll create that agent. Before I do, let me apply the launchd patterns:
✓ Adding TimeoutSeconds (300s) to prevent zombie accumulation
✓ Your script uses Python - using /opt/homebrew/bin/python3 (not /usr/bin)
⚠ Your backup script accesses ~/Documents - wrapping in osascript for permissions
✓ Adding StandardErrorPath for debugging
Here's the plist:
[generates plist with all patterns applied]
When an agent isn't working:
log show --predicate 'subsystem == "com.apple.launchd"' --last 5mlaunchctl list | grep [label]which python3content-media
Fetch transcripts from YouTube videos for summarization and analysis.
documentation
This skill should be used when reviewing or editing written drafts to ensure they match Sam's personal style guide. It prioritizes voice preservation and anti-beige detection while catching structural gaps. Triggers on requests to review, edit, or improve written content.
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
development
Web search and content extraction using Brave Search. Use when researching topics, finding documentation, extracting article content, or gathering information from the web. No browser required - works headlessly.