Platform Adapters
Platform adapters bridge the skill registry with agent runtimes. Each adapter knows the target platform's directory structure and copies skill files accordingly.
How Adapters Work
When you run skern skill install, the adapter:
- Reads the
SKILL.mdfrom the skern registry - Creates the platform-specific skill directory
- Copies the
SKILL.mdinto the target location - The agent runtime discovers the skill on its next invocation
Supported Platforms
Adapter names match vercel-labs/skills agent identifiers wherever possible.
| Platform | Adapter name | Detection |
|---|---|---|
| Claude Code | claude-code | ~/.claude/ |
| Codex CLI | codex-cli | ~/.codex/ or ~/.agents/ |
| OpenCode | opencode | ~/.config/opencode/ |
| Cursor | cursor | ~/.cursor/ |
| Gemini CLI | gemini-cli | ~/.gemini/ |
| GitHub Copilot | github-copilot | ~/.copilot/ |
| Windsurf | windsurf | ~/.codeium/windsurf/ or ~/.windsurf/ |
| Continue | continue | ~/.continue/ |
See Supported Platforms for the full path reference.
Installation Paths
Each platform uses different directories for user-level and project-level skills. Several platforms share .agents/skills/ as the project directory — see Shared project directory below.
Auto-Detection
Skern auto-detects which platforms are installed on your system by checking each platform's user-level config directory. Use skern platform list to see detected platforms:
skern platform listShared project directory
codex-cli, cursor, gemini-cli, and github-copilot all use .agents/skills/ as their project-level skills directory. A skill installed there is visible to every agent that reads from it — that is intentional and matches the conventions in vercel-labs/skills.
Two consequences:
- Detection is per-platform, not per-directory. The presence of
.agents/skills/does not by itself indicate which agents are installed; skern looks at each platform's distinct user-level config dir (~/.cursor,~/.gemini,~/.copilot,~/.codex) to disambiguate. - Capacity is per-directory. When two platforms share a directory, both adapters see the same installed-skills count. Capacity thresholds protect the directory, not the logical agent — installing 50 skills via
cursorwill register as full capacity forgemini-clitoo, because the agent will load all of them.
One Platform per Invocation
Each skern skill install call targets exactly one platform. Agents are expected to specify the platform they are running on — there is no all value, and skern does not broadcast skills across platforms automatically.
This design supports the dynamic skill loading model: each agent maintains its own working set of installed skills, sized to its context budget, independent of other platforms.
To deploy a skill across several platforms, loop the call:
for p in claude-code codex-cli opencode cursor gemini-cli; do
skern skill install code-review --platform "$p"
doneBatch Install/Uninstall
Multiple skills can be installed (or uninstalled) in one call:
skern skill install code-review test-runner deploy-checker --platform claude-code
skern skill uninstall stale-a stale-b --platform claude-codeEach skill's outcome is reported separately in the JSON output's skills array, and a capacity block reports the platform's installed-skill count after the batch.
Platform Status Matrix
View which skills are installed on which platforms:
skern platform statusThis shows a matrix of skills and their installation status across all detected platforms.
Adding a Platform
Adapters are declarative: every supported platform is one row in Specs in internal/platform/spec.go. Adding a new platform takes:
- A new
Typeconstant ininternal/platform/platform.go. - A new
Specrow giving its name, user-level skills dir, project-level skills dir, and one or more home-relative detection paths.
A single generic Adapter struct implements every platform's Platform interface from the spec, so no platform-specific Go code is required. The table-driven tests in internal/platform/platform_test.go cover every registered spec automatically.
