agentleFS
pahlevikunpahlevikun/levistack/skills/delivery/create-bruno-collection/SKILL.md

create-bruno-collection

Skill0 starsChanged 58 days agoMITView on GitHub

Create or extend a Bruno API collection across protocols: HTTP/REST (JSON, multipart, XML, SSE), GraphQL, gRPC (proto imports, streaming), WebSocket, and SOAP-as-HTTP. Includes bruno.json, Bruno 2.x environment files, JWT chaining via bru.setEnvVar, and per-request docs for success and errors. Scans routes, OpenAPI, GraphQL schema, or proto. Use when asked for Bruno collections, .bru files, gRPC/GraphQL/WebSocket examples, API environments, auth flow in Bruno, or runnable documented API examples for a service.

The file

Files
SKILL.md

Create Bruno collection

Bruno stores collections as plain-text .bru files. Deliver a runnable, documented collection: environments, chained auth, and inline API docs — for every protocol the service exposes.

Shared references: collection-layout.md, environments-and-auth.md, request-documentation.md, scripts-and-env-by-protocol.md, bruno-documentation.md.

Step 0: pick protocol first

If the surface is…meta.typeLoad
REST, OpenAPI, webhooks, file upload, SSEhttpprotocols/rest-http.md
GraphQL gateway or schemagraphqlprotocols/graphql.md
gRPC / protobuf servicesgrpcprotocols/grpc.md
WebSocket APIswsprotocols/websocket.md
SOAP or WSDLhttp + XMLprotocols/soap-and-sse.md

Mixed services: one collection, shared environments/, HTTP auth/login when tokens are JWT, then protocol-specific folders (see collection-layout.md). Index: protocols/README.md.

Prerequisites

  • HTTP — route definitions or OpenAPI.
  • GraphQL — schema, exported operations, or gateway config.
  • gRPC — .proto files and/or reflection; optional buf layout.
  • WebSocket — URL, message contract, auth headers.
  • Optional: Bruno desktop client to run interactive streams and WebSockets.

Workflow

  1. Discover — list operations per protocol (paths, RPCs, queries/mutations, WS actions). Note auth scheme and error shapes.
  2. Scaffold — bruno.json, environments/, protocol folders, one .bru per operation. collection-layout.md.
  3. Environments — baseUrl, graphqlUrl, grpcHost, wsUrl, credentials, empty token slots, vars:secret. environments-and-auth.md.
  4. Auth chain — HTTP login or token request in auth/ (seq 1); script:post-response with bru.setEnvVar; downstream requests use {{accessToken}} (HTTP bearer, GraphQL, gRPC metadata, WS headers). environments-and-auth.md, scripts-and-env-by-protocol.md.
  5. Implement requests — follow the protocol reference for meta.type, body blocks, and streaming rules.
  6. Document each request — docs { } with success and errors (HTTP status, GraphQL errors, gRPC status codes). request-documentation.md.
  7. Keep in sync — API changes update the matching .bru in the same commit.

Output checklist

  • bruno.json with collection name and type: collection
  • Environment file(s) with URLs/hosts and auth-related vars for each protocol in use
  • auth/ login or token request with post-response bru.setEnvVar when JWT or API keys are chained
  • Each protocol: correct meta.type and driver block (get/post, grpc, ws, body:graphql)
  • gRPC: proto path or collection proto settings documented for operators
  • Every non-trivial request has a docs block (success + errors)
  • No real secrets, production hostnames, or employer-only URLs in committed files

Bruno version caveats

  • Bru tag reference documents http and graphql tags; grpc and ws types are supported in the app (see Bruno tests/grpc and tests/websockets fixtures and bruno-documentation.md).
  • gRPC scripting is beta (interactive app; limited runner/CLI).
  • SSE and long-lived WebSocket/gRPC streams may be skipped or manual in collection runner — document operator steps in docs.
  • OpenCollection YAML is Bruno’s recommended format for some new work; this skill targets .bru unless the user asks for YAML migration.

Out of scope

Bruno desktop feature parity, cloud sync, and generating a collection from live traffic capture.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.