{"_id":"@adnanco/postman-collection-skill","name":"@adnanco/postman-collection-skill","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@adnanco/postman-collection-skill","version":"0.0.1","description":"Generate Postman v2.1 collections from Laravel routes, OpenAPI specs, or manual endpoint lists. Usable as an AI skill (Claude Code, Codex, OpenCode) or a standalone CLI.","type":"module","bin":{"postman-gen":"bin/postman-gen.mjs"},"scripts":{"test":"node bin/postman-gen.mjs --smoke-test"},"engines":{"node":">=18"},"keywords":["postman","collection","laravel","openapi","ai-skill","claude-code","codex","opencode","cli"],"author":{"name":"Adnan Gunay"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/adnnco/postman-collection-skill.git"},"bugs":{"url":"https://github.com/adnnco/postman-collection-skill/issues"},"homepage":"https://github.com/adnnco/postman-collection-skill#readme","_id":"@adnanco/postman-collection-skill@0.0.1","gitHead":"21d1ed988abe32a9fc5983b307e3fd28a85410f3","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-rYGhGvp7N3bBvFn+F5gzSYSdeNMzpRTozwbEvmfgx9nKwUW1EP26YF9dN8ZdiabXl5rKH/0GzwGFBR6EDsMl6A==","shasum":"bd63c33f41a0d7381bfcdad54c92eb999bc08c83","tarball":"https://registry.npmjs.org/@adnanco/postman-collection-skill/-/postman-collection-skill-0.0.1.tgz","fileCount":18,"unpackedSize":44238,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGeXHqjky0L2iLXasjuLLgPzKyYRGRnk3rH12FPr7ExNAiEA8eAlLdE1gdYlgFkfgqKOS2qcXroHRew8O6JQkerjrJY="}]},"_npmUser":{"name":"adnanco","email":"adnnco@gmail.com"},"directories":{},"maintainers":[{"name":"adnanco","email":"adnnco@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postman-collection-skill_0.0.1_1778623878270_0.19477603828534718"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-12T22:11:18.178Z","0.0.1":"2026-05-12T22:11:18.430Z","modified":"2026-05-12T22:11:18.644Z"},"maintainers":[{"name":"adnanco","email":"adnnco@gmail.com"}],"description":"Generate Postman v2.1 collections from Laravel routes, OpenAPI specs, or manual endpoint lists. Usable as an AI skill (Claude Code, Codex, OpenCode) or a standalone CLI.","homepage":"https://github.com/adnnco/postman-collection-skill#readme","keywords":["postman","collection","laravel","openapi","ai-skill","claude-code","codex","opencode","cli"],"repository":{"type":"git","url":"git+https://github.com/adnnco/postman-collection-skill.git"},"author":{"name":"Adnan Gunay"},"bugs":{"url":"https://github.com/adnnco/postman-collection-skill/issues"},"license":"MIT","readme":"# postman-collection-skill\n\nGenerate Postman v2.1 collections from Laravel routes, OpenAPI specs, or manual endpoint lists. Usable three ways:\n\n1. **AI skill** — drop into Claude Code, Codex, OpenCode, or any LLM coding agent. The agent uses templates + scripts instead of writing JSON by hand → 10× cheaper in tokens.\n2. **Standalone CLI** — `npx postman-gen ...`. No AI required.\n3. **Library** — call scripts directly from CI / scripts.\n\nTemplates do the skeleton work. Scripts do the bulk work. The LLM only fills slots.\n\n## Install\n\n### As CLI\n\n```bash\nnpm install -g postman-collection-skill\npostman-gen --help\n```\n\nOr one-shot:\n```bash\nnpx postman-collection-skill --help\n```\n\n### As AI skill (Claude Code)\n\n```bash\ngit clone https://github.com/adnnco/postman-collection-skill.git\ncd postman-collection-skill\n./install.sh\n```\n\nThe script symlinks `agents/SKILL.md` + assets into `~/.claude/skills/postman-collection/`. Triggers on \"postman\", \"/postman\", \"convert routes to postman\", etc.\n\n### As AI skill (Codex / OpenCode / Cursor)\n\nCopy the agent file your tool reads, then point it at this repo:\n\n| Tool | File | Action |\n|------|------|--------|\n| Claude Code | `agents/SKILL.md` | `./install.sh` symlinks it |\n| Codex / OpenAI CLI | `agents/AGENTS.md` | Copy into your repo root as `AGENTS.md` |\n| OpenCode | `agents/AGENTS.md` + `agents/opencode.json` | Copy both into repo |\n| Cursor / generic | `agents/CONVENTIONS.md` | Copy into repo root |\n\nEach agent file is short — instructs the LLM to invoke `postman-gen` (or the underlying scripts) instead of hand-writing JSON.\n\n## CLI Usage\n\n### Laravel routes\n```bash\nphp artisan route:list --json > /tmp/routes.json\npostman-gen laravel /tmp/routes.json \\\n  --name=\"My API\" \\\n  --base-url=\"https://api.example.com\" \\\n  --only-prefix=api \\\n  --except-vendor \\\n  --tests \\\n  --out=./postman/api.json\n```\n\nOptional `--bodies` reads FormRequest `rules()` and builds JSON body placeholders matching rule types.\n\n### OpenAPI\n```bash\npostman-gen openapi ./openapi.yaml \\\n  --name=\"My API\" \\\n  --base-url=\"https://api.example.com\" \\\n  --tests \\\n  --out=./postman/api.json\n```\n\nSupports JSON or YAML (minimal subset). Resolves `$ref`, infers body from `requestBody.schema`, detects bearer security.\n\n### Manual\n```bash\n# requests.json: array of { name, method, path, body?, folder?, auth? }\npostman-gen merge ./postman/api.json ./requests.json \\\n  --name=\"My API\" \\\n  --base-url=\"https://api.example.com\" \\\n  --tests\n```\n\n## What gets generated\n\nPostman v2.1 collection with:\n\n- `{{base_url}}` and `{{token}}` collection variables\n- Path params converted to Postman `:id` syntax + `variable` array\n- Folders grouped by controller (Laravel) or tag (OpenAPI)\n- `Accept: application/json` on all requests\n- `Content-Type: application/json` on POST/PUT/PATCH\n- Bearer auth block injected when `auth:sanctum` / `auth:api` / `auth:passport` middleware detected\n- Optional `pm.response.code within 200-299` test per request\n\nSee `examples/minimal.json` for reference output.\n\n## Why this exists\n\nHand-writing Postman JSON in a chat is wasteful — the schema is verbose, the LLM regenerates the same `info` / `_postman_id` / `schema` boilerplate every time. This skill enforces:\n\n- Skeleton lives in `templates/` (LLM never re-writes it)\n- Bulk work lives in `scripts/` (LLM never re-implements it)\n- Manual mode: LLM writes only `{name, method, url, body}` per endpoint — ~30 tokens each\n\nResult: a 50-endpoint collection costs near-zero LLM tokens when the source is route:list or OpenAPI.\n\n## Requirements\n\n- Node.js ≥ 18 (for `openapi`, `merge` subcommands and CLI)\n- PHP ≥ 8.1 (only for `laravel` subcommand)\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-2642febcd13b3dafedc223a4e025f808"}