orchardcore-nswag-regenerate
Skill by OrchardCMS
Regenerates the OrchardCore.OpenApi module's NSwag-generated C# and TypeScript API clients and checks that the regenerated diff is stable. Built for OrchardCore contributors who update those client files.
Install orchardcore-nswag-regenerate
Built from the published package, never by AI.
git clone --depth 1 https://github.com/OrchardCMS/OrchardCore /tmp/OrchardCore && mkdir -p ~/.claude/skills && cp -r /tmp/OrchardCore/.agents/skills/orchardcore-nswag-regenerate ~/.claude/skills/orchardcore-nswag-regenerateRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install orchardcore-nswag-regenerate in Claude Code
git clone --depth 1 https://github.com/OrchardCMS/OrchardCore /tmp/OrchardCore && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/OrchardCore/.agents/skills/orchardcore-nswag-regenerate ~/.gemini/antigravity-cli/skills/orchardcore-nswag-regenerateAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install orchardcore-nswag-regenerate in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill regenerates the OrchardCore.OpenApi module's NSwag-generated C# and TypeScript API clients. It writes Services/OpenApiClient.cs and .scripts/bloom/services/OpenApiClient.ts. The preferred route is the tools/OpenApiClientGenerator console project, which boots the CMS in-process, provisions a Default tenant, fetches swagger.json, and runs the nswag CLI. A manual path runs nswag against a live dev server.
It also explains how to check determinism by generating from a scratch swagger.json and diffing the output without touching committed files. It records two past causes of reshuffled diffs: unpinned operation order and a duplicate operationId. It is for OrchardCore contributors who update the OpenApi client files.
Written from the project's SKILL.md and checked against it.
What it can do
- Headless client generationRuns tools/OpenApiClientGenerator to regenerate both clients without a browser or dev server.
- Manual NSwag runRuns nswag against the committed OrchardCore.OpenApi.nswag config on a live local server.
- Offline generationGenerates clients from a scratch swagger.json copy so committed files stay untouched.
- Stability verificationCompares two independent generations to confirm the output is byte-identical apart from base URLs.
- Diff noise diagnosisExplains the two known causes of reshuffled NSwag diffs and how they were fixed.
- Operation ID guidanceAdvises giving each HTTP verb on the same route its own action and endpoint name.
What you need
- dotnet CLI
- NSwag.ConsoleCore dotnet tool
- yarn
Try asking
- Regenerate the NSwag clients for OrchardCore.OpenApi
- Check whether my NSwag regeneration produces a noisy diff
- Generate the OpenApi clients offline from a scratch swagger.json
Good to know
- The manual nswag path needs a live server at the configured url.
- Anonymous schema access is disabled by default, so the recipe enables it.
- The recipe's Settings step replaces stored OpenApiSettings and wipes OAuth configuration on that tenant.
- Throwaway verification tests should be deleted afterward.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/orchardcore-nswag-regenerate/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md8 KB
Alternatives to orchardcore-nswag-regenerate
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
orchardcore-nswag-regenerate: common questions
Why does the generator use the Default tenant?
OrchardCore.Tenants, .Distributed and .FeatureProfiles are marked DefaultTenantOnly, so they can only be enabled on the Default shell. A secondary tenant cannot enable them.
What causes noisy diffs from NSwag regeneration?
Swashbuckle operation order was not pinned, and a duplicate operationId was shared by GET and POST on one route. Both were fixed by sorting actions and splitting the actions with distinct names.
Does this skill add a CI drift check?
No. The source says a CI drift-check gate was scoped out, and the tool only regenerates the clients.
How do I install orchardcore-nswag-regenerate?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is orchardcore-nswag-regenerate free?
The code is published under the BSD-3-Clause licence. The service it connects to may have its own pricing.
Is orchardcore-nswag-regenerate safe to use?
It scores 85 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to orchardcore-nswag-regenerate?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
