magpie-setup

magpie-setup is a skill for Claude Code from DuanZGit/D-Hub. It costs 165 tokens per session (2,853 once invoked), scanned A, original, MIT.

A setup skill for Magpie, a local gateway that lets coding agents use models from subscriptions, coding plans, and API keys. It configures providers, accounts, model choices, routing groups, and fallback rules through the Magpie command.

In plain words
What is it for?
Use it to add provider credentials or subscriptions, connect agents to models, and create routing rules based on conditions such as time, request length, images, folders, or context compaction.
Why use it?
It avoids configuring each coding agent and model connection separately. It also helps you inspect the current setup before changing it.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Good fit Use it to add provider credentials or subscriptions, connect agents to models, and create routing rules based on conditions such as time, request length, images, folders, or context compaction.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/duanzgit/d-hub/magpie-setup
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.

Any agent
npx skills add DuanZGit/D-Hub --skill magpie-setup
Clone the repo
git clone --depth 1 https://github.com/DuanZGit/D-Hub

Made for: Claude Code.

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 magpie-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/duanzgit/d-hub/magpie-setup/github.svg)](https://agentmods.dev/skills/duanzgit/d-hub/magpie-setup)
Your own site
<a href="https://agentmods.dev/skills/duanzgit/d-hub/magpie-setup"><img src="https://agentmods.dev/badge/skills/duanzgit/d-hub/magpie-setup/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.

agentmods 80×15 button for magpie-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/duanzgit/d-hub/magpie-setup"><img src="https://agentmods.dev/badge/skills/duanzgit/d-hub/magpie-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,853 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00165 $0.02853
Opus 5.5 $0.00066 $0.01141
Sonnet 5.5 $0.00033 $0.00571
Haiku 4.5 $0.00016 $0.00285

Measured 25d ago against content hash cb815f7058fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

magpie-setup 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 25d 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.

skills/magpie-setup/SKILL.md · 216 lines

How it starts

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

Set magpie up

magpie puts every model the user has (subscriptions, coding plans, API keys) behind one local gateway and points their coding agents at it. Everything its app does has a magpie command. Turn what the user asks for into those commands, run them, and show what changed.

Before anything

  1. Find the command: magpie --version. If it isn't found, the app can put it on the PATH (Settings › About › Command line › Add to PATH), or run the app's own program: /Applications/magpie.app/Contents/MacOS/magpie on a Mac, %LOCALAPPDATA%\magpie\magpie.exe on Windows.

  2. Read what is there before changing it:

    magpie ls            # the agents here, and the model each is on
    magpie providers     # vendors and keys
    magpie accounts      # signed-in subscriptions
    magpie groups        # routing groups
    magpie models        # every model an agent can pick, as provider/model
    
  3. Check the exact form of a command with magpie <command> --help (or magpie help for all of them). -h or --help anywhere only prints help and changes nothing. If a command or option below is refused as unknown, the user's magpie is older: magpie update installs the newest, after asking them.

How to work

  • Do what the user asked and nothing more. Don't change an agent, group or key they didn't mention.
  • Before a change that replaces or removes something (rm, default, group add with a name already in use, provider models <id> <ids…>, which replaces the list), say what will go and ask.
  • Before a larger setup, magpie save before-setup keeps every agent's settings as a profile; magpie use before-setup puts them back.
  • After each change, show the result (magpie group <id>, magpie <agent>, magpie providers) in a line or two, not the whole output.
  • Use the commands, never edit magpie's own files (providers.json, library.json and the rest): the commands check values, lock the files and write the agents' configs to match.
  • An agent reads its model at start. After pointing one at a new model, tell the user to restart it; if it is the agent you are running in, the change takes effect in its next session.
  • An API key goes on the command line as the user gave it. Don't repeat it back, and never write it into a file in a project.

Read the full file on GitHub · 216 lines

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. 25d ago First seen · 216 lines · 165 tokens per session scan A cb815f7058fc

Subscribe to this mod's changes

magpie-setup is a skill published in the GitHub repository DuanZGit/D-Hub (0 stars, last pushed 3d ago), licensed MIT. It adds 165 tokens to every session and 2,853 once invoked, about $0.0007 per session on Opus 5.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-11-06.

Related

magpie-setup compared with skills from other repositories

magpie-setup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
magpie-setupDuanZGit/D-HubSkill03d agoMITA165Claude Code
prompt-enhancerrenky1025/agent-skillsSkill141mo agoMITA289Claude Code, Codex
post-training-strategybojieli/ai-agent-bookSkill61ktodayApache-2.0A159Claude Code, Codex
agent-evolutionbojieli/ai-agent-bookSkill61ktodayApache-2.0A126Claude Code, Codex
omh-model-setuprlaope/oh-my-hermesSkill6.2ktodayMITA76Claude Code, Codex
omh-model-optimizationrlaope/oh-my-hermesSkill6.2ktodayMITA77Claude Code, Codex
model-onboardingrlaope/oh-my-hermesSkill6.2ktodayMITA107Claude Code