karabiner-elements/skills/karabiner-elements/SKILL.md
This skill should be used when the user asks to "remap keys", "set up a hyper key", "create Karabiner rules", "configure keyboard shortcuts", "create complex modifications", "set up dual-function keys", "configure app-specific shortcuts", or any Karabiner-Elements setup and troubleshooting on macOS.
npx skillsauth add grailautomation/claude-plugins karabiner-elementsInstall 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.
Configure, customize, and troubleshoot Karabiner-Elements on macOS — including key remapping, complex modifications, profiles, and device-specific rules.
karabiner.json before any write.karabiner_cli when the CLI is available.CONFIG_FILE: ${KARABINER_CONFIG_FILE:-$HOME/.config/karabiner/karabiner.json}
COMPLEX_MODS_DIR: ${KARABINER_COMPLEX_MODS_DIR:-$HOME/.config/karabiner/assets/complex_modifications}
CLI_PATH: ${KARABINER_CLI_PATH:-/Library/Application Support/org.pqrs/Karabiner-Elements/bin/karabiner_cli}
DEVICES_FILE: ${KARABINER_DEVICES_FILE:-$HOME/.local/share/karabiner/karabiner_grabber_devices.json}
LOG_DIR: /var/log/karabiner/
The main karabiner.json structure:
{
"global": { "check_for_updates_on_startup": true, "show_in_menu_bar": true },
"profiles": [
{
"name": "Default",
"selected": true,
"simple_modifications": [],
"fn_function_keys": [],
"complex_modifications": { "parameters": {}, "rules": [] },
"virtual_hid_keyboard": { "keyboard_type": "ansi" },
"devices": [],
"parameters": {}
}
]
}
# Profile management
"$CLI_PATH" --list-profile-names
"$CLI_PATH" --show-current-profile-name
"$CLI_PATH" --select-profile 'Profile Name' # confirm before running
# Variable management
"$CLI_PATH" --set-variables '{"my_var":1, "another_var":true}' # confirm before running
# Configuration validation
"$CLI_PATH" --lint-complex-modifications "$COMPLEX_MODS_DIR"/*.json
# Version and help
"$CLI_PATH" --version
"$CLI_PATH" --help
Before making changes, gather context about the installation, current config, connected devices, and active profile. Use the inspection script at scripts/inspect_environment.sh to automate this.
Each complex modification rule follows this pattern:
{
"description": "Human-readable description",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "source_key",
"modifiers": { "mandatory": ["modifier1"], "optional": ["any"] }
},
"to": [{ "key_code": "target_key", "modifiers": ["modifier"] }],
"to_if_alone": [],
"to_if_held_down": [],
"to_after_key_up": [],
"to_delayed_action": {
"to_if_invoked": [],
"to_if_canceled": []
},
"conditions": [],
"parameters": {}
}
]
}
When a user requests a new mapping:
Always back up before modifying:
cp ~/.config/karabiner/karabiner.json ~/.config/karabiner/karabiner.json.backup.$(date +%Y%m%d%H%M%S)
Use the configuration manager at scripts/config_manager.py for safe JSON manipulation.
Its write commands preview by default; pass --yes only after the user approves
the shown diff.
"selected": true)device_if conditions to target specific keyboardsdevelopment
Parse and analyze Workato recipe JSON exports. Use when the user asks about a Workato recipe's logic, data flow, field mappings, error handling, or control flow. Also use when the user references a .recipe.json file or asks to debug a Workato integration.
databases
Review implementation plans as a staff software engineer. Use when the user asks for staff engineer feedback, senior engineering review, plan review, architecture review, implementation-plan critique, approval before proceeding, risk review, or feedback on a proposed technical plan.
tools
Use when the user invokes $spec-kit:tasks or /spec-kit:tasks, or asks to generate dependency-ordered tasks from the plan and repo context.
testing
Use when the user invokes $spec-kit:specify or /spec-kit:specify, or asks to create a brownfield-aware feature specification from a natural language description.