feat: Add create-expert CLI and create-expert-skill MCP server#467
Merged
feat: Add create-expert CLI and create-expert-skill MCP server#467
Conversation
- apps/create-expert: CLI that wraps startHandler to create/modify expert definitions - apps/create-expert-skill: MCP stdio skill with runExpert tool that spawns `perstack run` subprocess to test-run expert definitions - Export startHandler from perstack package with additionalEnv callback for injecting provider API keys into MCP skill environments without exposing them globally - Fix lazyInit bug in BaseSkillManager: suppress unhandled promise rejection and return empty tools for failed lazy-init skills - Add E2E tests for create-expert Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apps/create-expert: CLI package that wrapsstartHandlerto create/modify expert definitions via AI. Reads its bundledperstack.tomlat runtime viafs.readFileSync+import.meta.url.apps/create-expert-skill: MCP stdio skill providing arunExperttool that spawnsperstack runas a subprocess to test-run created experts. Returns summarized activities and usage.startHandlerexport fromperstackpackage withadditionalEnvcallback, enablingcreate-expertto inject provider API keys (e.g.ANTHROPIC_API_KEY→PROVIDER_API_KEY) into the MCP skill environment without exposing them to all skills globally.BaseSkillManager: suppresses unhandled promise rejections for lazy-init skills and returns empty tools when initialization fails.create-expert.Test plan
pnpm typecheckpasses (all 18 packages)pnpm testpasses (1101/1101 unit tests)pnpm buildsucceedspnpm biome checkcleannpx tsx apps/create-expert/bin/cli.ts --helpworks in dev modepnpm test:e2e -- --testPathPattern create-expert🤖 Generated with Claude Code