generate-bruno-files
Point this skill at a source file, and it produces Bruno .bru request files for every HTTP call it finds — properly named, sequenced, with shared variables pulled up into the collection.
Install with your preferred package manager.
gh skill install oharu121/skills generate-bruno-filesnpx skills add oharu121/skills/generate-bruno-filespnpm dlx skills add oharu121/skills/generate-bruno-filesWhat it does
Section titled “What it does”Any project that uses Bruno as its API client accumulates a .bruno/ directory of request files. Bootstrapping those files by hand is tedious: you copy the URL from source, reformat headers, name the file something sensible, pick a sequence number, and repeat for every endpoint. This skill reads the source file for you.
It extracts method, URL, headers, query params, and request body from your code. For each unique endpoint it writes a .bru file with a kebab-case name based on the action (list-users.bru, not get-api-v1-users.bru), picks the next sequence number, and uses {{variable}} placeholders for any secrets, tokens, or dynamic IDs rather than hardcoding them.
When a request needs a new variable that’s not already in .bruno/collection.example.bru, the skill proposes it and reminds you to fill the value locally in collection.bru (gitignored).
When to use it
Section titled “When to use it”- You just added an API client to a project and want Bruno files to test it without handwriting each one
- You’re onboarding a teammate and want a ready-made
.bruno/collection they can open and hit “Send” - You refactored a client module and want Bruno files to stay in sync with the new endpoints
How it works
Section titled “How it works”-
Identify API calls. The skill reads the source file you specify, extracting method, URL, headers, query params, and request body for each HTTP request.
-
Check for duplicates. Existing
.brufiles in.bruno/are listed first. Endpoints already covered are skipped; you’re told which. -
Review variables. The skill reads
.bruno/collection.example.bruto see which variables are already defined, and notes any new ones needed. -
Create .bru files. Each unique endpoint becomes a kebab-case-named file (
verb-resource.bru) withmeta, HTTP verb block, optionalauth:bearer, headers, andbody:json— following Bruno’s file format conventions. -
Update collection variables. New variables are added to
collection.example.bruwith empty values. You’re reminded to fill them locally incollection.bru. -
Summary. A table of created files with method, endpoint, and source location.
Example
Section titled “Example”Your codebase has an API client at src/api/orders.ts:
/generate-bruno-files src/api/orders.tsThe skill produces:
| File | Method | Endpoint | Source |
|---|---|---|---|
list-orders.bru | GET | /api/v1/orders | orders.ts:12 |
get-order.bru | GET | /api/v1/orders/{{order_id}} | orders.ts:24 |
create-order.bru | POST | /api/v1/orders | orders.ts:36 |
Plus a note: “Added order_id to collection.example.bru. Fill the value in your local collection.bru.”
Conventions
Section titled “Conventions”- Names — kebab-case action-first (
list-users.bru, notusers-list.bruorGET_users.bru) - Sequence — next available
seqacross the collection - Variables —
{{name}}for tokens, IDs, secrets — never hardcoded - Auth —
auth:bearerblock when bearer tokens are used - Headers — only non-standard headers (not
Content-Type: application/json— Bruno handles that) - Body — realistic example bodies matching the source’s payload shape
Related skills
Section titled “Related skills”Source
Section titled “Source”View SKILL.md on GitHub — extraction rules, .bru file format, collection variable conventions.