Skip to content

fix: progressive skill disclosure in claude-code adapter#20

Merged
shreyas-lyzr merged 1 commit intomainfrom
fix/progressive-skill-disclosure
Mar 15, 2026
Merged

fix: progressive skill disclosure in claude-code adapter#20
shreyas-lyzr merged 1 commit intomainfrom
fix/progressive-skill-disclosure

Conversation

@shreyas-lyzr
Copy link
Contributor

Summary

  • Switches claude-code adapter from loadAllSkills() to loadAllSkillMetadata(), so CLAUDE.md only inlines skill name, description, and allowed-tools with a file path reference — instead of the full SKILL.md instructions
  • Adds allowedTools field to SkillMetadata interface so metadata-only loading still surfaces tool restrictions
  • system-prompt adapter is intentionally unchanged — it produces standalone prompts for LLMs without filesystem access, so full inline is correct there

Saves ~5000 tokens per skill in the CLAUDE.md system prompt. Claude Code reads the full SKILL.md on demand when the skill is activated.

Closes #19

Test plan

  • npm run build compiles without errors
  • npm test passes
  • cd examples/standard && gitagent export --format claude-code — outputs skill metadata + file paths, not full instructions
  • cd examples/standard && gitagent export --format system-prompt — still outputs full instructions (unchanged)

🤖 Generated with Claude Code

Switch claude-code adapter from loadAllSkills() to loadAllSkillMetadata()
so CLAUDE.md only inlines skill name, description, and allowed-tools with
a file path reference instead of full SKILL.md instructions. Claude Code
can read the full instructions on demand, saving ~5000 tokens per skill.

Closes #19

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question] Why does the claude-code adapter eagerly load full SKILL.md instead of using progressive disclosure (metadata-only or file passthrough)?

1 participant