Skip to content

fix(claude): add settingSources to load Skills, Commands, and CLAUDE.md#1290

Open
murataslan1 wants to merge 1 commit intopingdotgg:mainfrom
murataslan1:fix/claude-settings-sources
Open

fix(claude): add settingSources to load Skills, Commands, and CLAUDE.md#1290
murataslan1 wants to merge 1 commit intopingdotgg:mainfrom
murataslan1:fix/claude-settings-sources

Conversation

@murataslan1
Copy link

@murataslan1 murataslan1 commented Mar 21, 2026

Summary

Adds settingSources: ["user", "project"] to Claude Agent SDK query options so that filesystem-based Claude Code features are loaded:

  • Skills (.claude/skills/ and ~/.claude/skills/)
  • Slash Commands (.claude/commands/ and ~/.claude/commands/)
  • CLAUDE.md memory files

Per the SDK docs, the SDK does not load any filesystem settings by default — settingSources must be explicitly configured.

Test plan

  • Install a Skill in ~/.claude/skills/ and verify it's available in t3code Claude sessions
  • Create a CLAUDE.md in a project directory and verify Claude reads it
  • Test custom slash commands in .claude/commands/

Fixes #1283

Note

Add settingSources to Claude query options to load Skills, Commands, and CLAUDE.md

Adds settingSources: ["user", "project"] to the queryOptions object constructed in makeClaudeAdapter in ClaudeAdapter.ts. This tells the Claude API to load user and project-level settings, enabling Skills, Commands, and CLAUDE.md to be picked up during queries.

Macroscope summarized eaaa088.

The Claude Agent SDK does not load filesystem settings by default.
Without settingSources, Skills, slash commands, and CLAUDE.md memory
files are silently ignored.

Fixes pingdotgg#1283
Copilot AI review requested due to automatic review settings March 21, 2026 23:59
@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f416428a-bfbe-4725-93e6-d331118b05a7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable poems in the walkthrough.

Disable the reviews.poem setting to disable the poems in the walkthrough.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 21, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Claude Agent SDK integration so that Claude Code filesystem-based features (Skills, slash commands, and CLAUDE.md memory) are discovered by explicitly enabling SDK settingSources.

Changes:

  • Pass settingSources: ["user", "project"] in the Claude Agent SDK queryOptions so filesystem settings are loaded.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

includePartialMessages: true,
canUseTool,
env: process.env,
settingSources: ["user", "project"],
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

settingSources changes the Claude SDK session behavior, but there’s no test assertion that createQuery receives the expected sources. Please add/extend a unit test (e.g. in ClaudeAdapter.test.ts) to verify createInput.options.settingSources is set, so regressions don’t silently disable Skills/Commands/CLAUDE.md again.

Copilot uses AI. Check for mistakes.
includePartialMessages: true,
canUseTool,
env: process.env,
settingSources: ["user", "project"],
Copy link

Copilot AI Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coding settingSources: ["user", "project"] means the server process will load host-level ~/.claude/* settings and project .claude/* files for every session. In web mode (where the server can bind to non-loopback), this can unintentionally apply/possibly expose host-specific CLAUDE.md memory, Skills, or slash commands to any authenticated client. Consider making settingSources configurable (e.g. via providerOptions.claudeAgent) and/or defaulting to a safer value (like only "project", or only enabling "user" in desktop mode).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude integration does not load installed Skills, Slash Commands, or CLAUDE.md memory

2 participants