/oracle-devops:openapi-rust-genfrom oracle-devops
Generate or refresh a Rust client crate from an OpenAPI spec using the pinned openapi-generator-cli docker image, and wire the same step into a moon task so future regenerations are a one-liner. Keywords: openapi, openapi-generator, openapi-generator-cli, rust client, generate rust client, regenerate openapi rust client, regenerate client from openapi, openapi to rust, openapitools, reqwest client, supportAsync, packageName, hindsight-client, rapyd-client, bridgerpay-client, paypal-client. Triggers: "regenerate the openapi rust client", "generate a rust client from this openapi spec", "scaffold a client crate from <vendor>'s openapi", "openapi-generator-cli rust", "bump the openapi generator", "refresh the openapi snapshot", "moon task to regenerate the <x>-client crate".
Ships in oracle-devops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate a Rust client crate from an OpenAPI spec using openapitools/openapi-generator-cli (pinned to v7.10.0) via Docker. The bundled script handles both the spec refresh and the generator run; the typical consuming repo wires it into a moon.yml task so future regenerations are moon run <crate>:gen-<provider>.
The reference pattern is hermes-platform's hindsight-client setup -- one shared snapshot under docker/<provider>/, one moon task per consumer that calls the generator with that snapshot. This skill ships that pattern as a reusable script.
scripts/openapi-rust-gen.sh is the load-bearing tool. It is a non-interactive, single-pass shell script. Read its header comment for full flag semantics; the contract is:
| Flag | Required | Purpose |
|---|---|---|
--spec <url-or-path> | yes | OpenAPI document. URLs are fetched with curl and atomically written under <workspace>/docker/<provider>/<provider>.<ext>; local paths are used in place. |
--out-dir <dir> | yes | Output directory for the generated crate, relative to the workspace root (for example libs/rapyd-client). |
--crate-name <name> | yes | Cargo packageName for the generated crate. |
--generator-version <tag> | no | Docker image tag. Defaults to v7.10.0 to match hermes-platform. Bumping is deliberate. |
--refresh-only | no | Fetch the spec only, skip the generator. Use this for the spec-refresh moon task when the gen step lives in a separate task. |
--workspace-root <path> | no | Defaults to git rev-parse --show-toplevel. |
Provider name is derived from --crate-name by stripping a trailing _client or -client suffix; that becomes the directory name under docker/.
Generate (or regenerate) a rapyd-client crate from a GitHub raw URL:
plugins/oracle-devops/scripts/openapi-rust-gen.sh \
--spec https://raw.githubusercontent.com/Rapyd/openapi/main/openapi.yaml \
--out-dir libs/rapyd-client \
--crate-name rapyd_client
Generate from an already-committed local snapshot, skipping the fetch:
plugins/oracle-devops/scripts/openapi-rust-gen.sh \
--spec docker/rapyd/rapyd.yaml \
--out-dir libs/rapyd-client \
--crate-name rapyd_client
Refresh only -- pull the latest spec without regenerating (e.g. to review the diff first):
plugins/oracle-devops/scripts/openapi-rust-gen.sh \
--spec https://raw.githubusercontent.com/Rapyd/openapi/main/openapi.yaml \
--out-dir libs/rapyd-client \
--crate-name rapyd_client \
--refresh-only
Once the script is run once and the snapshot is committed, wire a moon task in the consuming crate's moon.yml so future regenerations are one command. Both tasks declare runInCI: false and cache: false -- they are local-only regenerations, the output is committed.
tasks:
# Regenerate the client crate from the committed snapshot. The pinned
# generator version is the source of truth -- bumping it is a
# deliberate, reviewed change.
gen-rapyd:
description: 'Regenerate libs/rapyd-client from the committed OpenAPI snapshot'
command: '../../plugins/oracle-devops/scripts/openapi-rust-gen.sh'
args:
- '--spec'
- 'docker/rapyd/rapyd.yaml'
- '--out-dir'
- 'libs/rapyd-client'
- '--crate-name'
- 'rapyd_client'
inputs:
- '/docker/rapyd/rapyd.yaml'
options:
cache: false
runInCI: false
# Refresh the committed snapshot from upstream. Separated from gen-rapyd
# so the user can review the spec diff before regenerating.
refresh-rapyd-spec:
description: 'Refresh docker/rapyd/rapyd.yaml from upstream'
command: '../../plugins/oracle-devops/scripts/openapi-rust-gen.sh'
args:
- '--spec'
- 'https://raw.githubusercontent.com/Rapyd/openapi/main/openapi.yaml'
- '--out-dir'
- 'libs/rapyd-client'
- '--crate-name'
- 'rapyd_client'
- '--refresh-only'
options:
cache: false
runInCI: false
Adjust the script path to match how the marketplace plugin is installed in the consuming repo (relative path from the moon project, or an absolute path under ~/.claude/plugins/...).
docker missing or daemon not reachable -- exit 2 with a Docker-Desktop hint, before any network call.$workspaceRoot:/local, so anything outside is invisible to the container).Cargo.toml appears in --out-dir -- exit 4. This usually means the spec is malformed and openapi-generator-cli printed a stack trace.runInCI: false, name-drift checks), defer to oracle-devops:ci-moonrepo. The example task block above already follows its Rule 2 (explicit runInCI).docker/<provider>/ directory, two gen-<provider> tasks (Rust via this script, TypeScript via orval), one shared refresh-<provider>-spec task.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub executioner1939/skunkworks-marketplace --plugin oracle-devops7 skills in this plugin
/ci-moonrepomoonrepo (moon) v2 expert -- workspace, tasks, CI/CD, Docker, remote caching, codegen, WASM toolchains, v1-to-v2 migration, plus six guards: affected-detection no-ops, runInCI inheritance traps, project-id / Cargo / Docker name drift, prototools-setup-toolchain churn, remote-cache and sccache flakiness, [[bin]] name collisions.
Keywords: moon, moonrepo, moon.yml, .moon/, moon ci/run/exec/query/migrate, runInCI, MOON_*, .prototools, rust-toolchain.toml, setup-toolchain, setup-rust, mozilla-actions/sccache-action, sccache, RUSTC_WRAPPER, SCCACHE_*, Depot, $project, DOCKER_IMAGE, ArgoCD ImageUpdater, kustomize, [[bin]], CARGO_TARGET_DIR per-service.
Affected-detection: "Resolved targets: 0", "No tasks affected by changed files", "build not started", "shards finish in seconds and nothing gets built or pushed", "task inheritance not granular enough".
runInCI: "missing releases", "turn on fail fast for Moon", "separate moon job for PRs and one for builds", "build-release fires on PR".
Name drift: "build green but prod unchanged", "CI went green but dev env still serving old behaviour", "argocd image updater not picking up new images".
Toolchain: "linker not found", "rustc mismatch", "sccache: command not found".
Cache: "CI hanging", "shard 1 hangs", "builds 8 min now 45+", "cache server unreachable", "oscillating", "we keep flipping this on and off".
Binary collision: "wrong projection_worker", "[[bin]] name already defined", "link error in CI", "duplicate symbol".
/firecrawl-knowledge-baseBuild a knowledge base from web content with Firecrawl. Use for local reference docs, RAG-ready chunks, fine-tuning datasets, documentation mirrors, topic corpora, or LLM-ready markdown organized from web sources./firecrawl-knowledge-ingestIngest public or authenticated knowledge bases and docs portals with Firecrawl browser. Use for JS-heavy docs, login-gated portals, paginated help centers, support knowledge bases, or structured JSON/markdown extraction from documentation sites./firecrawl-qaQA test a live website with Firecrawl browser and scrape evidence. Use when the user wants exploratory QA, form testing, navigation/link checks, responsive checks, performance observations, bug reports, or a pre-launch quality review./firecrawl-website-design-cloneExtract any website's design system into an agent-ready DESIGN.md using Firecrawl scrape evidence. Use when the user wants colors, fonts, spacing, components, layout patterns, or brand/UI guidance from a website so AI agents can create new websites, clone a look, or build pages inspired by that design./terraform-skillUse when writing, reviewing, or debugging Terraform/OpenTofu modules, tests, CI, scans, or state ops - diagnoses failure mode (identity churn, secrets, blast radius, CI drift, state corruption) with version-aware guards.