원클릭으로
chat-participant-patterns-skill
VS Code Chat API patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
VS Code Chat API patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Defense-in-depth, PII protection, secrets scanning, and secure packaging for distributed software
Systematic testing for confidence without over-testing — the right test at the right level
Generate consistent visual character references across multiple scenarios using Flux and nano-banana-pro on Replicate
Create professional ultra-wide cinematic banners for GitHub READMEs using Flux and Ideogram models with typography options
Generate professional presentations using the Gamma API with expert storytelling consulting based on Duarte methodology.
Intelligent project persona identification using priority chain detection with LLM and heuristic fallback
| name | Chat Participant Patterns Skill |
| description | VS Code Chat API patterns. |
| applyTo | **/*participant*,**/*chat*,**/*copilot*,**/lm/** |
VS Code Chat API patterns.
Chat APIs evolve with VS Code releases. Last validated: February 2026 (VS Code 1.108+)
Check: Chat API, LM API, Tools API
// package.json contribution
"contributes": {
"chatParticipants": [{
"id": "my-ext.participant",
"name": "myparticipant",
"fullName": "My Participant",
"description": "What can I help with?",
"isSticky": true,
"commands": [{ "name": "help", "description": "Get help" }]
}]
}
// In activate()
const participant = vscode.chat.createChatParticipant('my-ext.participant', handler);
participant.iconPath = vscode.Uri.joinPath(context.extensionUri, 'icon.png');
const handler: vscode.ChatRequestHandler = async (
request: vscode.ChatRequest,
context: vscode.ChatContext,
stream: vscode.ChatResponseStream,
token: vscode.CancellationToken
): Promise<IChatResult> => {
// Handle request
};
| Operation | Method |
|---|---|
| Stream text | stream.markdown() |
| Show progress | stream.progress() |
| Add button | stream.button() |
| File tree | stream.filetree() |
| Reference | stream.reference() |
| Inline anchor | stream.anchor() |
| Access history | context.history |
| Get references | request.references |
| Get model | request.model |
| Check command | request.command |
| Chat location | request.location |
// Markdown (supports CommonMark)
stream.markdown('# Title\n**bold** and _italic_');
// Code block with IntelliSense
stream.markdown('```typescript\nconst x = 1;\n```');
// Progress message
stream.progress('Processing...');
// Button (invokes VS Code command)
stream.button({ command: 'my.command', title: 'Run' });
// Command link in markdown
const md = new vscode.MarkdownString('[Run](command:my.command)');
md.isTrusted = { enabledCommands: ['my.command'] };
stream.markdown(md);
// File tree
stream.filetree([{ name: 'src', children: [{ name: 'app.ts' }] }], baseUri);
// Reference
stream.reference(vscode.Uri.file('/path/to/file.ts'));
stream.reference(new vscode.Location(uri, range));
const models = await vscode.lm.selectChatModels({ vendor: 'copilot' });
const response = await models[0].sendRequest(messages, {}, token);
for await (const chunk of response.text) {
stream.markdown(chunk);
}
// Using @vscode/chat-extension-utils library (recommended)
import * as chatUtils from '@vscode/chat-extension-utils';
const tools = vscode.lm.tools.filter(t => t.tags.includes('my-tag'));
const result = chatUtils.sendChatParticipantRequest(request, context, {
prompt: 'System instructions here',
responseStreamOptions: { stream, references: true, responseText: true },
tools
}, token);
return await result.result;
vscode.lm.registerTool('tool_name', {
async invoke(options, token) {
return new vscode.LanguageModelToolResult([
new vscode.LanguageModelTextPart('result text')
]);
}
});
"chatParticipants": [{
"id": "my-ext.participant",
"disambiguation": [{
"category": "my-domain",
"description": "Questions about X domain",
"examples": ["How do I do X?", "Explain Y concept"]
}]
}]
participant.followupProvider = {
provideFollowups(result, context, token) {
return [{ prompt: 'Tell me more', label: 'More details' }];
}
};
// Get previous requests to this participant
const previousRequests = context.history.filter(
h => h instanceof vscode.ChatRequestTurn
);
| Do | Don't |
|---|---|
| Stream responses incrementally | Block until complete |
| Handle cancellation via token | Ignore cancellation token |
| Catch and handle errors | Let exceptions crash |
| Use progress for long operations | Leave user waiting silently |
| Limit to one participant per extension | Create multiple participants |
| Ask consent for costly operations | Auto-execute destructive actions |
See synapses.json for connections.