internaltool-mcp 1.6.41 → 1.6.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +54 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -463,6 +463,60 @@ Returns tasks with key, title, column, assignees, priority, taskType, and branch
|
|
|
463
463
|
}
|
|
464
464
|
)
|
|
465
465
|
|
|
466
|
+
// ── suggest_skill ─────────────────────────────────────────────────────────────
|
|
467
|
+
server.tool(
|
|
468
|
+
'suggest_skill',
|
|
469
|
+
`Propose a reusable skill, rule, prompt, subagent, or hook to the project's AgentKit — pending human approval.
|
|
470
|
+
|
|
471
|
+
## When to call this
|
|
472
|
+
|
|
473
|
+
Call this when you discover something during a coding session that would help future sessions in this codebase:
|
|
474
|
+
|
|
475
|
+
- **skill**: A step-by-step methodology you used (e.g. "how to add a new API endpoint in this Express app", "how to run and interpret the test suite")
|
|
476
|
+
- **rule**: A constraint that should always apply (e.g. "always validate with zod before touching the DB", "never modify migrations directly")
|
|
477
|
+
- **prompt**: A prompt template that reliably produces good results for this project (e.g. "security sweep prompt", "PR review checklist")
|
|
478
|
+
- **subagent**: A specialized agent persona (e.g. "database migration specialist with access to prisma tools only")
|
|
479
|
+
- **hook**: A shell command that should run automatically (e.g. "check .internaltool-active-task before any Edit", "run lint after Write")
|
|
480
|
+
|
|
481
|
+
## When NOT to call this
|
|
482
|
+
|
|
483
|
+
- Do not suggest things that are obvious from the README or existing docs
|
|
484
|
+
- Do not suggest generic skills that apply to any codebase (e.g. "how to write clean code")
|
|
485
|
+
- Do not suggest more than 1-2 skills per session — be selective and high-signal
|
|
486
|
+
|
|
487
|
+
## The human reviews and decides
|
|
488
|
+
|
|
489
|
+
Your suggestion goes into a "Pending" queue visible in the project's AgentKit UI.
|
|
490
|
+
The developer can edit the body, approve (which promotes it to active config), or reject.
|
|
491
|
+
After approval, the skill/rule is injected at every future kickoff_task.`,
|
|
492
|
+
{
|
|
493
|
+
projectId: z.string().describe("Project's MongoDB ObjectId"),
|
|
494
|
+
type: z.enum(['skill', 'rule', 'prompt', 'subagent', 'hook']).describe('What kind of suggestion this is'),
|
|
495
|
+
name: z.string().describe('Slug name — lowercase, hyphens, no spaces (e.g. "add-express-route", "require-zod-validation")'),
|
|
496
|
+
description: z.string().describe('One-line description of what this does — shown in the AgentKit UI'),
|
|
497
|
+
body: z.string().describe('Full markdown content — for skills: step-by-step instructions; for rules: constraint language; for hooks: shell command + explanation'),
|
|
498
|
+
rationale: z.string().describe('Why this would help future sessions — what problem it solves, what mistake it prevents, or what pattern it captures'),
|
|
499
|
+
sourceTaskId: z.string().optional().describe('Task ID this was discovered during (for traceability)'),
|
|
500
|
+
sourceTaskKey: z.string().optional().describe('Task key (e.g. PROJ-42) for display'),
|
|
501
|
+
// Hook-specific
|
|
502
|
+
hookTrigger: z.string().optional().describe('For type=hook: when it fires (PreToolUse | PostToolUse | Stop)'),
|
|
503
|
+
hookMatcher: z.string().optional().describe('For type=hook: tool name regex matcher (e.g. "Edit|Write")'),
|
|
504
|
+
hookCommand: z.string().optional().describe('For type=hook: the shell command to execute'),
|
|
505
|
+
},
|
|
506
|
+
async ({ projectId, type, name, description, body, rationale, sourceTaskId, sourceTaskKey, hookTrigger, hookMatcher, hookCommand }) => {
|
|
507
|
+
try { assertProjectScope(projectId) } catch (e) { return errorText(e.message) }
|
|
508
|
+
return call(() => api.post(`/api/projects/${projectId}/skill-suggestions`, {
|
|
509
|
+
type, name, description, body, rationale,
|
|
510
|
+
sourceTaskId: sourceTaskId || null,
|
|
511
|
+
sourceTaskKey: sourceTaskKey || '',
|
|
512
|
+
suggestedBy: 'Claude Code',
|
|
513
|
+
hookTrigger: hookTrigger || '',
|
|
514
|
+
hookMatcher: hookMatcher || '',
|
|
515
|
+
hookCommand: hookCommand || '',
|
|
516
|
+
}))
|
|
517
|
+
}
|
|
518
|
+
)
|
|
519
|
+
|
|
466
520
|
// ── plan_task_from_codebase ───────────────────────────────────────────────────
|
|
467
521
|
server.tool(
|
|
468
522
|
'plan_task_from_codebase',
|
package/package.json
CHANGED