client-generators
Skill by Redocly
Teaches an assistant to write or change a Redocly client generator, a plain module that turns the API model into client code files. It covers the model, helper functions, and the edit, regenerate, and diff loop. Aimed at developers building custom generators for Redocly CLI.
Install client-generators
Built from the published package, never by AI.
git clone --depth 1 https://github.com/Redocly/redocly-cli /tmp/redocly-cli && mkdir -p ~/.claude/skills && cp -r /tmp/redocly-cli/packages/client-generator/eject-assets/skills/client-generators ~/.claude/skills/client-generatorsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/Redocly/redocly-cli /tmp/redocly-cli && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/redocly-cli/packages/client-generator/eject-assets/skills/client-generators ~/.gemini/antigravity-cli/skills/client-generatorsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill explains how to write custom client generators for Redocly. A generator is a plain module that receives the language-agnostic API model and returns files in any output language. It runs in the same pass as the built-in generators and is selected by path in redocly.yaml.
The skill covers the generator contract, optional option schemas, the structure of the model, and the helper toolkit exported from @redocly/client-generator. It also describes the working loop: edit the generator, run redocly generate-client, then inspect the git diff of the output. It is intended for developers who need a custom client generator or need to change one.
Written from the project's SKILL.md and checked against it.
What it can do
- Generator contractExplains the run function and the optional sample and docs hooks.
- Option schemasShows how a generator declares settings that are validated before run is called.
- API model referenceDescribes operations, named schemas, and the discriminated schema kinds.
- Helper toolkitLists helpers such as flattenAllOf, deref, paginationRuleFor, and identifierFor.
- Regeneration loopCovers editing the generator, running redocly generate-client, and reviewing the git diff.
- Version rangeShows how a generator can declare the client-generator version range it was written for.
What you need
- Redocly CLI with the generate-client command
- @redocly/client-generator package
- Git, for reviewing generated output
Try asking
- Write a custom client generator that groups operations by path.
- Add a groupBy option to my Redocly client generator.
- Show me which helpers exist for handling allOf schemas in a generator.
Good to know
- Generated files must never be hand-edited; change the generator instead.
- Emitted file paths must stay inside the --output directory.
- Top-level options support only scalars, enums, and arrays of scalars.
- There is no AST toolkit or typescript dependency; code is printed as text.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: packages/client-generator/eject-assets/skills/client-generators/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to client-generators
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
client-generators: common questions
What is a Redocly client generator?
It is a plain module of the form (input) => GeneratedFile[] that receives the API model and returns files in any output language. It is selected by path in redocly.yaml.
How do I regenerate a client after changing a generator?
Run redocly generate-client, then inspect the git diff of the generated output. Repeat until the result is correct.
What should I do if a helper I need is missing?
The source suggests telling the user and filing an issue at https://github.com/Redocly/redocly-cli/issues, including the generator snippet and the expected helper.
How do I install client-generators?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is client-generators free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is client-generators safe to use?
It scores 82 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 client-generators?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
