api-to-bruno

Installation
SKILL.md

API to Bruno

Turn an API source into a classic Bruno .bru collection. The leading word is inventory: build a route inventory first, then generate files from that inventory.

Inputs

Require one API source: a Git URL, an OpenAPI/WSDL URL, or a local path relative to the current working directory. If no source is provided, ask for it.

If the user gives an output path, use it. Otherwise use <api-root>/bruno/<collection-slug> for a local source and <cwd>/bruno/<collection-slug> for a remote source. If that directory already exists and is non-empty, ask before overwriting or merging.

Process

  1. Resolve the source. For a local path, resolve it against the current working directory and verify it exists. For a Git URL, clone a shallow copy into the session temp area and keep generated output outside the clone unless the user asked otherwise. For a direct spec URL, keep it as the source. Completion: exactly one source and one safe output directory are known.

  2. Search for a contract before reading application code. Look for OpenAPI or Swagger files (openapi.*, swagger.*, api-docs.*) and WSDL files in docs, spec, api, public, resources, generated, and root folders. Confirm candidates by reading them for openapi, swagger, or WSDL markers. If several plausible contracts conflict, ask which to use. Completion: choose contract mode with one contract, or source-inventory mode because no contract was found.

  3. In contract mode, read BRUNO.md, then import with Bruno CLI using classic --collection-format=bru. Prefer an already installed bru binary. If bru is missing, do not run npx, install packages, or execute Docker automatically; ask for explicit approval with the exact pinned command, risk note, working directory, and reason it is needed, or generate .bru files manually if approval is denied. Completion: the output contains bruno.json and every contract operation is represented by a request file, or any importer gap is listed explicitly.

  4. In source-inventory mode, inventory every route-defining file before generating. Search framework route cues: Express/Koa/Fastify routers, NestJS decorators, FastAPI/Flask decorators, Django URL patterns and DRF routers, Spring mappings, ASP.NET route attributes and minimal APIs, Laravel routes, Rails routes.rb, Go Gin/Echo/chi/http handlers, and GraphQL schemas or resolvers. Completion: the inventory includes every discovered method, path, source file, handler name, path params, query params, body shape, auth hint, and tags/folder grouping; unknown fields are marked unknown, not omitted.

Installs
3
First Seen
Jul 3, 2026
api-to-bruno — jorgeagoiz/dev-skills