claude-code - 💡(How to fix) Fix Add project-scoped skill metadata filtering [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54849Fetched 2026-04-30 06:34:12
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2closed ×1cross-referenced ×1

Root Cause

Large cross-project skill catalogues hurt model focus and waste context. This is especially painful for users who use Claude Code across unrelated workstreams, such as engineering repos, notes, personal admin, research, and local ops.

OpenAI Codex already has two useful primitives here:

  • repo-scoped skill discovery via repo-local .codex/skills/
  • a skills metadata context budget cap with graceful description truncation

Claude Code already has the global frontmatter mechanism that proves metadata removal is possible. The missing piece is per-project scope.

Code Example

{
  "enabledSkills": ["test-driven-development", "github-pr-workflow"],
  "disabledSkills": ["minecraft-modpack-server", "pytorch-fsdp"]
}
RAW_BUFFERClick to expand / collapse

Problem

Claude Code injects the global skill catalogue metadata into the session prompt, but project-level skill permissions do not reduce that metadata cost.

In our measured setup, a new Claude Code session injected 122 skill entries, about 31,793 bytes of metadata. Many entries are irrelevant in a given project or workstream. Example: a career-tracking session does not need ML training, Minecraft server, weather report, or Firecrawl SDK integration skills in the prompt.

Current behavior

There are two existing mechanisms, but neither solves per-project prompt bloat:

  1. disable-model-invocation: true in a skill's frontmatter removes the skill from Claude's context entirely, but it is global. It is not safe for skills that are irrelevant in one project and useful in another.
  2. Skill(name) permission deny in project settings blocks invocation, but does not remove the skill metadata from the system prompt, so it does not reduce token or attention cost.

This makes project-local curation impossible without globally hiding skills.

Requested behavior

Please add a project-level setting that removes skill metadata from the prompt for that project. For example:

{
  "enabledSkills": ["test-driven-development", "github-pr-workflow"],
  "disabledSkills": ["minecraft-modpack-server", "pytorch-fsdp"]
}

The exact schema is flexible. The key requirement is that the filtering happens before the skill catalogue is rendered into the model context, not only at invocation time.

Why this matters

Large cross-project skill catalogues hurt model focus and waste context. This is especially painful for users who use Claude Code across unrelated workstreams, such as engineering repos, notes, personal admin, research, and local ops.

OpenAI Codex already has two useful primitives here:

  • repo-scoped skill discovery via repo-local .codex/skills/
  • a skills metadata context budget cap with graceful description truncation

Claude Code already has the global frontmatter mechanism that proves metadata removal is possible. The missing piece is per-project scope.

Prior issue context

This is related to #37463, which was closed and locked on March 30, 2026. The likely confusion is that permission rules solve invocation control, but not metadata cost. This request is specifically about reducing the system prompt metadata.

Acceptance criteria

  • A project can hide or allowlist skills before the skill catalogue is injected into the model context.
  • The behavior is project-scoped, not global to the user's full Claude Code installation.
  • Documentation distinguishes metadata filtering from invocation permission denial.

extent analysis

TL;DR

Implement a project-level setting to filter skill metadata from the model context before injection.

Guidance

  • Introduce a project-specific configuration option, such as the proposed enabledSkills and disabledSkills JSON object, to control which skills are included in the model context.
  • Ensure this filtering occurs before the skill catalogue is rendered into the model context to reduce metadata cost.
  • Update documentation to clearly distinguish between metadata filtering and invocation permission denial.
  • Consider implementing a context budget cap with graceful description truncation, similar to OpenAI Codex, to further optimize model performance.

Example

{
  "enabledSkills": ["test-driven-development", "github-pr-workflow"],
  "disabledSkills": ["minecraft-modpack-server", "pytorch-fsdp"]
}

This example illustrates a potential project-level setting to control skill metadata inclusion.

Notes

The exact schema for the project-level setting is flexible, but it should allow for both enablement and disablement of skills on a per-project basis.

Recommendation

Apply a workaround by implementing a custom solution to filter skill metadata at the project level, as the requested feature is not currently available. This will help reduce metadata cost and improve model focus until a native solution is implemented.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING