⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

slop

eklipse2k8@eklipse2k8⭐ 29 stars· last commit 1mo ago· 20 open issues

This skill should be used when the user asks to "remove slop", "deslop", "clean up slop", "clean up the diff", "strip AI slop from this change", or runs /slop after a change, to remove noise from changed oas3-gen Rust code while preserving behavior. Accepts an optional path, commit, or revision range to clean instead of the uncommitted changes.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐ 29 on GitHubGitHub ↗

Growing

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

(OAS3-GEN) OpenAPI 3.1+ Rust Generator

//     ██████╗  █████╗ ███████╗██████╗        ██████╗ ███████╗███╗   ██╗
//    ██╔═══██╗██╔══██╗██╔════╝╚════██╗      ██╔════╝ ██╔════╝████╗  ██║
//    ██║   ██║███████║███████╗ █████╔╝█████╗██║  ███╗█████╗  ██╔██╗ ██║
//    ██║   ██║██╔══██║╚════██║ ╚═══██╗╚════╝██║   ██║██╔══╝  ██║╚██╗██║
//    ╚██████╔╝██║  ██║███████║██████╔╝      ╚██████╔╝███████╗██║ ╚████║
//     ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝        ╚═════╝ ╚══════╝╚═╝  ╚═══╝

crates.io dependency status MIT licensed openapi

Generate Rust types, a reqwest HTTP client, or an axum server trait and router from an OpenAPI 3.1 document. The generator accepts JSON and YAML input.

Quick Start

You'll need Rust 1.89 or later. Install the generator:

cargo install oas3-gen

Alternative build with Nix

  • Make sure you have nix installed or install it with:
    sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon
    
  • Now simply run it with:
    • nix run github:eklipse2k8/oas3-gen will run the binary, fetching the git repo automatically.
    • Or locally in the repo with nix run
    • To globally install use nix profile install

Generate a client crate from your API document:

oas3-gen generate client-mod -i api.json -o my-api --workspace
cargo check --manifest-path my-api/Cargo.toml

Replace api.json with the path to your document. To try the repository's example, use fixtures/petstore.json. The output contains a Cargo.toml with the required dependencies and a src/ directory with the client and its types.

To generate a server crate, use server-mod:

oas3-gen generate server-mod -i api.json -o my-server --workspace

You'll implement the generated trait to handle requests. If you only need data types, generate a single file:

oas3-gen generate types -i api.json -o types.rs

Generated Client

The petstore client includes this method for its health endpoint. This excerpt omits imports and the other methods:

impl PetstoreClient {
    pub async fn get_health(
        &self,
        request: GetHealthRequest,
    ) -> anyhow::Result<ApiResponse<(), ()>> {
        request.validate().context("parameter validation")?;
        let mut url = self.base_url.clone();
        url.path_segments_mut()
            .map_err(|()| anyhow::anyhow!("URL cannot be a base"))?
            .push("health");
        let response = self.client.get(url).send().await?;
        GetHealthRequest::parse_response(response).await
    }
}

The method sends the request through reqwest::Client and passes the response to the generated decoder.

Generated Server

Server output declares a trait method for the same operation. This excerpt omits the other operations:

pub trait ApiServer: Send + Sync {
    fn get_health(
        &self,
        request: GetHealthRequest,
    ) -> impl std::future::Future<Output = anyhow::Result<ApiResponse<(), ()>>> + Send;
}

Implement ApiServer, then pass your service to the generated router() function. It returns an axum::Router that extracts requests, calls your methods, and writes HTTP responses.

Features

FeatureGenerated behavior
TypesStructs, enums, type aliases, and unions with Serde serialization where needed
HTTP clientsAsync methods for API operations, with typed requests and responses
Axum serversA service trait, request extractors, handlers, and routes
Body formatsJSON, text, and binary data, plus form and multipart requests
AuthenticationAPI keys in headers, query parameters, and cookies, plus bearer tokens
Event streamsServer-Sent Events on both clients and servers
ValidationChecks for supported schema constraints, including lengths, ranges, patterns, and multipleOf
BuildersOptional bon builders for schema values and requests
Generation optionsOperation filtering, name overrides, visibility, enum handling, and type adapters

Learn More

Read the book for client and server walkthroughs, generation options, schema mappings, and known limitations. Run oas3-gen generate --help for command-line usage.

Contributing

See CONTRIBUTING.md for contribution requirements and the pull request process. Report bugs or suggest changes in GitHub issues.

License

Licensed under the MIT license.

Copyright (c) 2026 Individual contributors

See [OpenAPI v3.1.2]: https://spec.openapis.org/oas/v3.1.2

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • .claude/skills/slop/SKILL.md5.0 KBupstream ↗
    ---
    name: slop
    description: This skill should be used when the user asks to "remove slop", "deslop", "clean up slop", "clean up the diff", "strip AI slop from this change", or runs /slop after a change, to remove noise from changed oas3-gen Rust code while preserving behavior. Accepts an optional path, commit, or revision range to clean instead of the uncommitted changes.
    argument-hint: "[path | commit | range]"
    ---
    
    # Get Rid of Slop
    
    Edit the changed Rust code to remove slop: code and comments that a careful
    maintainer of the file would not have written. Preserve behavior.
    
    ## Find the Changes
    
    1. If arguments name a commit or revision range, clean that change:
       `git show <commit>` or `git diff <range>`. If they name a path, clean its
       uncommitted diff (`git diff HEAD -- <path>`), or the whole file when it has
       none.
    2. Otherwise, if `git diff HEAD` touches Rust files, clean the uncommitted work.
    3. Otherwise clean the branch: `git diff main...HEAD`.
    
    Edit the code as it stands at HEAD, and only where the change introduced or
    modified it. Skip files the change touched that no longer exist, and skip the
    generated crates under `fixtures/`, which regeneration rewrites. Read the code
    around each change; the untouched code in the file sets the baseline for what
    is normal there.
    
    When the change touches `crates/oas3-gen/src/`, snapshot the generated output
    before the first edit:
    
    ```bash
    .claude/skills/slop/scripts/snapshot.sh /tmp/slop-before
    ```
    
    ## Slop to Remove
    
    ### Comments
    
    - Inline comments (`//`) in changed code. The project allows none. Rename the
      function or its variables so the code says what the comment said, then delete
      the comment.
    - Rustdoc that restates an item's name or signature. Rename instead. Rustdoc
      that records a decision or behavior the code can't state stays.
    - Comments a human wouldn't add, or that are inconsistent with the rest of the
      file.
    
    `pub` and `pub(crate)` items in `crates/oas3-gen` are not public API. They are
    visible only so the external `tests/` package can reach generator internals.
    Don't add rustdoc to them or preserve their signatures for that reason alone.
    `oas3-gen-support` is the public runtime API that generated code depends on,
    and its rustdoc stays.
    
    ### Structure
    
    - A free function added on its own in a file: consider moving it into the
      `impl` block of the type it serves.
    - A function with one caller: consider whether it needs to exist, or whether
      its body reads better at the call site. Callers in `tests/` count.
    - Wrappers, indirection, traits, or helper functions without clear value.
    - One shape repeated several times in the change: consider a `macro_rules!`
      that states the shape once, applied at each site. A macro with a single use
      is itself slop.
    
    ### Rust 2024 Idiom
    
    The workspace uses edition 2024 with MSRV 1.89.
    
    - Prefer functional, idempotent, side-effect-free code: iterator chains over
      `mut` accumulators and push loops, without nesting an iterator or allocating
      inside a per-element closure. Free functions stay pure; mutable state lives
      behind `&mut self`.
    - Flatten nested `if let` into let chains (`if let Some(x) = a && let Ok(y) =
      b`), and use `let-else` for early returns.
    - Remove `.clone()` calls where a borrow compiles.
    
    ### Defensive Code
    
    - Checks or error handling abnormal for that area of the codebase, especially
      on trusted or already-validated paths: `match`, `if let`, `.ok()`, or
      `.unwrap_or_default()` that swallows a case that can't occur, re-validation of
      data the parser already checked, and `Result` returns from functions that
      can't fail. Validation belongs at boundaries only: CLI input and the parsed
      spec. A `match` arm that exhaustiveness requires stays.
    
    ### Anything Else
    
    - Any other style inconsistent with the file or the project conventions.
    
    ## Guidelines
    
    - Keep the change minimal: touch only what removing slop requires.
    - Don't rewrite or reformat code unless the cleanup requires it.
    - Prefer deleting code over adding abstractions.
    - When intent is unclear, infer it from the surrounding code and keep behavior
      the same.
    
    ## Verify
    
    1. When `/tmp/slop-before` was taken at the start, snapshot again and compare:
    
       ```bash
       .claude/skills/slop/scripts/snapshot.sh /tmp/slop-after
       diff -r /tmp/slop-before /tmp/slop-after
       ```
    
       Cleanup of generator logic leaves the output identical, so a difference
       there means an edit changed behavior; revert it. Cleanup of emitted code,
       the `quote!` templates in `codegen/`, changes the output on purpose. Confirm
       every difference comes from those edits, then rebuild the fixtures:
    
       ```bash
       .claude/skills/testing/scripts/build-fixtures.sh
       ```
    
       Delete `/tmp/slop-before` and `/tmp/slop-after` afterward.
    
    2. Run the project checks. The snapshot covers only `fixtures/petstore.json`;
       `cargo test` covers the rest. `--no-fail-fast` keeps a failing test binary
       from hiding the ones after it.
    
       ```bash
       cargo +nightly fmt --all
       cargo clippy --all -- -W clippy::pedantic
       cargo test --no-fail-fast
       ```
    
    Finish with one line per file listing what was removed. Quote any failing
    command output.
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/eklipse2k8-oas3-gen-claude-skills-slop.md

// REPO STATS

29 stars
20 open issues
Last commit: 1mo ago