`/context` accounting: Skills bucket decrease mirrored by equal System tools increase on skill removal

Resolved 💬 2 comments Opened Apr 21, 2026 by michellepace Closed Apr 29, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When I manually delete skill directories from an installed plugin to reduce my context window, /context shows the Skills bucket shrink by an amount that is then added, to the decimal, to the System tools bucket. Total context is unchanged. The swap is perfectly reproducible across fresh sessions.

Motivation for the experiment: I installed the Shopify AI Toolkit marketplace, which ships as a single plugin (shopify-plugin@shopify-ai-toolkit) containing 19 skills. My project is an Online Store 2.0 theme customisation — only 5 of those 19 skills are relevant. There is currently no way in settings.json to disable individual skills from a plugin; enabledPlugins is all-or-nothing. I pruned the skill directories directly to (a) reduce the ~1.1k tokens of irrelevant trigger descriptions injected per turn, and (b) improve routing (fewer distractors = more accurate skill selection).

<img width="1445" height="921" alt="Image" src="https://github.com/user-attachments/assets/f5e760ba-061a-4a74-82e9-e020053e4172" />

What I observed instead:

| Bucket | Before prune (19 skills) | After prune, fresh session (5 skills) | Subsequent sessions (5 skills) |
|---|---|---|---|
| System prompt | 8.5k | 8.5k | 8.5k |
| System tools | 11.5k | 12.6k ⁉️ (+1.1k, why?) | 12.6k (repeatable) |
| Memory files | 3.2k | 3.2k | 3.2k |
| Skills | 2.2k | 1.1k ✅ (-1.1k, expected) | 1.1k (repeatable) |
| Messages | 13 | 13 | 13 |
| Total | 25.5k | 25.5k | 25.5k |
| Plugin skills loaded | 19 | 5 | 5 |

All measurements were taken in fresh sessions. The post-prune values held identically across the first fresh session after the prune and three subsequent fresh sessions — not jitter. Skills drops by 1.1k (expected, matches the 14 removed skill descriptions). System tools rises by 1.1k (unexplained). Total unchanged across all runs.

A sub-investigation via the claude-code-guide agent found:

  • Per docs, "System tools" accounts for built-in Claude Code tool schemas (Read, Edit, Grep, Bash, etc.) — Anthropic-managed.
  • Per docs, plugins cannot contribute to the "System tools" bucket via any documented mechanism.
  • The Shopify plugin's .mcp.json is empty ({"mcpServers": {}}) at every location, so this is not MCP registration shifting buckets.
  • No documentation explains why removing skill files from a plugin would cause the System tools bucket to grow by the same amount.

What Should Happen?

One of the following:

  1. If the prune genuinely does save tokens at the API level, then /context should reflect that — Skills drops by 1.1k and Total drops by 1.1k, with System tools unchanged. Right now the display implies the prune bought me nothing, which may or may not be accurate but is impossible to verify from inside Claude Code.
  1. If the System tools bucket really does grow when skills are removed (e.g. some deferred tool promotion mechanism), this needs to be documented so users can make informed decisions about context-reduction strategies.
  1. Secondary ask (feature): allow users to selectively disable individual skills from a plugin via settings.json — e.g. a disabledSkills array, or a nested enabledPlugins form that takes a skill allowlist. Without this, users are forced into file-system hacks that are clobbered on every plugin update/reinstall.

Error Messages/Logs

No errors. This is a silent accounting discrepancy in /context. Below are the raw /context outputs from the experiment.

Before prune (fresh session, 19 Shopify skills loaded):

Context Usage
25.5k/1m tokens (3%)

Estimated usage by category
⛁ System prompt: 8.5k tokens (0.9%)
⛁ System tools: 11.5k tokens (1.2%)
⛁ Memory files: 3.2k tokens (0.3%)
⛁ Skills: 2.2k tokens (0.2%)
⛁ Messages: 13 tokens (0.0%)
  Free space: 941.5k (94.1%)
  Autocompact buffer: 33k tokens (3.3%)

Skills · /skills
User
└ ask-docs: 20 tokens
Plugin
├ shopify-onboarding-merchant: 184 tokens
├ shopify-admin-execution: 164 tokens
├ shopify-hydrogen: 130 tokens
├ shopify-custom-data: 108 tokens
├ shopify-functions: 95 tokens
├ shopify-storefront-graphql: 93 tokens
├ shopify-liquid: 81 tokens
├ shopify-polaris-checkout-extensions: 81 tokens
├ shopify-polaris-customer-account-extensions: 80 tokens
├ shopify-pos-ui: 78 tokens
├ shopify-onboarding-dev: 67 tokens
├ shopify-polaris-admin-extensions: 62 tokens
├ shopify-polaris-app-home: 60 tokens
├ shopify-app-store-review: 53 tokens
├ shopify-partner: 42 tokens
├ shopify-payments-apps: 37 tokens
├ shopify-customer: 37 tokens
├ shopify-admin: 33 tokens
└ shopify-dev: 32 tokens

After prune (fresh session, 5 Shopify skills loaded) — reproduced in 4 sessions:

Context Usage
25.5k/1m tokens (3%)

Estimated usage by category
⛁ System prompt: 8.5k tokens (0.9%)
⛁ System tools: 12.6k tokens (1.3%)
⛁ Memory files: 3.2k tokens (0.3%)
⛁ Skills: 1.1k tokens (0.1%)
⛁ Messages: 13 tokens (0.0%)
  Free space: 941.5k (94.1%)
  Autocompact buffer: 33k tokens (3.3%)

Skills · /skills
User
└ ask-docs: 20 tokens
Plugin
├ shopify-admin-execution: 164 tokens
├ shopify-custom-data: 108 tokens
├ shopify-liquid: 81 tokens
├ shopify-admin: 33 tokens
└ shopify-dev: 32 tokens

Steps to Reproduce

  1. Install a plugin that ships multiple skills. I used the Shopify AI Toolkit:

``
/plugin marketplace add Shopify/Shopify-AI-Toolkit
/plugin install shopify-plugin@shopify-ai-toolkit
``

  1. Open a fresh session, run /context, record the System tools and Skills bucket values. With all 19 Shopify skills loaded, expect approximately:
  • System tools: 11.5k
  • Skills: 2.2k (19 plugin skills)
  1. Delete the 14 skill directories I don't need from the plugin's cache install path, keeping only 5:

``bash
cd ~/.claude/plugins/cache/shopify-ai-toolkit/shopify-plugin/1.1.0/skills
rm -rf shopify-app-store-review shopify-customer shopify-functions \
shopify-hydrogen shopify-onboarding-dev shopify-onboarding-merchant \
shopify-partner shopify-payments-apps shopify-polaris-admin-extensions \
shopify-polaris-app-home shopify-polaris-checkout-extensions \
shopify-polaris-customer-account-extensions shopify-pos-ui \
shopify-storefront-graphql
``

The 5 skills kept: shopify-admin, shopify-admin-execution, shopify-custom-data, shopify-dev, shopify-liquid.

  1. Open a fresh Claude Code session (I verified this across four separate fresh sessions), run /context again. Observe:
  • Skills: 1.1k (dropped by 1.1k — expected)
  • System tools: 12.6k (grew by 1.1k — unexpected)
  • Total: 25.5k (unchanged)
  1. The increase in System tools exactly cancels the decrease in Skills, every time.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

N/A

Claude Code Version

2.1.116

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

Qualitative impact (the reason I cared about this in the first place): With all 19 skills loaded, I miscounted them in-session ("17 Shopify skills" — actual 19) and produced verbose answers with explicit "ignore these" triage sections. With 5 skills loaded, counting was accurate and answers were tighter. So the prune does produce measurably better routing behaviour from the model, even if /context insists no tokens were saved. This is why the accounting discrepancy matters: without a reliable display, users can't tell whether quality improvements come with a token cost or not.

What I'm ultimately asking for:

  1. Clarify (in docs or implementation) what "System tools" actually measures and why it correlates inversely with the Skills bucket.
  2. Ideally, expose a first-class mechanism for selectively disabling individual skills from a plugin — so users don't need to hack the cache directory and redo it on every reinstall.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗