# Q Branch

> Installs four MIT-licensed gadgets that make coding agents cheaper and more reliable, using hooks instead of longer prompts.

Q Branch is a free AI agent skill on Agensi by Eli Gassert, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Eli Gassert](https://www.agensi.io/creators/eli-gassert)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-19
- Security: scan passed (2026-10-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/q-branch
- Tags: hooks, agent-skills, token-costs, mcp

## About this skill

Q Branch is four open-source gadgets for coding agents. This skill installs the ones you choose and explains how to drive them. Everything is MIT-licensed and public: https://github.com/grexican/qbranch

They share one idea: **guarantee steps with hooks instead of longer prompts.** A rule in CLAUDE.md or AGENTS.md costs tokens in every session and still gets skipped. A hook costs nothing until the moment it applies, and then it fires every time.

### The gadgets

- **headjack** — Skills arrive when a task needs them. The library is indexed and searched per prompt instead of preloaded. This matters because large libraries lose their skill *descriptions* from the listing (measured on Claude Code 2.1.285: roughly 8 skills keep a description on Haiku, 105 on Sonnet), so a plain-language request can no longer be matched to a skill the agent technically has.
- **middleout** — One plan over your MCP servers: chained calls, one-to-many fan-out, automatic pagination, and only the fields you select come back.
- **moneyball** — Measures every subagent run from the transcripts (model, cost, and whether it actually worked), then graduates a kind of task to a cheaper model once the evidence supports it. It judges cost per *completed* task, so a cheap model that needs retries is not counted as cheap.
- **groundhog** — Mines transcripts for the lessons agents keep re-learning, keeps accepted ones in a committed ledger, and enforces them with a hook that blocks the known-bad command once, with the fix.

### Honest limits

- **groundhog** needs session history to mine. A fresh machine has nothing to learn from yet.
- **moneyball** needs at least 10 runs of a task class before recommending anything, and its automatic model routing applies to Claude models; for other vendors it reports advice.
- **headjack** helps most with a large library. With a handful of skills, your agent's built-in preloading is fine, and the honest answer is to keep using it.
- **middleout** earns its place on per-item fan-out over chatty APIs. For a one-off call, a raw tool call is simpler. A plan runs under a single approval, so a fan-out of 100 items makes 100 calls; it is exactly as safe as the tools the plan names.

### Requirements

Node 22.13+, or the native binary (Windows, macOS, Linux). Works with Claude Code, Cursor, Codex, Gemini CLI, Copilot and Windsurf. Where an agent cannot do something, that feature turns off rather than half-working, and each gadget's README lists exactly what works where.

## Requires

- Node.js 22.13+ or native binary
- Q Branch
- Git

Native binaries cover Windows, macOS and Linux. The skill installs Q Branch from github.com/grexican/qbranch (MIT). Git clones it on agents other than Claude Code.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Q Branch skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What does Q Branch do?

Installs four MIT-licensed gadgets that make coding agents cheaper and more reliable, using hooks instead of longer prompts.

### Which AI agents support Q Branch?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use Q Branch?

Connect your AI agent to Agensi through MCP, then ask it to use Q Branch on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
