Stop copy-pasting AI skills between repos: package them as Claude Code plugins

작성자

카테고리:

← 피드로
DEV Community · Leonid Korsakov · 2026-07-21 개발(SW)

Leonid Korsakov

As we enter the era of AI and skills, we’re faced with new problems — a flood of skills, and sharing knowledge (skills) between repos.

Every day I work with a bunch of repositories, predominantly in Go but sometimes in other languages. A huge layer of knowledge should be shared between them — for example, how to connect to a database, how to deploy a test tag to a staging server, or where to find the logs.

For several months I had been creating skills in each repo and putting the specific knowledge there, but after a while I realized I’d started copy-pasting some skills between repos.

Claude built a plugin system, and it has become mature enough to use. I created a separate repository with the skills and scripts that should be shared, and organized them as plugins. A plugin is just a structured git repository with files — convenient to maintain and update.

The install part is also very flexible: when I install a plugin, I can choose the scope.

Here’s what it looks like in practice.

The layout

A plugin is just a git repo with a known layout. One marketplace can hold many plugins; one plugin can hold many skills.

dev-claude-plugins/                     # the repo you push to git
├── .claude-plugin/
│   └── marketplace.json                # catalog — lists the plugins in this repo
└── plugins/
    └── backend-dev/                    # one installable plugin
        ├── .claude-plugin/
        │   └── plugin.json             # manifest: name, version, author
        └── skills/
            ├── query-db/
            │   └── SKILL.md            # how to connect + run read-only queries
            ├── staging-deploy/
            │   ├── SKILL.md            # deploy a dev tag to staging
            │   └── references/         # extra docs the skill loads on demand
            └── logs/
                ├── SKILL.md            # where/how to read service logs
                └── scripts/            # helper shell scripts the skill calls

Enter fullscreen mode Exit fullscreen mode

The two manifests

They’re tiny. marketplace.json is the catalog:

{
  "name": "myteam",
  "owner": { "name": "your-handle" },
  "plugins": [
    { "name": "backend-dev", "source": "./plugins/backend-dev",
      "description": "Shared cross-repo dev skills: db queries, staging deploy, logs." }
  ]
}

Enter fullscreen mode Exit fullscreen mode

plugin.json is the plugin itself:

{
  "name": "backend-dev",
  "version": "0.1.0",
  "author": { "name": "your-handle" },
  "description": "Shared cross-repo development skills."
}

Enter fullscreen mode Exit fullscreen mode

Installing it

Two commands. First register the marketplace, then install the plugin — this is where you pick the scope (this project only, or user scope = available in every repo):

# 1. Register the marketplace — a local path while iterating…
/plugin marketplace add ~/work/dev-claude-plugins
#    …or a git URL to share across machines and teammates:
/plugin marketplace add https://github.com/your-handle/dev-claude-plugins.git

# 2. Install the plugin (prompts for scope: user vs project)
/plugin install backend-dev@myteam

Enter fullscreen mode Exit fullscreen mode

Now every skill is available as /backend-dev:<skill> — e.g. /backend-dev:query-db — and also auto-triggers from its description.

Updating

Add a skill once, bump version, push, and every repo picks it up with:

/plugin marketplace update myteam

Enter fullscreen mode Exit fullscreen mode

One source of truth instead of copy-pasting .claude/skills/ into ten repos.

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다