Skip to content
This repository was archived by the owner on May 20, 2026. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/extension/prompts/node/agent/agentPrompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { sessionResourceToId } from '../../../../platform/chat/common/chatDebugF
import { ChatLocation } from '../../../../platform/chat/common/commonTypes';
import { ConfigKey, IConfigurationService } from '../../../../platform/configuration/common/configurationService';
import { ICustomInstructionsService } from '../../../../platform/customInstructions/common/customInstructionsService';
import { USE_SKILL_ADHERENCE_PROMPT_SETTING } from '../../../../platform/customInstructions/common/promptTypes';
import { CacheType } from '../../../../platform/endpoint/common/endpointTypes';
import { IEnvService, OperatingSystem } from '../../../../platform/env/common/envService';
import { IIgnoreService } from '../../../../platform/ignore/common/ignoreService';
Expand Down Expand Up @@ -361,8 +360,7 @@ export class AgentUserMessage extends PromptElement<AgentUserMessageProps> {
constructor(
props: AgentUserMessageProps,
@IPromptVariablesService private readonly promptVariablesService: IPromptVariablesService,
@ILogService private readonly logService: ILogService,
@IConfigurationService private readonly configurationService: IConfigurationService
@ILogService private readonly logService: ILogService
) {
super(props);
}
Expand Down Expand Up @@ -429,7 +427,7 @@ export class AgentUserMessage extends PromptElement<AgentUserMessageProps> {
{/* Critical reminders that are effective when repeated right next to the user message */}
<ReminderInstructionsClass {...reminderProps} />
<NotebookReminderInstructions chatVariables={this.props.chatVariables} query={this.props.request} />
{this.configurationService.getNonExtensionConfig<boolean>(USE_SKILL_ADHERENCE_PROMPT_SETTING) && <SkillAdherenceReminder chatVariables={this.props.chatVariables} />}
<SkillAdherenceReminder chatVariables={this.props.chatVariables} />
</Tag>
{query && <Tag name={userQueryTagName} priority={900} flexGrow={7}>
<UserQuery chatVariables={this.props.chatVariables} query={query} />
Expand Down
14 changes: 14 additions & 0 deletions src/extension/prompts/node/agent/test/agentPrompt.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,20 @@ testFamilies.forEach(family => {
}, undefined)).toMatchFileSnapshot(getSnapshotFile('one_attachment'));
});

test('includes skill adherence reminder when instruction index has skills', async () => {
const prompt = await agentPromptToString(accessor, {
chatVariables: new ChatVariablesCollection([{
id: 'vscode.customizations.index',
name: 'customizations index',
value: '<skills><skill><file>/workspace/.github/skills/example/SKILL.md</file></skill></skills>',
}]),
history: [],
query: 'hello',
}, undefined);

expect(prompt).toContain("Always check if any skills apply to the user's request.");
});

const tools: IBuildPromptContext['tools'] = {
availableTools: [],
toolInvocationToken: null as never,
Expand Down
1 change: 0 additions & 1 deletion src/platform/customInstructions/common/promptTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export const SKILLS_LOCATION_KEY = 'chat.agentSkillsLocations';
export const WORKSPACE_SKILL_FOLDERS = ['.github/skills', '.claude/skills'];
export const PERSONAL_SKILL_FOLDERS = ['.copilot/skills', '.claude/skills'];
export const USE_AGENT_SKILLS_SETTING = 'chat.useAgentSkills';
export const USE_SKILL_ADHERENCE_PROMPT_SETTING = 'chat.experimental.useSkillAdherencePrompt';

export const COPILOT_INSTRUCTIONS_PATH = '.github/copilot-instructions.md';

Expand Down
Loading