bruno-collection
Skill2 starsChanged 5 months agoMITView on GitHub
Create, update, and manage Bruno API collections — scaffold new collections, add/modify requests, create sub-folders, manage environments, variables, headers, params, body, pre-request scripts, post-response scripts, tests, assertions, authentication, and documentation. Run and validate collections using the Bruno CLI. Use when a user asks to create a Bruno collection, add folders, add requests, modify .bru files, manage Bruno environments, run API tests, or work with the Bruno CLI.
- Reads credentials
- Installs packages
In this repositoryOne other file it gives its agents.
- project-expertSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 0 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Create and manage Bruno API collections.
- Very specific: line 99
Create root folder + environments/ subfolder
- Very specific: line 100
Create bruno.json with collection name
- Very specific: line 102
Create at least one environment file (e.g., environments/Local.bru)
- Very specific: line 105
Create directory + folder.bru with meta { name: ...
- Very specific: line 108
Create .bru file: meta → method block → body → scripts/tests (as needed).
- Very specific: line 111
Create .bru file in environments/:
- Very specific: line 240
Use {{variables}} — never hardcode URLs/tokens
- Very specific: line 242
Use vars:secret for sensitive values.
- Very specific: line 245
Add docs {} block to complex requests
- Very specific: line 246
Always create at least one environment file (Local.bru)
- Very specific: line 247
Use seq in meta blocks to control execution order
- Very specific: line 248
After creating/modifying a collection, validate with bru run to catch syntax errors
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bruno Collection Manager
Purpose
Create and manage Bruno API collections. Collections are plain folders on disk — every request is a .bru text file, Git-friendly with no proprietary format.
Collection Structure
my-collection/
├── bruno.json # {"version":"1","name":"...","type":"collection"}
├── collection.bru # Collection-level auth/headers/scripts (optional)
├── environments/
│ ├── Local.bru # vars { baseUrl: http://localhost:3000 }
│ ├── Dev.bru
│ └── Prod.bru
├── folder-a/
│ ├── folder.bru # Folder metadata + inherited auth
│ └── Get Resource.bru
└── folder-b/
└── sub-folder/
├── folder.bru
└── Create Item.bruCore Files
bruno.json — {"version":"1","name":"My API","type":"collection","ignore":["node_modules",".git"]}
collection.bru — Shared auth/headers/scripts inherited by all requests:
headers {
Content-Type: application/json
}
auth {
mode: bearer
}
auth:bearer {
token: {{authToken}}
}folder.bru — Folder metadata + inherited settings:
meta {
name: Folder Name
}
auth {
mode: inherit
}Minimal Request File
meta {
name: Get Users
type: http
seq: 1
}
get {
url: {{baseUrl}}/api/users
body: none
auth: inherit
}References (read ONLY what the task requires)
| Need | Reference File |
| HTTP methods, body types, auth modes, headers, params, settings | references/request-format.md |
| Auth modes (bearer, basic, apikey, OAuth2, collection/folder level) | references/authentication.md |
| Pre/post scripts, script objects, external npm libraries, request chaining | references/scripting.md |
| Variables, environments, secrets, dynamic vars | references/variables-and-environments.md |
| Assertions, JavaScript tests, Chai expect | references/tests-and-assertions.md |
| Bruno CLI: run, validate, CI/CD, output formats, flags | references/bruno-cli.md |
Operations
Create Collection
- Create root folder +
environments/subfolder - Create
bruno.jsonwith collection name - Optionally create
collection.brufor shared auth/headers - Create at least one environment file (e.g.,
environments/Local.bru)
Add Sub-Folder
Create directory + folder.bru with meta { name: ... } and auth { mode: inherit }.
Add Request
Create .bru file: meta → method block → body → scripts/tests (as needed).
Add Environment
Create .bru file in environments/:
vars {
baseUrl: http://localhost:3000
apiVersion: v1
}
vars:secret [
token,
apiKey
]Naming Conventions
- Files:
Get All Users.bru,Create Order.bru,Produce Event - ID-123.bru seqin meta for ordering (1-based)~prefix to disable params/headers without deleting
Validate & Run (Bruno CLI)
Prerequisite: Install the Bruno CLI:
npm install -g @usebruno/cliCritical: Allbru runcommands must be executed from the collection root (the folder containingbruno.json).
Run a Single Request
cd /path/to/my-collection
bru run 'SubFolder/Request Name.bru' --env-file environments/Local.bruRun a Folder
bru run SubFolder --env-file environments/Local.bruRun Entire Collection
bru run --env-file environments/Local.bruValidate Collection
Running any bru run command validates the entire collection first. If any .bru file has syntax errors, the CLI reports them and fails before executing. This is the recommended way to check for .bru format errors:
bru run 'any-request.bru' --env-file environments/Local.bruOverride Variables at Runtime
bru run --env-file environments/Local.bru --env-var "baseUrl=http://localhost:8080"CI/CD Output
bru run --env-file environments/CI.bru --format junit --output results.xml --bailFor full CLI reference (flags, output formats, CI/CD examples), read references/bruno-cli.md.
Quick Recipes (no reference needed)
Pre-Request Script — Generate Dynamic Value
script:pre-request {
const timestamp = new Date().toISOString();
bru.setVar("requestTimestamp", timestamp);
req.setHeader("X-Request-ID", "req-" + Date.now());
}Post-Response Script — Store Token for Chaining
script:post-response {
if (res.status === 200) {
bru.setVar("authToken", res.body.access_token);
bru.setVar("userId", res.body.user.id);
}
}Assertions (Declarative)
assert {
res.status: eq 200
res.body.success: eq true
res.body.data.length: gt 0
res.responseTime: lt 2000
}JavaScript Tests
tests {
test("status is 200", function() {
expect(res.status).to.equal(200);
});
test("response has data", function() {
expect(res.body).to.have.property('data');
expect(res.body.data).to.be.an('array');
});
}Authentication Inheritance
Set auth once in collection.bru, then all requests with auth: inherit use it:
# In collection.bru:
auth {
mode: bearer
}
auth:bearer {
token: {{authToken}}
}
# In any request .bru file:
get {
url: {{baseUrl}}/api/resource
body: none
auth: inherit
}Best Practices
- Use
{{variables}}— never hardcode URLs/tokens - Inherit auth from collection/folder level to avoid repetition
- Use
vars:secretfor sensitive values;{{process.env.NAME}}for system env ~prefix to disable (not delete) params/headers- Git-friendly filenames (hyphens and spaces only)
- Add
docs {}block to complex requests - Always create at least one environment file (
Local.bru) - Use
seqin meta blocks to control execution order - After creating/modifying a collection, validate with
bru runto catch syntax errors
External Reference
- Bruno Docs: https://docs.usebruno.com
- Bru Language: https://docs.usebruno.com/bru-language/overview
- Bruno CLI: https://docs.usebruno.com/bru-cli/overview
- Bruno GitHub: https://github.com/usebruno/bruno
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
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.

