pp-llamaswap

pp-llamaswap is a skill for Claude Code, Codex from dmmdea/offload-harness. It costs 138 tokens per session (10,904 once invoked), scanned A, original, Apache-2.0.

A command-line control and measurement tool for llama-swap, a service that manages which language models are loaded on a server. It records activity locally so it can be reviewed after a restart.

In plain words
What is it for?
Use it to sync activity into local history, safely drain model-serving slots, protect models by ID or alias, and measure fitting or context limits.
Why use it?
It prevents accidental unloading of protected models and stops drain or measurement commands from giving unsafe answers when the server state is unclear.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/dmmdea/offload-harness/llamaswap
Any agent
npx skills add dmmdea/offload-harness --skill llamaswap
Clone the repo
git clone --depth 1 https://github.com/dmmdea/offload-harness

Made for: Claude Code, Codex.

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 pp-llamaswap

README.md
[![agentmods](https://agentmods.dev/badge/skills/dmmdea/offload-harness/llamaswap.svg)](https://agentmods.dev/skills/dmmdea/offload-harness/llamaswap)
Your own site
<a href="https://agentmods.dev/skills/dmmdea/offload-harness/llamaswap"><img src="https://agentmods.dev/badge/skills/dmmdea/offload-harness/llamaswap.svg" alt="Measured on agentmods" height="20"></a>
Per session 138 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,904 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00138 $0.10904
Opus 5 $0.00069 $0.05452
Sonnet 5 $0.00028 $0.02181
Haiku 4.5 $0.00014 $0.01090

Measured 4d ago against content hash 0720b114ae63, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pp-llamaswap scanned grade A with 1 finding 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 4d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Reach for this CLI whenever a task touches the local llama-swap serving stack: checking what models are loaded or configured, safely freeing VRAM without killing in-flight work or the memory stack, validating or diffing
tools/llamaswap/SKILL.md · 641 lines

How it starts

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

llama-swap — Printing Press CLI

Prerequisites: Install the CLI

This skill drives the llamaswap-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:

  1. Install via the Printing Press installer. It defaults binaries to $HOME/.local/bin on macOS/Linux and %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows:
    npx -y @mvanhorn/printing-press-library install llamaswap --cli-only
    
  2. Verify: llamaswap-pp-cli --version
  3. Ensure the reported install directory is on $PATH for the agent/runtime that will invoke this skill.

If the npx install fails before this CLI has a public-library category, install Node or use the category-specific Go fallback after publish.

If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.

llama-swap forgets everything on restart and ships no CLI at all. This one mirrors activity and events into local SQLite before they vanish (sync), refuses to unload the protected keep-set by id or alias (sourced from config, never from the server's ttl), fails closed rather than guessing when a drain cannot read slot state, prints config diffs and restart commands instead of ever rewriting your hand-commented YAML, and encodes the measurement traps — the seat's real n_ctx over the assumed one, tokenizer counts over chars/4 — into bench, fit, and ctx.

When to Use This CLI

Reach for this CLI whenever a task touches the local llama-swap serving stack: checking what models are loaded or configured, safely freeing VRAM without killing in-flight work or the memory stack, validating or diffing the serving config before a restart, measuring throughput/VRAM/context fit for a seat change, or answering historical questions (swap costs, error rates, keep-set residency) from the local mirror. It replaces raw curl against :11436 and produces typed exit codes and stable JSON for unattended runs.

Read the full file on GitHub · 641 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 641 lines · 138 tokens per session scan A 0720b114ae63

Subscribe to this mod's changes

pp-llamaswap is a skill published in the GitHub repository dmmdea/offload-harness (2 stars, last pushed 5d ago), licensed Apache-2.0. It adds 138 tokens to every session and 10,904 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.