/plugin-engineering:troubleshoot-and-debugfrom Plugin Engineering
Use 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.
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.
You are the user's plugin debugger. Two jobs, one discipline:
These files were checked against Claude Code 2.1.330 and its docs. When claude --version is newer, read the changelog entries after it for the message or rule in question; the installed --help wins for flags.
Load plugin-engineering:cli-commands-guide too if it isn't loaded yet: it gives each command's exact flags, output, JSON fields and exit codes.
--plugin-dir loads a plugin in place, and an install from a git-hosted marketplace loads a copy without anything outside the plugin's folder: "works with --plugin-dir, breaks after install" is almost always a path that reaches outside the plugin.version keeps users on the cached copy however many commits follow: claude plugin update then prints <name> is already at the latest version./reload-plugins (with --force when it asks) or a new session.enabledPlugins merges key by key; a higher source wins, so a project true overrides the user's false. To turn a project-enabled plugin off for one person, set it false in .claude/settings.local.json.--plugin-dir plugin with the same name replaces an installed one in silence; only the debug log records it.claude --debug writes to ~/.claude/debug/<session-id>.txt without printing anything to the terminal.extraKnownMarketplaces are not added and nothing from the user's own ~/.claude/ is there; plugins turned on for the user's claude.ai account arrive as <name>@synced.hooks module not loaded, hooks module did not load) means the plugin is a mod.First check where the session runs (echo "$CLAUDE_CODE_REMOTE", the desktop app, a project thread, an SDK application). When it isn't the user's own terminal, read Where the session runs before anything else: it says what is supposed to load there and where each fix goes.
Work from evidence, not from attempts: changing something and running again to see what happens hides the cause and leaves its other effects in place. Copy this checklist into your reply and tick each step.
Progress:
- [ ] 1. Capture the facts
- [ ] 2. Read the state before changing anything
- [ ] 3. Place it: stage and origin
- [ ] 4. Name the cause from the reference
- [ ] 5. Sweep for the cause's other effects
- [ ] 6. Apply every fix in one pass
- [ ] 7. Apply the change to the session
- [ ] 8. Verify once
-p, CI, SDK), the folder the session started in, and claude --version.claude plugin list --json and read the plugin's id, scope, enabled, installPath, readFromFolder, errors, notes and projectEnabled; then claude plugin details <name>, claude plugin marketplace list, the /plugin Errors tab, and claude plugin validate <plugin-dir> for the user's own plugin. These read and change nothing.@<marketplace>, @inline, @skills-dir, @synced)?--plugin-dir copy, the other people who clone the repository, and CI. One cause often explains several symptoms the user reported separately./reload-plugins, with --force when it asks, or start a new session.Installed plugin: or ✓ Installed <plugin>., Reloaded: with no errors line, or the component listed by claude plugin details. Run the check yourself when you can.When a fix needs something only the user can do (a terminal they own, an administrator, a credential), say exactly what to run or ask for, and what they will see when it worked.
## Diagnosis
For each problem: symptom → stage and origin → cause, quoting the message or rule and naming the reference section.
## Fixes
Numbered, in the order to apply them, each with the exact file or command and why.
## Also affected
What else the same causes reach, or "nothing else" with the reason.
## Verify
The commands to run once all fixes are in, and what each prints when it worked.
/plugin runs through install, hooks, servers, building, hosting and organization policy.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nerymurillohnd/the-claude-factory --plugin plugin-engineering4 skills in this plugin
/cli-commands-guideUse 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./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.Other plugins' skills for the same job