Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

portable-agents

БесплатноБез исполняемых скриптовНе проверен

Defines agent configuration formats across Claude Code, Cursor, OpenCode, and Cline. Covers frontmatter fields, tool restrictions, model selection, and…

diegosouzapwот diegosouzapw★ 68 звёзд на GitHub

Об этом скилле

Cross-Tool Agent Interoperability

Write agent definitions that work across Claude Code, Cursor, OpenCode, and Cline without duplication.

Quick Start

All four tools define agents as markdown files with YAML frontmatter. The body is the system prompt.

---
name: code-reviewer
description: Reviews code for quality and best practices
---

You are a code reviewer. Analyze code for security, performance, and maintainability.

Store agents in tool-specific directories. Unlike skills, there is no single shared directory -- each tool has its own agent location.

Agent Directories

Scope Claude Code Cursor OpenCode Cline
Project .claude/agents/ .cursor/agents/ .opencode/agents/ .clinerules/agents/
User ~/.claude/agents/ ~/.cursor/agents/ ~/.config/opencode/agents/ N/A
Plugin Plugin agents/ dir N/A N/A N/A

Priority (when names collide): CLI flags > project > user > plugin (Claude Code). Project > user (Cursor, OpenCode).

Frontmatter Compatibility Matrix

Field Claude Code Cursor OpenCode Cline
name Required Required Filename = name Filename = name
description Required Required Required Required
model sonnet/opus/haiku/inherit Cursor model names provider/model-id N/A
tools Allowlist (tool names) Not supported Boolean map Not supported
disallowedTools Denylist (tool names) Not supported Not supported Not supported
mode Implicit (subagent by location) Implicit primary/subagent/all Implicit
temperature Not in frontmatter Supported Supported Not supported
maxTurns/steps maxTurns Not supported steps Not supported
permissionMode 6 modes Not supported permission (per-tool) Not supported
skills Preload skill content Not supported Not supported Not supported
mcpServers Scope MCP per agent Not supported Not supported Not supported
hooks Full lifecycle hooks Not supported Not supported Not supported
memory user/project/local Not supported Not supported Not supported
color Hex or theme color Not supported Hex or theme color Not supported
hidden Not supported Not supported Hide from @ menu Not supported

Agent Interoperability Summary

OpenCode IS compatible with Cursor and Claude Code agent specifications at the core level. All three tools use markdown files with YAML frontmatter and support the same fundamental structure.

What Works Across All Tools

The portable subset that works in Claude Code, Cursor, OpenCode, and Cline:

---
name: my-agent          # Required for Claude Code/Cursor, optional for OpenCode/Cline (uses filename)
description: What this agent does and when to use it
---

System prompt in markdown body.

This minimal format works without modification across all tools. Place the same file in each tool's agent directory via symlinks (see Cross-Tool Setup below).

What's Tool-Specific

Beyond the portable subset, each tool has unique capabilities that won't transfer:

Feature Portability
name + description + markdown body ✅ Works everywhere
Model selection syntax ❌ Different formats per tool
Tool restrictions ❌ Different mechanisms per tool
Permissions (bash, edit, webfetch) ❌ OpenCode only
Temperature in frontmatter ❌ OpenCode only
Max iterations control ❌ Different field names
MCP server scoping ❌ Claude Code only
Skills preloading ❌ Claude Code only
Hooks ❌ Claude Code only

Maximizing Portability

Strategy 1: Keep it simple (Recommended)

Use only the portable subset for shared agents. Express constraints in the system prompt body:

---
name: code-reviewer
description: Reviews code for quality without making changes
---

You are a read-only code reviewer.

**CONSTRAINTS:**
- Do NOT modify files (no write, edit operations)
- Do NOT run bash commands except read-only git commands
- Focus on analysis and recommendations only

This works everywhere, though enforcement is advisory (model follows instructions) rather than technical (tool blocks execution).

Strategy 2: Tool-specific overlays

Maintain canonical agents with portable core, then add tool-specific frontmatter:

---
name: code-reviewer
description: Reviews code for quality without making changes

# OpenCode-specific
tools:
  write: false
  edit: false
permission:
  bash:
    "*": "ask"
    "git diff*": "allow"

# Claude Code-specific  
disallowedTools: Write, Edit

# Note: Cursor ignores tools/permissions in frontmatter
---

System prompt (portable across all tools).

OpenCode and Claude Code will enforce tool restrictions. Cursor will rel

Полный SKILL.md на GitHub

Установить portable-agents в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

metadata.json

FAQ

Что делает скилл portable-agents?

Defines agent configuration formats across Claude Code, Cursor, OpenCode, and Cline. Covers frontmatter fields, tool restrictions, model selection, and cross-tool portability. ALWAYS read before creating or editing agent definitions. This skill should be used when 'writing an agent', 'creating a subagent', 'porting agents between tools', 'agent frontmatter', 'agent configuration', or setting up agents across multiple AI tools.

Как установить скилл portable-agents?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл portable-agents запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить portable-agents с