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 keyboardsdocumentation
Write a feature spec or PRD from a problem statement or feature idea
development
Synthesize qualitative and quantitative user research into structured insights and opportunity areas. Use when analyzing interview notes, survey responses, support tickets, or behavioral data to identify themes, build personas, or prioritize opportunities.
research
Synthesize user research from interviews, surveys, and feedback into structured insights
data-ai
Generate a stakeholder update tailored to audience and cadence