Sharing Claude Code skills across repositories with a private plugin marketplace
A colleague asked Claude to build a feature that needed some workspace data. Claude did what most web apps would do. It added new backend endpoints and a frontend client that fetched the data on demand. The feature worked, and it was the wrong design for us.
Our app is local-first. The frontend keeps a replica of the workspace in IndexedDB, and a sync mechanism keeps that replica current. The UI reads from the local database and doesn’t make a network call when it needs data. Only the sync layer talks to the backend. If something isn’t in the replica, the fix is to add it to sync. Claude didn’t know that, so the feature came with endpoints and frontend code that we didn’t need.
This post is about what I built after that, and how it grew from one skill in one repository into an internal plugin marketplace.
Teaching Claude how sync works
I wrote two Claude Code skills for this. A skill is a folder with a SKILL.md file and optional scripts and reference files, and Claude loads it when the task matches the skill’s description. The first one explains the architecture. It describes the local replica, the two sync modes (a fast-forward catch-up on load or reconnect, and a real-time subscription after that), and the rule that data missing from the local database is a sync gap and never a reason to add a fetch. It also lists the shapes that should make Claude stop and redirect: paginated on-demand fetching for workspace data, useQuery for bulk data that should already be local, a network-only fetch policy outside the catch-up path, and a REST call inside a component.
The second skill is a checklist for adding a new data type to sync. There are six layers, spread over the frontend, the GraphQL gateway and the backend services, and they have to be done in order. The backend resolver comes first, then the gateway cursor, the GraphQL fragments, the IndexedDB schema, the sync handler, and the wiring that connects it. Each layer has its own files and its own ways to go wrong.
Both skills landed in the frontend repository in early May. implement and ct-review, the skills for building and reviewing a change, went in the same day. These were the first skills in that repository.
The sync checklist crosses repository boundaries, so a frontend-only skill only covered part of it. I added a sync skill to three of the backend repositories on the same day as well, each describing how that service takes part in sync.
A skill that learns from review
The second problem was different. We use Copilot to review pull requests, and Claude’s own reviews kept missing things that Copilot found. The same types of finding kept coming back on different PRs.
Less than two weeks later I added self-improve. When someone shows Claude review feedback, the skill goes through each comment and decides whether it is valid. Then it fixes the valid ones. For each valid finding, it looks for the knowledge or instruction that was missing and would have prevented the mistake: missing context, a wrong assumption, or a gap in another skill. That cause is Claude’s inference, and a person reads the proposed change in a PR. If the lesson applies beyond one repository, the change goes to a shared skill as a PR against the marketplace repository described below. A lesson for one repository stays in that repository. In the first version, the frontend CLAUDE.md told Claude to load it at the start of every session and whenever review feedback showed up.
The first version kept a list of known anti-patterns that was always in context. Here is one that is in the catalog now. A retry loop for the sync stream stopped retrying when the stream function returned successfully. In our sync worker, the stream only returns successfully when the server closes the connection, so that code would have stopped syncing a workspace for good. The unit tests modelled a healthy stream as one that never completes, so the case could not show up in them. Copilot found it on a PR, and it now sits in the catalog as an entry that says to read the real stream code and not only the test mock.
The catalog has grown to twelve files by domain, and only the index table in the skill’s SKILL.md is always in context. A pattern file is read when its row in the index matches the work. An entry has to meet a bar before it goes in: the finding was valid and fixed, the same mistake appeared in at least two PRs, and the rule is specific enough to change what Claude does next time. I review the changes to the catalog.
Most of the commits in that repository now come from colleagues. They are mostly lessons from their own PRs: someone fixes a review finding, runs the skill, and the lesson comes back as a PR against the shared skills.
Copies in every repository
By September the skills lived in several repositories. sync-add and sync-explain existed as identical copies in the frontend and in a second product repository. The backend repositories each had their own sync skill. implement and ct-review had two copies that had drifted apart.
The sync mechanism spans every layer, so a change to it meant updating all of those copies at the same time. That didn’t happen reliably. When I merged the copies later, I had to pick the frontend version of implement and ct-review because it had the newer workflow and the newer review lessons. A skill in the datasets repository sat in a directory outside the standard skills path, so the first migration scan missed it.
One plugin marketplace
Claude Code supports plugins and marketplaces. I wanted one place to change a skill, so I made a marketplace for the company. It is a private repository with six plugins and 22 skills. Each plugin groups the skills for the people who need them: core workflow, engineering, sync, frontend, AI and platform. The sync plugin carries the architecture skill, the checklist and one reference per backend service. The frontend plugin carries the domain skills and the browser testing skill.
A product repository enables the plugins it needs in its committed Claude settings. Skills are namespaced by plugin, for example /ct-sync:sync-add. Each plugin has an explicit version in its manifest, and Claude Code only installs an updated copy when that version changes, so every PR that changes a plugin has to bump its version. A validation script runs before a PR is opened. Trigger evals check that a short, natural prompt makes Claude invoke the right skill.
In September I moved the skills over. Six repositories got a PR that enabled the plugins and deleted the local copies in the same change, and all six were merged on the same day. I also moved a knowledge base that had lived only on my machine, with the service map, the data models and a few cross-service flows, into a platform plugin so that everyone has it.
One limitation shows up in the rollout notes. The “load at session start” mode of self-improve depends on a line in CLAUDE.md, not on the skill’s description. When I rolled the plugins out, four of the repositories had no CLAUDE.md, so only the “review feedback shown” mode could trigger there.
I later added deliver, which takes an open PR through a local review and then at most three Copilot review rounds. It hands each review comment to the self-improve workflow. The two skills have different jobs: deliver deals with the feedback on the current PR, and self-improve keeps the lessons that come back. deliver stops and tells me when the local review still fails after three rounds, when a fix causes the next finding, or when it can’t fix a finding locally.
What changed
I don’t have numbers. The changes I can describe are qualitative. PRs arrive in better shape, and there are fewer review loops. Claude also explains the backend well enough that non-technical people understand it, and our product owner can now contribute to development work.
The marketplace repository came almost five months after the first skill. I started with one rule that Claude had missed. The skills now go through what code goes through: PRs, version bumps, validation and my review of catalog changes.
A lesson from a review no longer has to stay in the PR conversation. self-improve turns it into a change to a shared skill, and each repository that enables the plugin gets it the next time it updates.