macos-launchd
LaunchDaemons/LaunchAgents, plist, launchctl, login items, OpenClaw gateway service
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o macos-launchd.zip https://jpskill.com/download/22245.zip && unzip -o macos-launchd.zip && rm macos-launchd.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22245.zip -OutFile "$d\macos-launchd.zip"; Expand-Archive "$d\macos-launchd.zip" -DestinationPath $d -Force; ri "$d\macos-launchd.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
macos-launchd.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
macos-launchdフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
macos-launchd
Purpose
This skill manages macOS launchd services, including LaunchDaemons and LaunchAgents, for tasks like running background processes, handling login items, and setting up the OpenClaw gateway service. It focuses on creating, loading, and controlling services via plist files and launchctl.
When to Use
Use this skill when you need to automate macOS services, such as starting a script on system boot (LaunchDaemon), running an app on user login (LaunchAgent), or ensuring the OpenClaw gateway service persists across reboots. Apply it for system-level tasks requiring persistence or for integrating OpenClaw with macOS environments.
Key Capabilities
- Create and edit plist files for LaunchDaemons/Agents, specifying keys like Label, ProgramArguments, and RunAtLoad.
- Load/unload services using launchctl to control execution.
- Manage login items via System Events in AppleScript or launchctl equivalents.
- Integrate with OpenClaw by configuring a service that runs the gateway, using environment variables for authentication like $OPENCLAW_API_KEY.
- Handle service states, such as enabling/disabling, and monitor logs via Console.app.
Usage Patterns
To accomplish tasks, first create a plist file in /Library/LaunchDaemons (for system-wide) or ~/Library/LaunchAgents (for user-specific). Use launchctl commands to manage it. For OpenClaw integration, embed the gateway command in the plist and reference env vars. Always validate plist syntax before loading. For programmatic access, use AppleScript to add login items, e.g., via osascript.
Common Commands/API
- Use
launchctl load [-w] /path/to/com.example.plistto load a service; the -w flag writes to persistent storage. - Unload with
launchctl unload [-w] /path/to/com.example.plist. - Start/stop services:
launchctl start com.example.labelorlaunchctl stop com.example.label. - Plist format example (in XML):
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key><string>com.example.service</string> <key>ProgramArguments</key><array><string>/usr/bin/python3</string><string>/path/to/script.py</string></array> <key>RunAtLoad</key><true/> </dict> </plist> - For OpenClaw gateway, use
launchctl list | grep openclawto check status. - API note: No direct API; interact via launchctl CLI or SystemConfiguration framework in Swift, e.g.,
SCDynamicStoreCopyConsoleUser()for user context.
Integration Notes
When integrating with OpenClaw, place the gateway service in a plist under ProgramArguments, e.g., <string>/path/to/openclaw-gateway --key $OPENCLAW_API_KEY</string>. Set the env var in the plist using <key>EnvironmentVariables</key><dict><key>OPENCLAW_API_KEY</key><string>your_key</string></dict>. Ensure the service runs as the correct user by adding <key>UserName</key><string>yourusername</string>. For cross-skill integration, reference the macos cluster; export paths like export PATH=$PATH:/usr/bin for launchctl access.
Error Handling
Check launchctl exit codes: 0 for success, non-zero for errors (e.g., 78 for invalid plist). Parse errors with plutil -lint /path/to/com.example.plist to validate before loading. If a service fails, use launchctl error <label> or check system logs with log show --predicate 'subsystem == "com.apple.launchd"'. For OpenClaw, if authentication fails, ensure $OPENCLAW_API_KEY is set and not expired; handle by restarting the service with launchctl kickstart -k com.openclaw.gateway. Always unload and reload services after edits to avoid conflicts.
Usage Examples
- Create a LaunchAgent to run a script on login: First, write a plist file at ~/Library/LaunchAgents/com.example.login.plist with the above format, then run
launchctl load -w ~/Library/LaunchAgents/com.example.login.plist. To verify, uselaunchctl list | grep com.example. - Set up OpenClaw gateway as a LaunchDaemon: Create /Library/LaunchDaemons/com.openclaw.gateway.plist with <key>ProgramArguments</key><array><string>/path/to/openclaw-gateway</string><string>--key</string><string>$OPENCLAW_API_KEY</string></array>, then execute
sudo launchctl load -w /Library/LaunchDaemons/com.openclaw.gateway.plist. Monitor withlaunchctl list com.openclaw.gateway.
Graph Relationships
- Related to: macos (cluster), as it shares tags like "macos" and "services".
- Links to: launchd (tag), for dependent skills like system management; openclaw (embedding hint), for gateway-specific integrations.
- Connected via: plist (tag), potentially linking to file management skills; launchctl (description), for command-line utilities in macos cluster.