[BUG] claude code skill unconditionally inlines all files under shared/
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?
The claude-api skill correctly applies progressive disclosure for language-specific documentation, but it does not do the same for the shared/ directory.
For example, when asking a narrowly scoped question such as "Which Bedrock client should I use?" in a Python project:
The skill correctly detects Python and only loads the python/ documentation (~84 KB).
However, it then unconditionally loads all files under shared/ (~468 KB across 25 files), regardless of query relevance.
This includes large documents such as:
model-migration.md (~144 KB)
managed-agents-*.md (~180 KB across 14 files)
As a result, a simple Bedrock-related question loads approximately 552 KB of documentation, even though only a small subset of the shared content is relevant.
For Bedrock/AWS-specific questions, only files such as:
claude-platform-on-aws.md
platform-availability.md
appear necessary, totaling roughly 8 KB.
This creates a significant relevance mismatch and consumes a large portion of the available context window with unrelated documentation.
What Should Happen?
The shared/ documentation should support topic-level progressive disclosure, similar to the existing language-level disclosure mechanism.
Instead of loading the entire shared/ directory, the skill should load only the documentation relevant to the current user query.
Examples:
Load managed-agents-*.md only when the user asks about Managed Agents.
Load model-migration.md only for model migration, model deprecation, or upgrade-related questions.
Retrieve shared documents based on topic classification, indexing, or relevance matching.
Optionally keep small, broadly applicable platform-reference documents available by default.
For a typical Bedrock/AWS query, this would reduce shared-document loading from approximately 468 KB to approximately 8 KB, significantly improving context efficiency.
Error Messages/Logs
Steps to Reproduce
Open any project containing Python files.
Ask a question that triggers the claude-api skill, for example:
Which Bedrock client should I use?
Inspect the documentation loaded into the context.
Observe that:
The skill correctly loads only the Python-specific documentation.
The entire shared/ directory is also inlined, including many unrelated files.
Compare the loaded documentation with the actual query requirements and note that only a small subset of the shared documents is relevant to answering the question.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.212
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Warp
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗