TL;DR: A Claude Code skill is a
SKILL.mdfile Claude reads and executes. You can write one that installs your whole plugin lineup across several marketplaces, in the right order, and offers to drop your opinionatedCLAUDE.mdinto the global config. One frontmatter line keeps it from firing on its own, so it runs only when you call it by name. This article walks through building that skill so a fresh machine goes from zero to fully set up with one command.
Setting up Claude Code on a new machine is a small ritual of forgetting. You reinstall the plugins, then realize you tried to install one before adding its marketplace. Eventually they work, except none of your global defaults are there because you never copied CLAUDE.md over. An hour later you're set up, and you've already forgotten half the plugins and skills for next time.
So I moved the whole ritual into a skill. This builds directly on the marketplace from the first article. If you haven't scaffolded one yet, start there. You can pass this article URL straight to Claude Code and follow along.
A skill is just a Markdown file
This is the part that surprises people. A Claude Code skill is just a SKILL.md file in a folder under your plugin's skills/ directory, no special DSL or script format, and Claude reads it as instructions and carries them out.
plugins/your-plugin/
└── skills/
└── plugin-setup/
└── SKILL.md ← this becomes /your-plugin:plugin-setup
The folder name becomes the name you call. Everything in the file is a prompt: you write the steps in plain English, and Claude runs them when you invoke /your-plugin:plugin-setup.
If you wrote Claude Code commands a while back, this is where they went. Anthropic merged slash commands into skills, so the commands/plugin-setup.md you might once have written is now skills/plugin-setup/SKILL.md, invoked exactly the same way (the docs lay it out). A skill is the one primitive now.
That merge matters for setup in particular, because a skill can fire two ways: you call it by name, or Claude loads it on its own when a request looks relevant. The second path is the last thing you want from an installer. You don't need it kicking off because the word "setup" drifted past in some unrelated sentence. One line in the frontmatter, disable-model-invocation: true, switches the automatic path off, so the skill runs only when you type /your-plugin:plugin-setup and never decides to install your whole toolchain on a hunch.
The one below adds marketplaces, installs plugins and walks an interactive selection. You can put far more in a skill than that, and if one grows unwieldy you can split it and pull pieces into their own files.
The rest of this article builds our sample setup command (skill) piece by piece, then assembles the whole file at the end.
The flow, step by step
The skill opens with two setup lines, then does four things in order.
The setup lines handle environment quirks. When the skill runs as an agent driving the claude CLI, it prefixes those calls with unset CLAUDECODE && to dodge a nested-session error. On Windows, it makes sure CLAUDE_CODE_GIT_BASH_PATH is set in ~/.claude/settings.json (default C:\Program Files\Git\bin\bash.exe) before any shell step runs.
Then the four steps:
-
Ask how much to install. A clean two-option choice, everything or pick-and-choose, so the skill uses
AskUserQuestion, the structured multiple-choice prompt. -
Let the user choose (if they asked to). Here it deliberately skips
AskUserQuestion. With several marketplaces and a dozen plugins that widget gets clumsy, so the skill prints a numbered list of plugins per marketplace group and takes a plain text reply, one group at a time, before moving on. No clicking through twenty checkboxes. - Install in the right order. The step that bites you by hand: a plugin can't install until its marketplace is registered. So the skill adds the marketplaces first, then the plugins, and only adds a marketplace if at least one of its plugins was selected. Pick nothing from a marketplace and it never gets registered.
- Offer the global CLAUDE.md. The finishing touch, and the one most setups skip. More on why it's a separate opt-in below.
After the plugins land, the skill tells the user to restart Claude Code, since plugins activate on restart.
Why the CLAUDE.md step is an explicit offer
Article 1 made a point of this: a CLAUDE.md inside a plugin folder does nothing on its own. Claude Code's plugin system ignores it. So shipping your global defaults as a plugin file doesn't apply them anywhere.
The setup skill closes that gap by hand, as its final step: it offers to copy the plugin's CLAUDE.md into your global ~/.claude/CLAUDE.md. The key word is offer. Your global CLAUDE.md is personal, and silently overwriting it on a setup run would be hostile. So the skill checks first: it shows you the existing file when there is one, then lets you append, replace or skip. You opt in, every time.
What goes in your curated list
The plugin list is the body of the skill. Group it by marketplace and put a one-line description above each plugin as a comment. The skill reads those comments out when it prints the selection menu.
Treat it as a starting point you'll edit. Marketplaces in one block, plugins grouped under the marketplace they come from. Swap in the ones you actually reach for.
Full structure below. The reference repo carries my actual, longer list if you want more examples: github.com/Nagell/claude-marketplace.
The complete skill
Here's the whole thing, ready to drop into skills/plugin-setup/SKILL.md. It wires together every piece above: the agent-mode switch, the Windows path, the four steps, the CLAUDE.md offer and a starter plugin list with two marketplaces.
---
name: plugin-setup
description: Install all recommended plugins and marketplaces
disable-model-invocation: true
---
# Setup Plugins
Install recommended Claude Code plugins and marketplaces with interactive selection.
## Instructions
1. When running as an agent, prefix all `claude` CLI commands with
`unset CLAUDECODE &&` to avoid the nested-session error.
2. On Windows, check `~/.claude/settings.json` for `CLAUDE_CODE_GIT_BASH_PATH`.
If missing, set it (default `C:\Program Files\Git\bin\bash.exe`) and ask the
user to confirm it before continuing.
3. **Ask install mode**: use `AskUserQuestion`. "Install all (Recommended)"
installs everything below; "Let me choose" goes to interactive selection.
4. **Interactive selection** (only if "Let me choose"): do NOT use
`AskUserQuestion` here. For each marketplace group, print a numbered list of
its plugins, using the comment above each as the description. Ask the user in
a plain text message to reply with numbers or names, or "all" / "none". Wait
for the reply before moving to the next group.
5. **Install order**: add the marketplaces first, then install the plugins. Only
add a marketplace if at least one of its plugins was selected.
6. After installing, tell the user to restart Claude Code.
7. **Global CLAUDE.md**: offer to save this plugin's `CLAUDE.md` to
`~/.claude/CLAUDE.md`. If it doesn't exist, ask to create it. If it does,
show both files and ask to append, replace or skip.
## Plugin List
### Marketplaces
```bash
/plugin marketplace add claude-plugins-official
/plugin marketplace add some-author/their-marketplace
```
### Plugins
#### claude-plugins-official
```bash
# Feature development workflow with exploration and review agents
/plugin install feature-dev@claude-plugins-official
# Composable workflow skills for brainstorming, planning, debugging and TDD
/plugin install superpowers@claude-plugins-official
# PR review agents for comments, tests and error handling
/plugin install pr-review-toolkit@claude-plugins-official
```
#### their-marketplace
```bash
# A skill you want available in every project
/plugin install some-skill@their-marketplace
```
Save it, install with your plugin, then run it:
/your-plugin:plugin-setup
The next article takes this further. Once your tooling installs in one command, the question becomes what that tooling costs you per session, and how to cut overall token usage.
Get started
Use the starter template to get a clean slate with everything pre-wired: github.com/Nagell/claude-marketplace-template.
The template gives you one empty plugin, a CLAUDE.md with sensible defaults, and a GitHub Actions workflow that handles versioning and releases automatically. Hit "Use this template" on GitHub and you're ready to add your first plugin.
If you want to see a fuller working example with multiple plugins and real hook scripts, github.com/Nagell/claude-marketplace is the reference repo used throughout this series.
Top comments (0)