Docs · Library

Library

magpie’s Library keeps instructions, MCP servers, skills, hooks and subagents in one place, and writes each of them into every agent you tick for it, in that agent’s own files and format. The agents read those files as they always do. magpie adds no layer between an agent and what it is given: the agent itself decides when to use a skill, an MCP tool or a subagent.

The page has six tabs: Instructions, MCP servers, Skills, Hooks, Subagents and RTK. Each item has a row of agents; tick an agent to give it the item, untick it to take it away. An agent reads the change when it starts again.

Where it is kept

Terminal
magpie library          # what the library gives each agent
magpie library sync     # write it into the agents again

Instructions

Instructions are text every session of an agent starts with, such as house rules or a coding style. magpie writes its part between two marker lines in the agent’s instructions file:

CLAUDE.md, AGENTS.md…
<!-- magpie:begin · written by magpie from its Library -->
…the Library's instructions…
<!-- magpie:end -->

Everything outside the markers is yours and is never changed. You can keep several named sets and give each set to different agents, and a set can live in a file of your own.

AgentFile
Claude Code~/.claude/CLAUDE.md
Codex~/.codex/AGENTS.md (or AGENTS.override.md when you use one)
Gemini CLI~/.gemini/GEMINI.md
Antigravity~/.gemini/config/GEMINI.md
OpenCodeAGENTS.md in its config folder
Copilot CLI~/.copilot/copilot-instructions.md
Goose, Crush, Qwen Code, CodeBuddy.goosehints, CRUSH.md, QWEN.md, CODEBUDDY.md
Droid, Grok, dsh, ompAGENTS.md in the agent’s own folder
Pi, OmOthe first one there of AGENTS.md and CLAUDE.md

Folders follow the agent’s own setting: a custom CLAUDE_CONFIG_DIR or CODEX_HOME is used in place of the default.

MCP servers

An MCP server is either a command (a program the agent starts, such as npx …) or a URL (HTTP or SSE). magpie writes one entry per server into each ticked agent’s MCP config, in that agent’s format, and keeps any fields you added to the entry yourself.

AgentFile
Claude Code~/.claude.json
Codex~/.codex/config.toml
Gemini CLI~/.gemini/settings.json
Antigravity~/.gemini/config/mcp_config.json
OpenCodeopencode.json
Cursor~/.cursor/mcp.json
Copilot CLI~/.copilot/mcp-config.json
Zedcontext_servers in its settings.json

With the MCP router on, each agent gets one server named magpie in place of these entries, and magpie runs each command server once for all of them. It is off by default.

Skills

A skill is a folder with a SKILL.md in it. The agent reads each skill’s name and description and loads the rest when a task needs it. Add one from GitHub, any git repository, a folder on this computer, or the market on the Skills tab.

AgentFolder
Claude Code~/.claude/skills
Codex~/.codex/skills
Gemini CLI~/.gemini/skills
OpenCodeskills in its config folder
Cursor~/.cursor/skills
Copilot CLI~/.copilot/skills
Goose~/.agents/skills

Links or copies

Give skills as sets how a skill reaches an agent, for every agent or, under By agent, for one:

A skill folder of your own with the same name is never written over: the page asks whether to use the library’s or keep yours.

Editing and updates

Subagents

A subagent is a helper the main agent can hand a task to. It has a name, a description and a prompt. magpie writes it as a file in each ticked agent’s subagent folder. The main agent reads every subagent’s description and decides itself when to call one, so the description should say plainly what it is for and when to use it.

AgentFileSkills, MCP servers
Claude Code~/.claude/agents/<name>.mdthe ones you pick
Codex~/.codex/agents/<name>.tomlall the agent has
OpenCodeagents/<name>.md in its config folderall the agent has
Gemini CLI~/.gemini/agents/<name>.mdall the agent has
Qwen Codeagents/<name>.md in its folderall the agent has
Droid~/.factory/droids/<name>.mdMCP servers you pick; all skills
Grokagents/<name>.md in its folderall the agent has
Cursor~/.cursor/agents/<name>.mdall the agent has
Copilot CLI~/.copilot/agents/<name>.agent.mdall the agent has

Subagent models

A subagent’s Model field is written only for Codex. Every other agent runs its subagents on the model it picks itself, and the page says so. Left empty, the field reads Picked by the agent.

For Codex, the model goes into the subagent’s .toml file. Codex lays that file over the spawn, so requests carry that model and magpie’s gateway routes them like any other request. You can pick any model in Codex’s list, a magpie provider/model, or a routing group (group/<id>).

Codex’s subagent model on the Agents page

Codex’s row on the Agents page has a subagent model of its own, for every subagent Codex starts:

The Agents page wins. When that setting is anything but Lead’s pick, the gateway sends every Codex subagent request to it, over a Library subagent’s own model too. The Library editor then says so. Picking a model there also removes default_subagent_model from Codex’s config.

Codex’s own [agents] default_subagent_model in config.toml is a different thing: only the model a subagent starts on when the main agent names none. One exception to all of the above: a task the ChatGPT backend has sealed stays on the model it asked for, unless the setting is a ChatGPT account’s model.

Claude Code has its own order: the model the main agent names in its call, then the subagent file’s model:, then CLAUDE_CODE_SUBAGENT_MODEL (which Claude Code’s row on the Agents page can set), then the session’s model.

Hooks

A hook is a command an agent runs at a point in its turn: a notification when it finishes, a formatter after it edits a file. Pick a portable event (turn end, after a tool, before a tool, on a prompt, at session start) and magpie writes it under each agent’s own name for that event. Only Claude Code, Codex, Gemini CLI, Cursor, Grok Build and Grok App take hooks. A hook entry you change becomes yours.

RTK

The RTK tab turns on RTK per agent: the agent’s shell commands run through RTK, which shortens their output to save tokens. magpie can install RTK for you; turning it off works with RTK gone.

What magpie touches

Projects can get skills and MCP servers too, in the project’s own folders (such as .claude/skills, .agents/skills, .mcp.json or .codex/config.toml).