Skip to content

Commit 2ec4c18

Browse files
authored
feat: consume skills from @workos/skills package (#88)
* feat: consume skills from @workos/skills package instead of local files Replace the CLI's bundled skill files with the @workos/skills npm package as the single source of truth. Reference content is now injected directly into the agent prompt, eliminating the Skill tool round-trip for faster execution. - Add @workos/skills as dependency - Update buildIntegrationPrompt to read reference markdown from the package and inject into prompt (replaces "use the X skill" pattern) - Remove Skill from allowedTools — no longer needed - Update plugin loading to point to @workos/skills package - Update getSkillsDir() to delegate to the package - Delete skills/ directory (17 skill files) - Delete .claude-plugin/ directory (plugin identity from package) - Remove skills and .claude-plugin from package.json files array * docs: add Do/Don't and PR checklist to CLAUDE.md * refactor: use async getReference helper from @workos/skills * chore: use published @workos/skills@0.2.1 instead of local link * fix: remove unused getPackageRoot import * chore: formatting * fix: correct return type for async buildIntegrationPrompt * fix: inject reference content in non-JS integrations instead of Skill tool Update dotnet, elixir, go, python, and ruby custom run() functions to read and inject reference content from @workos/skills, matching the pattern used by buildIntegrationPrompt. This fixes the Skill tool being unavailable since it was removed from allowedTools. * test: add guard against Skill tool references in integrations Scans all integration index.ts files to ensure none tell the agent to invoke a skill. Also verifies allowedTools excludes Skill. Prevents regression if new integrations copy old patterns. * fix: build env var list dynamically and remove credentials from prompts - buildIntegrationPrompt now builds the env var list based on config.environment.requiresApiKey instead of always listing WORKOS_API_KEY (fixes misleading prompt for React SPA) - Remove raw API key and client ID values from dotnet and ruby prompts to prevent credential leakage into log files * chore: formatting * fix: address Copilot review feedback - Update stale comment in dotnet (credentials no longer in prompt) - Fix ruby prompt to not claim env vars are pre-configured - Strengthen guard test regex to match escaped backticks * fix: include authkit-base reference alongside framework-specific reference The switch from skill invocation to direct injection dropped the base template that provides task ordering, decision trees, verification checklists, and error recovery patterns. Load both workos-authkit-base and the framework-specific reference to restore the full context. * fix: use @workos/skills@0.2.2 * chore: formatting
1 parent 0b89092 commit 2ec4c18

30 files changed

Lines changed: 148 additions & 3300 deletions

File tree

.claude-plugin/plugin.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

CLAUDE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,28 @@ pnpm typecheck # Type check
4747
1. Create `src/commands/{resource}.ts` + `{resource}.spec.ts` (follow patterns in `organization.ts`)
4848
2. Register in `src/bin.ts` and update `src/utils/help-json.ts` command registry
4949
3. Include JSON mode tests in spec file
50+
51+
## Do / Don't
52+
53+
**Do:**
54+
55+
- Follow the adapter pattern (`CLI`, `Dashboard`, `Headless`) in `src/integrations/` when adding framework installers
56+
- Use `InstallerEventEmitter` for state machine events -- see existing adapters for examples
57+
- Add both human and JSON output modes -- check `OutputMode` usage in `src/bin.ts`
58+
- Follow existing command patterns in `src/commands/organization.ts` when adding resource commands
59+
- Write `.spec.ts` tests alongside every command file
60+
61+
**Don't:**
62+
63+
- Use Node-specific sync APIs (crypto, fs sync) unless necessary
64+
- Use npm or yarn -- pnpm only
65+
- Skip JSON mode tests in spec files
66+
- Forget to wire up new frameworks in `src/run.ts` switch statement
67+
68+
## PR Checklist
69+
70+
- [ ] `pnpm build` passes
71+
- [ ] `pnpm test` passes
72+
- [ ] `pnpm typecheck` passes
73+
- [ ] Conventional Commit message format used (`feat:`, `fix:`, `feat!:` for breaking)
74+
- [ ] New commands include JSON mode support and tests

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
},
2727
"files": [
2828
"dist",
29-
".claude-plugin",
30-
"skills",
3129
"package.json",
3230
"README.md"
3331
],
@@ -43,6 +41,7 @@
4341
"@clack/prompts": "1.0.1",
4442
"@napi-rs/keyring": "^1.2.0",
4543
"@workos-inc/node": "^8.7.0",
44+
"@workos/skills": "0.2.2",
4645
"chalk": "^5.6.2",
4746
"diff": "^8.0.3",
4847
"fast-glob": "^3.3.3",

pnpm-lock.yaml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

skills/workos-authkit-base/SKILL.md

Lines changed: 0 additions & 123 deletions
This file was deleted.

0 commit comments

Comments
 (0)