api-spec-generator

api-spec-generator is a skill for Claude Code, Codex from oumaimah-QA/QIOS. It costs 110 tokens per session (609 once invoked), scanned A, original, MIT.

A tool that turns an API description into an importable collection for Postman or Bruno. Postman and Bruno are tools for sending API requests and checking their responses.

In plain words
What is it for?
Use it to generate Postman JSON collections, Bruno files, or both, including environment variables, authentication, happy-path requests, negative cases, and test assertions.
Why use it?
It removes the manual work of converting an OpenAPI or endpoint description into requests, authentication settings, variables, and response checks.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/oumaimah-qa/qios/api-spec-generator
Any agent
npx skills add oumaimah-QA/QIOS --skill api-spec-generator
Clone the repo
git clone --depth 1 https://github.com/oumaimah-QA/QIOS

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-spec-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/oumaimah-qa/qios/api-spec-generator.svg)](https://agentmods.dev/skills/oumaimah-qa/qios/api-spec-generator)
Your own site
<a href="https://agentmods.dev/skills/oumaimah-qa/qios/api-spec-generator"><img src="https://agentmods.dev/badge/skills/oumaimah-qa/qios/api-spec-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 609 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00110 $0.00609
Opus 5 $0.00055 $0.00304
Sonnet 5 $0.00022 $0.00122
Haiku 4.5 $0.00011 $0.00061

Measured 5d ago against content hash 4e761f405f65, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

api-spec-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/generate-collection.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/api-spec-generator/SKILL.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Spec Generator

Purpose

Turn any API description into a structured, importable collection for Postman or Bruno — with environment variables, auth, and test assertions pre-configured and ready to use.


Input Accepted

  • Swagger / OpenAPI spec (JSON or YAML)
  • List of endpoints with methods and body descriptions
  • Single endpoint with headers, body, and auth
  • Existing collection to extend or update

Output Options

Ask the user which format:

  • Postman → Collection v2.1 JSON (import via File → Import in Postman)
  • Bruno.bru files + bruno.json manifest
  • Both → generate both formats

Generation Process

Step 1 — Parse all endpoints: method, path, params, body schema, auth type.

Step 2 — Define environment variables:

{{base_url}}      Base API URL
{{token}}         Bearer auth token
{{admin_token}}   Admin-level token (if needed)
{{user_id}}       Dynamic user reference

Step 3 — For each endpoint generate:

  • 1 happy path request (valid data, full headers)
  • 1 negative case (missing required field or no auth)
  • Pre-request script for Bearer auth
  • Test assertions script

Step 4 — Assertions template (per request):

pm.test("Status code correct", () => pm.response.to.have.status(expectedCode));
pm.test("Response time < 2000ms", () => pm.expect(pm.response.responseTime).to.be.below(2000));
pm.test("Content-Type is JSON", () =>
  pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json")
);
pm.test("Response body has expected field", () => {
  const body = pm.response.json();
  pm.expect(body).to.have.property("expected_field");
});

References

  • references/api-standards.md — Naming, organization, and assertion conventions
  • examples/input-swagger.json — Example Swagger input
  • examples/output-postman.json — Example Postman v2.1 output
  • examples/output-bruno/ — Example Bruno collection output
  • scripts/generate-collection.sh — CLI scaffold script

Read the full file on GitHub · 80 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 80 lines · 110 tokens per session scan A 4e761f405f65

Subscribe to this mod's changes

api-spec-generator is a skill published in the GitHub repository oumaimah-QA/QIOS (3 stars, last pushed 1mo ago), licensed MIT. It adds 110 tokens to every session and 609 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.