kit
Browse personal agents, commands, and skills. List all items, search by query, or get details by name and kind.
Instructions
Browse the personal kit: agents, commands, skills.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| kind | No | For action=get | |
| name | No | For action=get | |
| query | No | For action=search |
Implementation Reference
- src/mcp-server/index.js:28-42 (registration)Registration of the 'kit' tool in the TOOLS array with input schema defining actions: list-agents, list-commands, list-skills, get, search.
const TOOLS = [ { name: 'kit', description: 'Browse the personal kit: agents, commands, skills.', inputSchema: { type: 'object', properties: { action: { type: 'string', enum: ['list-agents', 'list-commands', 'list-skills', 'get', 'search'] }, kind: { type: 'string', enum: ['agent', 'command', 'skill'], description: 'For action=get' }, name: { type: 'string', description: 'For action=get' }, query: { type: 'string', description: 'For action=search' }, }, required: ['action'], }, }, - src/mcp-server/index.js:130-144 (handler)The handleKit function — the actual handler that dispatches on action (list-agents, list-commands, list-skills, get, search) and calls listKit, findItem, or searchKit from kit.js.
async function handleKit(args) { const kit = await listKit(); switch (args.action) { case 'list-agents': return kit.agents.map(slim); case 'list-commands': return kit.commands.map(slim); case 'list-skills': return [...kit.skills, ...kit.skillsExtras].map(slim); case 'get': { const item = findItem(kit, args.kind, args.name); if (!item) return { error: `Not found: ${args.kind}/${args.name}` }; return { kind: item.kind, name: item.name, absPath: item.absPath, content: item.content ?? item.skillContent }; } case 'search': return searchKit(kit, args.query ?? ''); default: return { error: `Unknown action: ${args.action}` }; } } - src/core/kit.js:40-55 (helper)listKit() — reads the canonical kit/ directory (agents, commands, skills) and returns a structured index with caching.
export async function listKit(kitRoot) { kitRoot = resolveKitRoot(kitRoot); const cached = kitCache.get(kitRoot); if (cached && Date.now() - cached.ts < KIT_CACHE_TTL_MS) { return cached.value; } const [agents, commands, skills, skillsExtras] = await Promise.all([ readMdDir(path.join(kitRoot, 'agents'), 'agent'), readMdDir(path.join(kitRoot, 'commands'), 'command'), readSkillsDir(path.join(kitRoot, 'skills')), readSkillsDir(path.join(kitRoot, 'skills-extras')).catch(() => []), ]); const value = { agents, commands, skills, skillsExtras, kitRoot }; kitCache.set(kitRoot, { value, ts: Date.now() }); return value; } - src/core/kit.js:169-176 (helper)searchKit() — filters kit items by name/description matching the query string.
export function searchKit(kit, query) { const q = query.toLowerCase(); const all = [...kit.agents, ...kit.commands, ...kit.skills, ...kit.skillsExtras]; return all.filter(item => item.name.toLowerCase().includes(q) || (item.description ?? '').toLowerCase().includes(q) ).map(({ kind, name, description, absPath }) => ({ kind, name, description, absPath })); } - src/core/kit.js:178-183 (helper)findItem() — retrieves a single item by kind (agent/command/skill) and name from the kit index.
export function findItem(kit, kind, name) { const buckets = { agent: kit.agents, command: kit.commands, skill: [...kit.skills, ...kit.skillsExtras] }; const b = buckets[kind]; if (!b) throw new Error(`Unknown kind: ${kind}`); return b.find(x => x.name === name) ?? null; }