Capture
One read of Claude Code CLI
5 pages moved out of 191 read.
costs Changed · +2 / -1 lines
from line 35
* **Attribution**: recent usage attributed to skills, subagents, plugins, and individual MCP servers, each shown as a percentage of the total. An MCP server's share counts only the requests that consumed one of its tool results. Before v2.1.222, after one call to an MCP server, Claude Code attributed every subsequent request to that server, overstating its share. * **Behavior flags**: behaviors such as long context or cache misses, flagged when one accounts for 10% or more of recent usage. +* **Loops**: a row for each of the heaviest [`/loop` or other scheduled tasks](/docs/en/scheduled-tasks) that ran recently, ordered by total tokens, with a count of the rest. Claude Code reports how often each task fires, how many times it ran, its total and per-run tokens, and when it last ran. Claude Code keys a row by the task's prompt, so a loop you stop and re-create stays one row. Requires Claude Code v2.1.242 or later. Press `d` or `w` to switch between the last 24 hours and the last 7 days. The figures are approximate and computed from local session history on this machine, so usage from other devices or claude.ai is not included. -In the [VS Code extension](/docs/en/vs-code#check-account-and-usage), the same breakdown appears in the Account & usage dialog with a Day and Week toggle. Requires Claude Code v2.1.174 or later. +In the [VS Code extension](/docs/en/vs-code#check-account-and-usage), the attribution shares and behavior flags appear in the Account & usage dialog with a Day and Week toggle, without the Loops rows. Requires Claude Code v2.1.174 or later. #### When the usage request fails
plugin-marketplaces Changed · +35 / -10 lines
### Distribute through organization settings #### Keep executables out of the top-level bin directory
from line 266
On most git hosts, including GitHub, GitLab, and Bitbucket, this means installation succeeds even if the branch or tag named by `ref` has since been deleted upstream, as long as the commit is still reachable from the repository. Some servers, such as AWS CodeCommit, don't support fetching commits by SHA. On those servers the `ref` must still exist and the pinned commit must be reachable from it. -<Note> - If you distribute this marketplace through [Organization settings > Plugins](https://claude.ai/admin-settings/plugins) on a Team or Enterprise plan, different source rules apply: +If you distribute plugins through **Organization settings > Plugins**, only some source types are allowed. See [Distribute through organization settings](#distribute-through-organization-settings). - * The marketplace repository must be private or internal. Organization sync reads it through the Claude GitHub App or your organization's GitHub Enterprise App. - * Each plugin source must be of type `github`, `url`, or `git-subdir`, or a [relative path](#relative-paths) within the marketplace repository. - * A plugin source can be private in two cases: a github.com source that shares the marketplace repository's owner, or a source on your organization's GitHub Enterprise host with the GHE App installed on the repository. Organization sync fetches every other source without credentials, so github.com repositories under a different owner and repositories on other hosts, such as GitLab or Bitbucket, must be public. - - To include private plugins, place the plugin folders inside the marketplace repository and reference them with a [relative path](#relative-paths). Organization sync packages each plugin during distribution, so users never need access to a separate source repository. See [Manage plugins for your organization](https://support.claude.com/en/articles/13837433) for the admin workflow. -</Note> - ### Relative paths For plugins in the same repository, use a path starting with `./`:
from line 756
### Private repositories -Claude Code supports installing plugins from private repositories. If you distribute your marketplace through [Organization settings > Plugins](https://claude.ai/admin-settings/plugins) instead, your git credentials aren't involved: organization sync reads the marketplace repository through the Claude GitHub App or your organization's GitHub Enterprise App, and a plugin source it can't authenticate to must be public. The note under [Plugin sources](#plugin-sources) has the full rules. +Claude Code supports installing plugins from private repositories. If you distribute your marketplace through [**Organization settings > Plugins**](https://claude.ai/admin-settings/plugins) instead, your git credentials aren't involved: organization sync reads the marketplace repository through the Claude GitHub App or your organization's GitHub Enterprise App, and a plugin source it can't authenticate to must be public. See [Distribute through organization settings](#distribute-through-organization-settings) for the full rules. #### Commands you run
from line 794
<Note> In CI/CD environments, configure a git credential helper before installing plugins from private repositories. On GitHub Actions, export a token with read access to the marketplace repository as `GH_TOKEN`, then run `gh auth setup-git`. The default workflow token can only access the workflow's own repository, so a private marketplace in another repository needs a personal access token or app token. A global URL rewrite configured in the pipeline also authenticates the background pull directly. </Note> + +### Distribute through organization settings + +If you distribute plugins through [**Organization settings > Plugins**](https://claude.ai/admin-settings/plugins) on a Team or Enterprise plan, these source rules apply: + +* The marketplace repository must be private or internal. Organization sync reads it through the Claude GitHub App or your organization's GitHub Enterprise App. +* Each plugin source must be of type `github`, `url`, or `git-subdir`, or a [relative path](#relative-paths) that starts with `./`. If you list a plugin by bare name under `metadata.pluginRoot`, organization sync rejects it as an unsupported source, so write the path out, such as `./plugins/deploy-tools`. +* A plugin source can be private in two cases: + * A github.com source that shares the marketplace repository's owner + * A source on your organization's GitHub Enterprise host with the GHE App installed on the repository +* Organization sync fetches every other source without credentials, so github.com repositories under a different owner and repositories on other hosts, such as GitLab or Bitbucket, must be public. + +See [Manage plugins for your organization](https://support.claude.com/en/articles/13837433) for the admin workflow. + +To include private plugins, place the plugin folders inside the marketplace repository and reference them with a [relative path](#relative-paths). Organization sync packages each plugin during distribution, so users never need access to a separate source repository. + +For example, this `marketplace.json` plugin entry references a plugin you committed at `plugins/deploy-tools` in the marketplace repository: + +```json theme={null} +{ + "name": "deploy-tools", + "source": "./plugins/deploy-tools" +} +``` + +#### Keep executables out of the top-level bin directory + +Don't include a top-level `bin/` directory in any plugin you distribute through organization settings. claude.ai rejects a plugin that has one, whether the plugin arrives by marketplace sync or by direct upload: + +* **Marketplace sync**: organization sync rejects that plugin and syncs the rest of the marketplace. The error code is `marketplace_sync_bin_directory_not_allowed` and the message starts with `Plugin contains a top-level bin/ directory`. +* **Direct upload**: if you upload the plugin in [**Organization settings > Plugins**](https://claude.ai/admin-settings/plugins) instead, claude.ai rejects the upload with the same message. + +Keep executables in another directory, such as `scripts/`, and reference them as `${CLAUDE_PLUGIN_ROOT}/scripts/<name>` from your [skills, hooks, or MCP server configs](/docs/en/plugins-reference#environment-variables). ### Require marketplaces for your team
plugins Changed · +12 / -12 lines
from line 166
The plugin root is the individual plugin's own directory: the one you pass to `--plugin-dir` or that contains `.claude-plugin/plugin.json`. It is never `~/.claude/`. For example, Claude Code doesn't read a `.mcp.json` placed at `~/.claude/.mcp.json`. </Warning> -| Directory | Location | Purpose | -| :---------------- | :---------- | :----------------------------------------------------------------------------- | -| `.claude-plugin/` | Plugin root | Contains `plugin.json` manifest (optional if components use default locations) | -| `skills/` | Plugin root | Skills as `<name>/SKILL.md` directories | -| `commands/` | Plugin root | Skills as flat Markdown files. Use `skills/` for new plugins | -| `agents/` | Plugin root | Custom agent definitions | -| `hooks/` | Plugin root | Event handlers in `hooks.json` | -| `.mcp.json` | Plugin root | MCP server configurations | -| `.lsp.json` | Plugin root | LSP server configurations for code intelligence | -| `monitors/` | Plugin root | Background monitor configurations in `monitors.json` | -| `bin/` | Plugin root | Executables added to the Bash tool's `PATH` while the plugin is enabled | -| `settings.json` | Plugin root | Default [settings](/docs/en/settings) applied when the plugin is enabled | +| Directory | Location | Purpose | +| :---------------- | :---------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `.claude-plugin/` | Plugin root | Contains `plugin.json` manifest (optional if components use default locations) | +| `skills/` | Plugin root | Skills as `<name>/SKILL.md` directories | +| `commands/` | Plugin root | Skills as flat Markdown files. Use `skills/` for new plugins | +| `agents/` | Plugin root | Custom agent definitions | +| `hooks/` | Plugin root | Event handlers in `hooks.json` | +| `.mcp.json` | Plugin root | MCP server configurations | +| `.lsp.json` | Plugin root | LSP server configurations for code intelligence | +| `monitors/` | Plugin root | Background monitor configurations in `monitors.json` | +| `bin/` | Plugin root | Executables added to the Bash tool's `PATH` while the plugin is enabled. You can't include this directory in a plugin you [distribute through claude.ai organization settings](/docs/en/plugin-marketplaces#keep-executables-out-of-the-top-level-bin-directory) | +| `settings.json` | Plugin root | Default [settings](/docs/en/settings) applied when the plugin is enabled | A plugin that ships exactly one skill can place `SKILL.md` directly at the plugin root instead of creating a `skills/` directory. Claude Code loads it as a single skill and uses the frontmatter `name` field for the invocation name. Use the `skills/` layout for plugins that may grow to more than one skill.
plugins-reference Changed · +15 / -15 lines
from line 883
### File locations reference -| Component | Default Location | Purpose | -| :---------------- | :--------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Manifest** | `.claude-plugin/plugin.json` | Plugin metadata and configuration (optional) | -| **Skills** | `skills/` | Skills with `<name>/SKILL.md` structure | -| **Commands** | `commands/` | Skills as flat Markdown files. Use `skills/` for new plugins | -| **Agents** | `agents/` | Subagent Markdown files | -| **Workflows** | `workflows/` | [Workflow](/docs/en/workflows) script files | -| **Output styles** | `output-styles/` | Output style definitions | -| **Themes** | `themes/` | Color theme definitions | -| **Hooks** | `hooks/hooks.json` | Hook configuration | -| **MCP servers** | `.mcp.json` | MCP server definitions | -| **LSP servers** | `.lsp.json` | Language server configurations | -| **Monitors** | `monitors/monitors.json` | Background monitor configurations | -| **Executables** | `bin/` | Executables added to the Bash tool's `PATH`. Files here are invokable as bare commands in any Bash tool call while the plugin is enabled | -| **Settings** | `settings.json` | Default configuration applied when the plugin is enabled. Only the [`agent`](/docs/en/sub-agents) and [`subagentStatusLine`](/docs/en/statusline#subagent-status-lines) keys are supported | +| Component | Default Location | Purpose | +| :---------------- | :--------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Manifest** | `.claude-plugin/plugin.json` | Plugin metadata and configuration (optional) | +| **Skills** | `skills/` | Skills with `<name>/SKILL.md` structure | +| **Commands** | `commands/` | Skills as flat Markdown files. Use `skills/` for new plugins | +| **Agents** | `agents/` | Subagent Markdown files | +| **Workflows** | `workflows/` | [Workflow](/docs/en/workflows) script files | +| **Output styles** | `output-styles/` | Output style definitions | +| **Themes** | `themes/` | Color theme definitions | +| **Hooks** | `hooks/hooks.json` | Hook configuration | +| **MCP servers** | `.mcp.json` | MCP server definitions | +| **LSP servers** | `.lsp.json` | Language server configurations | +| **Monitors** | `monitors/monitors.json` | Background monitor configurations | +| **Executables** | `bin/` | Executables added to the Bash tool's `PATH` and invokable as bare commands while the plugin is enabled. You can't include this directory in a plugin you [distribute through claude.ai organization settings](/docs/en/plugin-marketplaces#keep-executables-out-of-the-top-level-bin-directory) | +| **Settings** | `settings.json` | Default configuration applied when the plugin is enabled. Only the [`agent`](/docs/en/sub-agents) and [`subagentStatusLine`](/docs/en/statusline#subagent-status-lines) keys are supported | ***
commands Changed · +1 / -1 lines
from line 147
| `/ultraplan <prompt>` | Removed. Use [plan mode](/docs/en/permission-modes#analyze-before-you-edit-with-plan-mode) instead. Previously sent a planning task to a [Claude Code on the web](/docs/en/claude-code-on-the-web) session for review in your browser | | `/ultrareview [PR or branch]` | Run a deep, multi-agent code review in a cloud sandbox with [ultrareview](/docs/en/ultrareview). Pass a PR reference to review that pull request, or a branch name to change the comparison base. The preferred invocation is now `/code-review ultra`, and `/ultrareview` remains as an alias. Includes 3 free runs on Pro and Max, then requires [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans) | | `/upgrade` | Open the upgrade page in your browser to switch to a higher plan tier. When the browser fails to open, the command shows a sign-in prompt without printing the URL | -| `/usage` | Show session cost, plan usage limits, and activity stats. On a Pro, Max, Team, or Enterprise plan, includes a breakdown of usage by skill, subagent, plugin, and MCP server. See the [cost tracking guide](/docs/en/costs#using-the-%2Fusage-command) for details. `/cost` and `/stats` are aliases | +| `/usage` | Show session cost, plan usage limits, and activity stats. On a Pro, Max, Team, or Enterprise plan, includes a [breakdown of what counts against your plan limits](/docs/en/costs#plan-usage-breakdown). `/cost` and `/stats` are aliases | | `/usage-credits` | Configure usage credits, or request them from your admin, when you hit a limit. Opens your [usage-credits billing settings](/docs/en/costs#add-usage-credits-to-your-subscription) in the browser, except that Team and Enterprise members without billing access instead send a usage-credits request to their admin from the CLI, after confirming in a dialog that the request notifies their admins. When no browser can open the billing page, for example over SSH, the command prints the URL to visit instead; this requires Claude Code v2.1.205 or later, and earlier versions showed nothing in that case. Previously `/extra-usage` | | `/verify` | **[Skill](/docs/en/skills#bundled-skills).** Confirm a code change does what it should by building your project's app, running it, and observing the result, rather than relying on tests or type checks. See [Run and verify your app](/docs/en/skills#run-and-verify-your-app) | | `/vim` | Removed in v2.1.92. To toggle between Vim and Normal editing modes, use `/config` → Editor mode |