This folder contains an OpenClaw-compatible skill that lets you control OnlySwitch with natural language via OpenClaw. For example, you can say:
- "Empty trash"
- "Toggle keep awake"
- "Turn on dark mode"
- "Clear clipboard"
- "Mute the mic"
- "Clear Xcode derived data"
OpenClaw will resolve your request to the right OnlySwitch built-in switch or button and open the deeplink onlyswitch://run?type=builtIn&id=<id>.
- OnlySwitch installed and running (so it can handle
onlyswitch://URLs). - OpenClaw installed and configured.
Load the skill so OpenClaw can see it. Choose one of the following.
Add this repo’s skills folder to OpenClaw’s config so it loads the OnlySwitch skill from here (e.g. after cloning the OnlySwitch repo):
-
Open (or create)
~/.openclaw/openclaw.json. -
Under
skills.load, setextraDirsto include the path to this repo’s skills:{ "skills": { "load": { "extraDirs": [ "/path/to/OnlySwitch/OpenClaw/skills" ] } } }Replace
/path/to/OnlySwitchwith your actual path (e.g.~/Developer/OnlySwitch). -
Restart OpenClaw (or start a new session). The skill will be eligible on macOS only (
darwin), as set in the skill metadata.
Copy the skill into OpenClaw’s local skills directory so all your agents can use it:
cp -R /path/to/OnlySwitch/OpenClaw/skills/onlyswitch-deeplink ~/.openclaw/skills/Again, use your real path to the OnlySwitch repo. OpenClaw loads skills from ~/.openclaw/skills automatically.
If you run OpenClaw with a workspace that lives inside the OnlySwitch repo, you can put the skill at <workspace>/skills/onlyswitch-deeplink. Workspace skills take precedence over managed and bundled skills.
- Input: Natural language (e.g. “empty trash”, “keep awake”, “dark mode”).
- Behavior: The agent uses the skill’s reference table to map your phrase to a built-in switch id, then runs:
open "onlyswitch://run?type=builtIn&id=<id>". - Output: A short confirmation of which OnlySwitch action was triggered.
The list of built-in switches and their ids comes from Modules/Sources/Switches/SwitchType.swift in this repo.