refactor: backend api skill#18
Draft
nicolas-angelo wants to merge 5 commits into
Draft
Conversation
nicolas-angelo
marked this pull request as draft
March 12, 2026 16:55
Railly
removed their request for review
April 1, 2026 16:02
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
Refactors the
clerk-backend-apiskill from a monolithic SKILL.md into a CLI-style command system with three self-contained agents:docs,request, andtypes.Changes
Architecture
agents/: each command is a standalone markdown file (docs.md,request.md,types.md)references/api-specs.md): spec resolution, filesystem caching, output directory rules, and scope enforcement — consumed by all agentsscripts/openapi/for claritydocs— Browse and inspect API endpointsBrowse the OpenAPI spec without executing requests. Modes: list tags, browse tag endpoints, or inspect a specific endpoint schema.
/clerk-backend-api docs — list all API tags
/clerk-backend-api docs Users — browse endpoints for a tag
/clerk-backend-api docs GET /users — inspect endpoint schema
/clerk-backend-api docs GET /users -v 2025-11-10 — inspect using a specific spec version
request— Execute API requestsResolve an endpoint from the spec, prompt for required parameters, enforce scope rules on write operations, and execute.
/clerk-backend-api request GET /users — fetch all users
/clerk-backend-api request POST /invitations — create an invitation (prompts for params)
/clerk-backend-api request DELETE /users/user_123 — delete with scope check
types— Generate TypeScript types from dashboard dataFetches live data from the Clerk API (
/organization_roles,/organization_permissions,/role_sets,/billing/plans) and generates TypeScript types using bundled templates./clerk-backend-api types sync — generate all types
/clerk-backend-api types sync roles permissions — filter by category
/clerk-backend-api types sync --dry-run — preview without writing
/clerk-backend-api types sync plans --overwrite — skip confirmation
Categories:
roles,permissions,plansOutput:
<project_root>/.clerk/types/types.tsandconstants.tsSpec caching
assets/api-spec.yml(no network)-v 2025-01-01: checks<project_root>/.clerk/.cache/openapi/<version>.yml, fetches + caches if missing--no-cache: force-fetches latest from GitHub, updates bundled specGlobal options
-o, --out [dir]— output directory (default:<project_root>/.clerk/)-v, --version [date]— use a specific spec version--no-cache— bypass cache, fetch fresh from GitHubDocs
Updated README, CLAUDE.md, marketplace.json, and plugin.json with new command structure and directory layout.
Test Commands
Global
/clerk-backend-api→ prints global help with all three commands/clerk-backend-api --help→ samedocs
/clerk-backend-api docs --help→ prints docs help without loading spec/clerk-backend-api docs→ lists API tags from bundled spec/clerk-backend-api docs Users→ lists endpoints for Users tag/clerk-backend-api docs GET /users→ shows endpoint schemarequest
/clerk-backend-api request --help→ prints request help/clerk-backend-api request GET /users→ executes and returns responsetypes
/clerk-backend-api types --help→ prints types help without fetching API data/clerk-backend-api types sync --dry-run→ prints generated types without writing/clerk-backend-api types sync roles permissions→ generates only filtered categories