/plugin-engineering:cli-commands-guidefrom Plugin Engineering
Use for all work that writes, builds, audits, validates, tests, debugs, renames, removes, releases, tags or maintains plugins, their components (skills, subagents, hooks, scripts, MCP and LSP servers, commands, mods), dependencies and marketplaces, across any surface and environment (Claude Code CLI, desktop, web and cloud environments, claude.ai, Cowork, Agent SDK) and any distribution method (public or private GitHub marketplaces, plugins without a marketplace, claude.ai uploads, the Anthropic Directory, local plugins), even when the user only names a plugin command or pastes its output. Teaches Claude to use this skill as the base for all of that work, alone when no other skill fits, and alongside every specialized skill for the task. Gives the exact, current syntax and behavior of every claude plugin and claude plugin marketplace subcommand, /plugin form, /reload-plugins, --plugin-dir and --plugin-url, with flags, JSON fields, exit codes and minimum versions, and the gotchas that break plugin work.
Trending skills
7-day visitors to each skill page
Ships in Plugin Engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The reference files in references/ hold every flag, message, JSON field, exit code and minimum version, checked against Claude Code 2.1.321, its docs and its changelog. Read the gotchas, pick the command, then load only the reference file the task needs.
Every plugin task, not only the ones that run a command. A plugin's design, its README, its tests and every answer about it depend on how Claude Code installs, scopes, loads, updates, validates and removes it, and those facts live here. Load it at the start of any work on a plugin, a mod, a marketplace or a plugin install, wherever the plugin lives. Once it is loaded, don't load it again unless the conversation was compacted.
This skill is the base of that work, not all of it. Before the first step of the task:
test-and-evals and troubleshoot-and-debug are two. Its sibling public-marketplace-dev, which sets up a new public marketplace on GitHub, runs only when the user invokes it: when the task is setting one up, ask the user to run /plugin-engineering:public-marketplace-dev, and don't build the marketplace from this skill alone.Review the list again when the task moves to another kind of plugin work, such as from building to releasing.
This skill covers commands and their behavior. For a plugin's files, read the official page for the topic:
userConfig: https://code.claude.com/docs/en/plugins/manifest-reference.mdhttps://code.claude.com/docs/en/plugins/components.mdmarketplace.json and plugin sources: https://code.claude.com/docs/en/plugins/marketplace-reference.mdhttps://code.claude.com/docs/en/plugins/dependencies.mdhttps://code.claude.com/docs/en/plugin-evals.mdhttps://code.claude.com/docs/en/plugins/loading.mdhttps://code.claude.com/docs/en/plugins/troubleshooting.md, grouped by stageClaude Code ships often, and the user's version may differ from 2.1.321.
claude --version, then claude plugin <subcommand> --help (or claude plugin marketplace <subcommand> --help) on the user's machine.https://code.claude.com/docs/en/plugins/cli-reference.md or the changelog (https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md). Each reference section names its official section on an Official page: line.Never write version checks or fallback paths into a script for the user. When a command fails, report its message and exit code, and look the message up on the troubleshooting page.
claude plugin … and /plugin change the machine Claude Code runs on (~/.claude and the project's .claude/ settings).<name>@synced; CLI installs never reach the account.command -v claude in the shell and that this shell is the machine the user means to change. Otherwise give the user the exact command or the Customize > Plugins path, and never say it ran./plugin install <source> with a path, URL or owner/repo installs nothing. It reports Marketplace "<source>" not found, even for a source already added. Add the marketplace first, or use /plugin install <plugin> --marketplace <source> (v2.1.275+) or claude plugin install <plugin> --marketplace <source> (v2.1.292+)./plugin install <plugin> in a session opens the details pane. It doesn't install until a scope is chosen there.claude plugin configure accepts only name@marketplace, never a bare name.claude plugin update without --scope used user and failed for a plugin installed only at project or local scope with Plugin "<name>" is not installed at scope user. On those versions, pass --scope.claude plugin marketplace update with no name refreshes listings but leaves installed plugins at their versions.claude plugin validate doesn't follow symlinks in the directory you name. A marketplace run doesn't open the listed plugins' skill, agent, command, hook or MCP files: validate each plugin directory too.claude plugin validate output symbols change when output isn't a TTY (✔ ⚠ ✘ become √ ‼ ×). Scripts read the exit code or --json, not the symbols.claude plugin eval: put the target before --tag, --allow-tools and --json. The first two take a list and --json takes an optional path, so a target after them is read as their value.-y and --accept-command have no effect inside a Claude Code session (Bash tool, hook). The user runs those commands from their own terminal.-y or --accept-command <sha256> is passed.claude plugin tag needs a version in plugin.json or the marketplace entry, a clean working tree, a tag that doesn't exist yet, and a git repository. /plugin tag accepts only --push, --dry-run and --force/-f.claude plugin marketplace remove uninstalls every plugin installed from that marketplace and deletes their options, secrets and data where it can, once no scope declares the marketplace. Confirm with the user first. To refresh, use marketplace update.claude plugin uninstall from the last scope deletes the plugin's options, secrets and data directory unless --keep-data is passed. Confirm with the user first.enable on an enabled plugin, and disable on a disabled one, exit 1. With --json, alreadyInGoalState: true marks it./reload-plugins that adds or removes a plugin MCP server or the LSP tool isn't applied without --force, because it would invalidate the prompt cache./plugin doesn't run in claude -p or other non-interactive runs (/plugin isn't available in this environment.). Use claude plugin from the shell. /reload-plugins does run there (v2.1.260+)./marketplace is an alias of /plugin, so /marketplace list lists plugins. Use /plugin marketplace list./plugin help printed nothing on 2.1.319 and 2.1.321. Use claude plugin --help.<name>@synced) missing from the terminal: it syncs only when the session is signed in with the claude.ai account, and never with ANTHROPIC_AUTH_TOKEN, CLAUDE_CODE_OAUTH_TOKEN or apiKeyHelper, with CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC, in bare or --safe-mode sessions, with --setting-sources lacking user, or with syncClaudeAiPlugins: false. It also loses to any enabled plugin of the same name. The checklist is in the Synced plugins section of references/plugin-commands.md.claude plugin disable refuses it.extraKnownMarketplaces can't be added from another source, and its plugins are reinstalled from the declared one (v2.1.321+). The options and secrets set aside by that switch come back only with claude plugin restore-set-aside <name@marketplace>; --discard deletes them, so confirm with the user first.--plugin-dir plugin silently replaces a same-named installed plugin for that session, and claude plugin list still shows the installed row as enabled.--plugin-dir at a marketplace root loads nothing and shows no error. Point it at the plugin directory.--plugin-dir and --plugin-url go before the subcommand: claude --plugin-dir <path> plugin details <name>. claude plugin details <name> --plugin-dir <path> fails with error: unknown option '--plugin-dir'.claude plugin install <plugin>@<marketplace> [--scope]. In a session, /plugin install <plugin>@<marketplace>, then pick a scope.claude plugin install <plugin> --marketplace <source>.claude plugin marketplace add|list|update|remove.claude plugin list [--json] [--available] [--data-size].claude plugin details <name>.claude plugin configure <name@marketplace> [--values-stdin] [--json], or install --config.claude plugin enable|disable <plugin> [--scope]. Use disable --all for everything.claude plugin update <plugin> [--scope]. In a session, use Update now on the Installed tab.claude plugin uninstall <plugin> [--scope] [--keep-data] [--prune]. Remove orphaned dependencies with claude plugin prune.claude plugin restore-set-aside <name@marketplace> [--discard]./reload-plugins [--force].claude plugin init <name> [--with ...] (writes under ~/.claude/skills/).claude --plugin-dir <path> or claude --plugin-url <url>.claude plugin validate <path> --strict [--json] [--profile directory].claude plugin test [dir].claude plugin eval [target] [options]. Create a suite with claude plugin eval init.claude plugin tag [path] --dry-run, then without --dry-run, and with --push only when the user approves the push.references/plugin-commands.md: every claude plugin subcommand (init, install, uninstall, enable, disable, update, list, details, configure, prune, restore-set-aside, eval, eval init, tag, test, validate), the shared exit codes, scopes and aliases, the --json result format, and synced plugins (@synced).references/marketplace-commands.md: claude plugin marketplace add|list|remove|update, every source form, private marketplace credentials and claude.ai marketplaces.references/session-commands.md: every /plugin form, where /plugin runs on each surface, the panel tabs, and /reload-plugins.references/session-flags.md: --plugin-dir, --plugin-url, CLAUDE_CODE_PLUGIN_DIRS, @inline plugins and their precedence.Each reference opens with a contents list, and each section names its official section on an Official page: line. Search a reference with grep for the flag or message you need instead of reading it whole.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nerymurillohnd/the-claude-factory --plugin plugin-engineering4 skills in this plugin
/public-marketplace-devUse only when a new public plugin marketplace hosted on GitHub must be set up from scratch, once, at its start, whenever the user asks to create, establish, build or scaffold one, or the task needs a marketplace repository that does not exist yet, even when the user only says they want to publish or distribute plugins to other people. Builds the complete operating environment and architecture the marketplace will need, ready for its first plugin, including the repository's folders and subfolders, the marketplace catalog, the plugins folder layout, versioning and releases, validation, user instructions, CI/CD workflows, repository files and the folders for its maintenance. Teaches Claude to build it with cli-commands-guide for the exact commands, and to run test-and-evals on the result before reporting the work as done. Not for writing a plugin or its components, testing or debugging a plugin on its own, or maintaining a marketplace that already exists./test-and-evalsUse right after a plugin is created and after every change to a plugin, its skills, agents, hooks, MCP or LSP servers, mods or marketplace, before the work is reported as done, and when the user asks to test, validate, check or review a plugin before publishing or releasing it, or to write, run, fix or read plugin evals (claude plugin eval, eval init, graders, mocks, CI gates). Runs the checks that cost nothing first, strict validation, loading from the folder, mod tests, an install the way users receive it and the directory and policy review, then builds an eval suite only after the user says yes to it and its cost. Not for a plugin that fails to install, load or run, which troubleshoot-and-debug diagnoses./troubleshoot-and-debugUse when a Claude Code plugin or marketplace won't add, install, enable, update, load or run, when the user pastes a plugin error, an Errors tab entry or a failing claude plugin command, or when the wrong copy, scope or version of a plugin loaded, a change did nothing, or a plugin's skill, agent, hook, MCP or LSP server or mod is missing or misbehaves, on the terminal, the desktop app, cloud sessions, project threads, Claude, Cowork or the Agent SDK. Finds the loading stage and the documented cause from the exact message or the state on disk and in settings, sweeps every place the same cause reaches, applies the fix in one pass and verifies it once. Not for testing a working plugin or writing evals, which test-and-evals covers.Other plugins' skills for the same job