feat!: add workos skills subcommand group (install, uninstall, list)#86
Merged
feat!: add workos skills subcommand group (install, uninstall, list)#86
workos skills subcommand group (install, uninstall, list)#86Conversation
…ing agents Mirrors install-skill with --list, --skill, and --agent flags. Detects installed skills by scanning agent directories for known WorkOS skill names, ensuring user-created skills are never removed.
The auth system keeps the event loop alive after command completion. Other commands (install, doctor) already call process.exit(0) explicitly.
…mmand - Add structured JSON output for --list, results, and errors (isJsonMode/outputJson/exitWithError) - Add project logging (logError/logInfo/logWarn) for Sentry and session logs - Wrap discoverSkills in try-catch with actionable error message - Warn on unrecognized --skill names instead of silently ignoring - Replace redundant existsSync pre-check with findInstalledSkills - Remove process.exit(0) from install-skill and uninstall-skill handlers in bin.ts - Add orchestrator tests for --skill filter and JSON mode tests - Consolidate duplicate fs import and add globalSkillsDir nonexistent test
BREAKING CHANGE: `workos install-skill` and `workos uninstall-skill` are replaced by `workos skills install`, `workos skills uninstall`, and `workos skills list`. - Restructure as `skills` subcommand group using registerSubcommand - Extract `--list` flags into dedicated `workos skills list` command that shows both available and installed skills per agent - Remove withAuth from skills commands (no API calls needed) - Add list-skills.ts with JSON mode support - Add list-skills.spec.ts with human and JSON output tests - Update help-json.ts command registry to nested structure
workos skills subcommand group (install, uninstall, list)
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
Introduces a
workos skillssubcommand group that replaces the standaloneinstall-skillanduninstall-skillcommands, following the same nested pattern used by other resource commands (workos env,workos organization, etc.).New command structure
Breaking changes
workos install-skill→workos skills installworkos uninstall-skill→workos skills uninstall--listflag removed from both commands in favor ofworkos skills listSkills commands no longer require auth
Skills commands only read/write local files (no WorkOS API calls), so the
withAuthwrapper has been removed. This also fixes a bug where the process would hang after auth login due to an unclosed HTTP server from the OAuth callback.Proper error handling and JSON mode support
The
uninstallandlistcommands now use the project's standard output and logging infrastructure:--jsonflag, including structured error objects to stderr ({ "error": { "code": "...", "message": "..." } })logError/logWarn/logInfofor Sentry tracking and session log filesexitWithError: All failure exits use structured error codes (SKILLS_DIR_READ_FAILED,NO_AGENTS_FOUND,SKILL_NOT_FOUND)discoverSkillserror handling: Wrapped in try-catch with actionable error message instead of raw stack trace--skillvalues don't match known skills instead of silently ignoring themOther improvements
process.exit(0)workaround from bothinstall-skillanduninstall-skillhandlers inbin.ts(root cause waswithAuth, now removed)existsSyncpre-check withfindInstalledSkillsto eliminate TOCTOU racefsimport in test filefindInstalledSkillswhenglobalSkillsDirdoesn't exist--skillfilter edge cases (all unknown, partial match)help-json.tscommand registry to nestedskillsstructureworkos skills listshows both available skills and installed-per-agent in a unified view