Files
Nick Nisi 39269e0698 feat: add workos-widgets skill with on-demand OpenAPI spec querying (#4)
* Add claude skill to create WorkOS widgets

* Add guidelines about styling existing ui components and where to implement the widget

* Optimize some skills

* Add list of endpoints to fetching api docs

* fix: resolve widget skill conflicts and route to hand-crafted skill

- Delete hallucinated generated widget files (fabricated workos.widgets.mount() API)
- Route widget requests via Skill tool instead of generated references
- Add workos-widgets to HAND_CRAFTED_SKILLS, skip widgets in SECTION_CONFIG
- Move OpenAPI spec from always-loaded to on-demand in SKILL.md
- Add error response documentation to fetching-apis.md
- Add strip-openapi-spec.ts script and strip boilerplate (3375 → 2774 lines)
- Fix paths.spec.ts and splitter.spec.ts for new config

* feat: add on-demand OpenAPI spec query script

Replace always-loaded/stripped spec with a query script that extracts
just the endpoints and resolved schemas for a specific widget.

- Add references/scripts/query-spec.ts (--widget, --path, --list modes)
- Revert spec to original unstripped version
- Update SKILL.md to reference query script instead of raw spec
- Remove strip-openapi-spec.ts (no longer needed)

* feat: add query-spec tests and fix  resolution in arrays

- Add 36 tests for query-spec (resolveRef, resolveSchema, extractEndpoints,
  formatEndpoint, groupPathsByWidget, WIDGET_PREFIXES, integration)
- Fix resolveSchema to recursively resolve $refs inside arrays (oneOf, anyOf)
- Revert OpenAPI spec to original unstripped version
- Remove strip-openapi-spec.ts

* feat: bundle query-spec as self-contained .cjs for portability

- Add esbuild to bundle query-spec.ts → query-spec.cjs (includes yaml dep)
- Update SKILL.md to use 'node references/scripts/query-spec.cjs' (no tsx needed)
- Add build:query-spec script to package.json
- Fix __dirname resolution to support both ESM and CJS contexts

* chore: add .oxlintrc and ignore built file in it and oxfmt

* fix: point fetching-apis.md references to query script, remove redundant SKILL.md mention

* chore: remove unused strip-openapi-spec.ts

Superseded by the on-demand query-spec approach.

* fix: address final review findings

- token-strategies.md: point elevated access to fetching-apis.md markers
  instead of raw spec, use explicit verify endpoint path
- fetching-apis.md: update objective line, hardcode base URL fallback
  to https://api.workos.com instead of referencing spec
- query-spec.ts: add SKILL.md slug aliases (user-management,
  user-profile, admin-portal-sso-connection, admin-portal-domain-verification)
- query-spec.ts: update source comments to reference .cjs bundle
- Rebuild query-spec.cjs

---------

Co-authored-by: Lucas Motta <mail@lucasmotta.com>
2026-03-06 14:07:46 -06:00

11 lines
297 B
JSON

{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 120,
"sortPackageJson": false,
"ignorePatterns": ["dist/", "node_modules/", "pnpm-lock.yaml", "CHANGELOG.md", "query-spec.cjs"]
}