Skip to content
Back to skills

Route Through Pygg

ASecurity

Set up Claude Code, Codex CLI or OpenCode to send their model requests through Pygg's local gateway, and read what each launch cost. Use when the user asks to route their coding agent through Pygg, use cheaper or local models in Claude Code, or see what a session cost.

  • 12 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 20, 2026
ai-agentsbashgitapi

Works with

  • claude code
  • terminal
  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned November 20, 2026

npx -y skills add nambean/Pygg --skill route-through-pygg --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Route Through Pygg?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Route Through Pygg
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nambean-route-through-pygg/badge)](https://www.skillsdirectory.com/skills/nambean-route-through-pygg)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: route-through-pygg
description: Set up Claude Code, Codex CLI or OpenCode to send their model requests through Pygg's local gateway, and read what each launch cost. Use when the user asks to route their coding agent through Pygg, use cheaper or local models in Claude Code, or see what a session cost.
---

# Route a coding agent through Pygg

Pygg is a local gateway on `127.0.0.1:8741`. It sends each request to a model the user connected (API keys, coding plans, a local Ollama), falls back when one fails, and records what every request cost. These steps are the user's to run in their own terminal: they start new sessions of the agent, so do not run them from inside this one.

## Check that Pygg is there

```bash
pygg doctor        # finds the store and the running gateway
pygg providers     # the connections, and whether they answer
```

No `pygg` command: `npm install -g @pygg/cli@dev`. On Windows, the Pygg app (from the project's GitHub releases) is the gateway; on macOS and Linux, `pygg gateway serve` runs it in a terminal.

## Claude Code

The user keeps their Claude sign-in; Pygg starts Claude Code through the gateway one launch at a time and changes no file.

```bash
pygg setup claude                 # a Pygg key of its own, kept in the credential store
pygg run claude                   # this launch through Pygg, model auto; a receipt when it exits
pygg run --statusline claude      # the same, with the launch's cost in the status line
```

## Codex CLI and OpenCode

```bash
pygg setup codex     # adds a `pygg` provider and profile, after a backup
pygg run codex       # or: codex --profile pygg -m auto/cheap
pygg setup opencode  # a Pygg provider with the auto aliases and the enabled models
pygg run opencode
```

## See what it cost

```bash
pygg launches --by-repo   # each launch's receipt, by repository
pygg usage                # requests, tokens and cost
```

Models: `auto` picks by the request; `auto/cheap` prefers the cheapest model that fits. A subscription or web-session model has no per-request price, so its cost shows as unknown, not $0.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.