본문 바로가기
DEV/Note

Agent Skill을 OpenCode 설정으로 Claude Code, Codex에서 같이 쓰기

by cha.d 2026. 4. 29.

안녕하세요. Claude Code, Codex, OpenCode를 함께 사용하면서 같은 Skill을 도구마다 따로 관리하는 게 번거로워, 한 곳에 모아두고 공유하도록 설정해봤습니다.

이 글은 OpenCode 설정 디렉토리를 플러그인화 시켜 Claude Code, Codex에 Skill을 공유하는 방법으로, 1번부터 순서대로 따라하시면 같은 환경을 구성하실 수 있습니다.

만약 완전한 플러그인 방식에 관심이 있으시다면 이 문서 대신 divlook/unified-agent-skills-example: 통합 Agent Skill Plugin 구성하는 방법을 참고 부탁드립니다.

예시는 다음 이름을 기준으로 설명합니다. {owner} 같이 중괄호로 감싼 값은 placeholder니까 본인 값으로 바꿔서 사용해주세요.

  • {owner} : GitHub 조직 또는 계정 (예: divlook)
  • my-marketplace : marketplace repo 이름
  • {plugin-id} : CLI에서 호출할 plugin 이름 (예: my-plugin)
  • {repository-url} : plugin repo URL (예: https://github.com/{owner}/my-marketplace)

1. Git 저장소 준비

OpenCode 글로벌 설정 디렉토리인 ~/.config/opencode를 Git 저장소로 관리합니다.

cd ~/.config/opencode
git init
git remote add origin https://github.com/{owner}/my-marketplace.git

기본 .gitignore 예시입니다.

.DS_Store
node_modules/
.env
*.log
logs/
.cache/
/.claude/
/.sisyphus/

2. 디렉토리 구조

필요한 파일 구조는 아래 정도면 충분합니다.

my-marketplace/
  .gitignore
  .agents/
    skills/
      auto-commit/
        SKILL.md
      code-review/
        SKILL.md
      ...
    plugins/
      marketplace.json
  .claude-plugin/
    plugin.json
    marketplace.json
  skills -> .agents/skills
경로 역할
.agents/skills/ 실제 agent skill 모음
skills OpenCode 글로벌 설정 루트에서 읽는 skill 경로. .agents/skills를 가리키는 심볼릭 링크
.claude-plugin/plugin.json Claude Code plugin 정의
.claude-plugin/marketplace.json Claude Code marketplace 정의
.agents/plugins/marketplace.json Codex marketplace 정의

3. Skill 작성

각 skill은 하나의 폴더와 SKILL.md 파일로 구성합니다.

.agents/skills/{skill-name}/SKILL.md

예시:

.agents/skills/
  auto-commit/
    SKILL.md
  code-review/
    SKILL.md

4. Claude Code plugin 설정

.claude-plugin/plugin.json

{
  "name": "{plugin-id}",
  "description": "my agent skills",
  "author": {
    "name": "{author-name}",
    "email": "{author-email}"
  },
  "homepage": "{repository-url}",
  "repository": "{repository-url}",
  "license": "MIT",
  "skills": "./.agents/skills/"
}

핵심은 skills./.agents/skills/를 바라보게 하는 것입니다.

5. Marketplace 설정

Claude Code marketplace

.claude-plugin/marketplace.json

{
  "name": "my-marketplace",
  "owner": {
    "name": "{owner}"
  },
  "plugins": [
    {
      "name": "{plugin-id}",
      "source": "./",
      "description": "my agent skills"
    }
  ]
}

Codex marketplace

.agents/plugins/marketplace.json

{
  "name": "my-marketplace",
  "interface": {
    "displayName": "My Agent Skills"
  },
  "plugins": [
    {
      "name": "{plugin-id}",
      "source": {
        "source": "url",
        "url": "https://github.com/{owner}/my-marketplace.git",
        "ref": "main"
      },
      "policy": {
        "installation": "INSTALLED_BY_DEFAULT",
        "authentication": "ON_INSTALL"
      },
      "category": "Productivity",
      "description": "my agent skills"
    }
  ]
}

INSTALLED_BY_DEFAULT를 사용하면 Codex에서 marketplace 등록 시 plugin이 기본 설치됩니다.

6. 설치와 호출

Claude Code

claude plugin marketplace add {owner}/my-marketplace
claude plugin install {plugin-id}@my-marketplace --scope user

Claude Code 안에서는 slash command로도 설치할 수 있습니다.

/plugin marketplace add {owner}/my-marketplace
/plugin install {plugin-id}@my-marketplace

호출 예시:

/my-plugin:auto-commit

Codex

codex plugin marketplace add {owner}/my-marketplace

상태 확인:

/plugins

호출 예시:

/my-plugin:auto-commit

OpenCode

OpenCode는 글로벌 설정 루트의 skills/ 폴더에 있는 skill을 읽습니다.

그래서 같은 skill을 재사용하려면 글로벌 설정 루트(~/.config/opencode)에서 skills.agents/skills로 연결하는 심볼릭 링크를 둡니다.

cd ~/.config/opencode
ln -s .agents/skills skills

호출은 namespace 없이 local skill처럼 사용합니다.

/auto-commit

7. 업데이트

Claude Code

claude plugin marketplace update my-marketplace
claude plugin update {plugin-id}@my-marketplace

Codex

codex plugin marketplace upgrade my-marketplace

호출 규칙 요약

Claude Code / Codex: /{plugin-id}:{skill-name}
OpenCode:            /{skill-name}

마무리

이렇게 해두면 새 skill이 생겨도 .agents/skills/에만 추가하면 되고, 다른 컴퓨터에서도 marketplace로 한 번에 install 할 수 있어 편리합니다.

감사합니다. 😉

'DEV > Note' 카테고리의 다른 글

JavaScript 이벤트 처리  (0) 2020.04.06
console.log 한방에 지우기  (0) 2019.12.31
NodeJs에서 메모리가 부족할 때  (0) 2019.11.20
웹브라우저에서 스크롤 정보를 가져오는 방법  (0) 2019.11.17