MCPcopy
hub / github.com/Doorman11991/smallcode / getSkillContext

Function getSkillContext

bin/model_client.js:311–319  ·  view source on GitHub ↗
(ctx)

Source from the content-addressed store, hash-verified

309}
310
311function getSkillContext(ctx) {
312 if (!ctx.skillManager) return '';
313 try {
314 const lastUser = [...ctx.conversationHistory].reverse().find(m => m.role === 'user');
315 if (!lastUser) return '';
316 const skills = ctx.skillManager.getAutoSkills(lastUser.content);
317 return ctx.skillManager.formatForPrompt(skills);
318 } catch { return ''; }
319}
320
321function getPluginPrompts(ctx) {
322 if (!ctx.pluginLoader) return '';

Callers 1

buildSystemPromptFunction · 0.70

Calls 2

getAutoSkillsMethod · 0.80
formatForPromptMethod · 0.45

Tested by

no test coverage detected