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.
npx skills add patricio0312rev/skillset --skill insomnia-collection-generatorgit clone --depth 1 https://github.com/patricio0312rev/skillsetWrote 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.
[](https://agentmods.dev/skills/patricio0312rev/skillset/insomnia-collection-generator)<a href="https://agentmods.dev/skills/patricio0312rev/skillset/insomnia-collection-generator"><img src="https://agentmods.dev/badge/skills/patricio0312rev/skillset/insomnia-collection-generator/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/patricio0312rev/skillset/insomnia-collection-generator"><img src="https://agentmods.dev/badge/skills/patricio0312rev/skillset/insomnia-collection-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00065 | $0.03194 |
| Opus 5.5 | $0.00026 | $0.01278 |
| Sonnet 5.5 | $0.00013 | $0.00639 |
| Haiku 4.5 | $0.00006 | $0.00319 |
Grade A, and why
insomnia-collection-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 2mo ago.
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.
This is a copy
100% identical to insomnia-collection-generator — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 513 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Insomnia Collection Generator
Generate importable Insomnia workspaces from your API codebase automatically.
Core Workflow
- Scan routes: Find all API route definitions
- Extract metadata: Methods, paths, params, bodies
- Create workspace: Organize into request groups
- Configure environments: Base URLs, auth tokens
- Add authentication: Bearer, Basic, API Key
- Export collection: Insomnia v4 JSON format
Insomnia Export v4 Schema
{
"_type": "export",
"__export_format": 4,
"__export_date": "2024-01-15T10:30:00.000Z",
"__export_source": "insomnia.desktop.app:v2023.5.8",
"resources": []
}
Resource Types
interface InsomniaWorkspace {
_id: string;
_type: "workspace";
name: string;
description: string;
scope: "collection" | "design";
}
interface InsomniaRequestGroup {
_id: string;
_type: "request_group";
name: string;
parentId: string;
description?: string;
}
interface InsomniaRequest {
_id: string;
_type: "request";
name: string;
parentId: string;
method: string;
url: string;
body: InsomniaBody;
headers: InsomniaHeader[];
parameters: InsomniaParameter[];
authentication: InsomniaAuth;
}
interface InsomniaEnvironment {
_id: string;
_type: "environment";
name: string;
parentId: string;
data: Record<string, string>;
}
Collection Generator
// scripts/generate-insomnia.ts
import { v4 as uuidv4 } from "uuid";
interface RouteInfo {
method: string;
path: string;
name: string;
body?: object;
params?: { name: string; type: "path" | "query" }[];
}
interface InsomniaExport {
_type: "export";
__export_format: 4;
__export_date: string;
__export_source: string;
resources: InsomniaResource[];
}
type InsomniaResource =
| InsomniaWorkspace
| InsomniaRequestGroup
| InsomniaRequest
| InsomniaEnvironment;
function generateInsomniaCollection(
routes: RouteInfo[],
options: {
name: string;
baseUrl: string;
description?: string;
}
): InsomniaExport {
const workspaceId = `wrk_${uuidv4().replace(/-/g, "")}`;
const baseEnvId = `env_${uuidv4().replace(/-/g, "")}`;
const devEnvId = `env_${uuidv4().replace(/-/g, "")}`;
const resources: InsomniaResource[] = [];
// Create workspace
resources.push({
_id: workspaceId,
_type: "workspace",
name: options.name,
description: options.description || "Auto-generated API collection",
scope: "collection",
});
// Create base environment
resources.push({
_id: baseEnvId,
_type: "environment",
name: "Base Environment",
parentId: workspaceId,
data: {},
});
// Create development environment
resources.push({
_id: devEnvId,
_type: "environment",
name: "Development",
parentId: baseEnvId,
data: {
base_url: options.baseUrl,
auth_token: "",
},
});
// Group routes by resource
const groupedRoutes = groupRoutesByResource(routes);
for (const [resource, resourceRoutes] of Object.entries(groupedRoutes)) {
// Create request group (folder)
const groupId = `fld_${uuidv4().replace(/-/g, "")}`;
resources.push({
_id: groupId,
_type: "request_group",
name: capitalize(resource),
parentId: workspaceId,
description: `${resource} endpoints`,
});
// Create requests in group
for (const route of resourceRoutes) {
resources.push(createInsomniaRequest(route, groupId));
}
}
return {
_type: "export",
__export_format: 4,
__export_date: new Date().toISOString(),
__export_source: "api-generator:v1.0.0",
resources,
};
}
function createInsomniaRequest(
route: RouteInfo,
parentId: string
): InsomniaRequest {
const requestId = `req_${uuidv4().replace(/-/g, "")}`;
// Convert :param to {{ _.param }} for Insomnia
const url = route.path.replace(/:(\w+)/g, "{{ _.$1 }}");
const request: InsomniaRequest = {
_id: requestId,
_type: "request",
name: route.name,
parentId,
method: route.method,
url: `{{ _.base_url }}${url}`,
body: {
mimeType: "application/json",
text: route.body ? JSON.stringify(route.body, null, 2) : "",
},
headers: [
{
name: "Content-Type",
value: "application/json",
},
],
parameters: route.params
?.filter((p) => p.type === "query")
.map((p) => ({
name: p.name,
value: "",
disabled: false,
})) || [],
authentication: {
type: "bearer",
token: "{{ _.auth_token }}",
disabled: true,
},
};
return request;
}
function groupRoutesByResource(
routes: RouteInfo[]
): Record<string, RouteInfo[]> {
const groups: Record<string, RouteInfo[]> = {};
for (const route of routes) {
const parts = route.path.split("/").filter(Boolean);
const resource = parts[0] || "root";
if (!groups[resource]) {
groups[resource] = [];
}
groups[resource].push(route);
}
return groups;
}
function capitalize(str: string): string {
return str.charAt(0).toUpperCase() + str.slice(1);
}
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.
- 2mo ago First seen · 513 lines · 65 tokens per session scan A 8b461a73a4bc
insomnia-collection-generator is a skill published in the GitHub repository patricio0312rev/skillset (7 stars, last pushed 10mo ago), licensed MIT. It adds 65 tokens to every session and 3,194 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to insomnia-collection-generator, differing in 0 lines, and is treated as a copy.
insomnia-collection-generator compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| insomnia-collection-generatorpatricio0312rev/skillset | Skill | 7 | 10mo ago | MIT | A | 65 | Claude Code, Codex |
| mem0-oss-to-platformmem0ai/mem0 | Skill | 70k | 4d ago | Apache-2.0 | A | 217 | Claude Code, Codex |
| tao-run-inference-serviceNVIDIA/skills | Skill | 4.2k | today | Apache-2.0 | A | 92 | Claude Code |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 78 | Claude Code |
| fastapi-router-pymicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 46 | Claude Code |
| dev-runtimelangwatch/langwatch | Skill | 5.1k | today | Apache-2.0 | A | 172 | Claude Code |
| api-designericrisco/rsc-harness | Skill | 691 | 6d ago | MIT | A | 105 | Claude Code, Codex |