The agent-native OpenCode skill is a pre-written instruction file that teaches AI coding assistants (OpenCode, Cursor, Windsurf, etc.) how to use agent-native effectively. It provides:
Electron apps expose a minimal AX tree. When `snapshot -i` returns very few elements:1. Use `key` for keyboard shortcuts: agent-native key Slack cmd+k agent-native key Slack "channel name" return2. Use `screenshot` for visual aid3. Use window title to confirm state: agent-native get title Slack
Once installed, OpenCode automatically knows how to use agent-native:
You: Toggle Wi-Fi off in System SettingsOpenCode: I'll use agent-native to control System Settings.[Runs: agent-native open "System Settings"][Runs: agent-native snapshot "System Settings" -i][Parses output, finds Wi-Fi button at @n3][Runs: agent-native click @n3][Waits for navigation][Re-snapshots, finds Wi-Fi checkbox at @n8][Runs: agent-native uncheck @n8]Done! Wi-Fi is now disabled.
---name: agent-nativedescription: When to use this skill---# agent-native## Prerequisites- What's needed to run agent-native## Core Workflow- The snapshot -> interact -> re-snapshot pattern## Commands- All commands organized by category- Examples for each command- Flags and options## Tips- Best practices- Common patterns- Electron app handling
Create a project-specific skill that extends the base agent-native skill:
skills/custom-automation/SKILL.md
---name: custom-automationdescription: Custom macOS automation workflows for our team---# Custom Automation WorkflowsExtends the agent-native skill with team-specific patterns.## Daily standup in Slack1. Open Slack and navigate to #standup: ```bash agent-native open Slack agent-native key Slack cmd+k "standup" return
<Tip>Project-specific skills help AI agents learn your team's workflows and conventions.</Tip>## Troubleshooting### Skill not recognizedIf the AI agent doesn't seem to know about agent-native:1. **Check skill location**: Ensure the skill is in the correct directory2. **Restart the agent**: Some tools require restart to pick up new skills3. **Explicitly mention it**: Say "Use the agent-native skill to..."### Agent not following patternsIf the agent uses agent-native incorrectly:1. **Remind about re-snapshotting**: "Remember to re-snapshot after clicking"2. **Point to skill section**: "Follow the Electron app patterns from the skill"3. **Show an example**: Demonstrate the correct pattern once### Skill outdatedTo update the skill:```bash# Remove old versionrm -rf ~/.config/opencode/skills/agent-native# Reinstall latestnpx skills add ericclemmons/agent-native