# Protocol to Skill
<!--
ref: @protocol/protocol-to-skill
type: protocol
tags: [conversion, skills, protocols, install, claude-code, agent-skills, one-liner]
aliases: [install-as-skill, install as skill]
triggers: [install this as a skill, install this protocol as a skill, protocol to skill, make this a skill, add this to my skills, convert protocol to skill, save this protocol locally]
trigger_prompt: When someone wants a protocol installed as a local Agent Skill — a snapshot that loads automatically in their harness instead of being fetched per session. The whole install is one fetch plus a frontmatter wrap; no account or bootstrap required for public protocols.
category: meta
last_reviewed: 2026-07-05
complements: [@protocol/skill-to-protocol, @protocol/install, @protocol/quickstart]
audience: [agent-author, claude-code-user, cursor-user, terminal-only]
version: 1
updated_at: 2026-07-05T15:56:08.523Z
-->

Install any protocol as a local Agent Skill. One fetch, one wrap, done — public protocols need no account, no bootstrap, no CLI.

This is the reverse of [@protocol/skill-to-protocol](@protocol/skill-to-protocol). Same knowledge, two packagings: a **protocol** is fetched on demand over HTTP (lazy — enters context only when needed); a **skill** is a local folder your harness auto-loads when the task matches its description (eager — in context whenever activated). Install as a skill when you reach for a protocol constantly; keep fetching on demand when you don't. Eager loading costs context every session it activates, so install sparingly.

## The install (agent instructions)

You are probably an agent that was just told "install this as a skill." Here is the whole job:

### 1. Fetch the protocol

Public protocols are readable anonymously — plain `curl`, no auth:

```bash
curl -sL "https://api.protocol.supply/@protocol/caper.md"
```

Substitute the ref you were given. If the fetch returns "Not Found" and the ref looks private, the user needs `curly` and a token — point them at [@protocol/install](@protocol/install).

### 2. Wrap it as SKILL.md

Skills require YAML frontmatter with `name` and `description`. Protocols carry their metadata in an HTML comment instead — so prepend the YAML, deriving:

- `name` — the protocol slug (e.g. `caper`)
- `description` — the protocol's `trigger_prompt` (it's already written as an activation description; that's what it's for)

Also record the source ref and fetch date at the top of the body — the skill is a **snapshot**; the protocol at the ref stays the living source.

```bash
SLUG=caper; REF=@protocol/caper
mkdir -p ~/.claude/skills/$SLUG
{
  echo "---"
  echo "name: $SLUG"
  echo "description: <paste the protocol's trigger_prompt here>"
  echo "---"
  echo ""
  echo "<!-- installed from https://api.protocol.supply/$REF — $(date +%Y-%m-%d) — re-run install to refresh -->"
  echo ""
  curl -sL "https://api.protocol.supply/$REF.md"
} > ~/.claude/skills/$SLUG/SKILL.md
```

`~/.claude/skills/` is Claude Code's personal-skills directory; other harnesses have their own skill locations — same wrap, different destination.

### 3. Verify

List the harness's skills (in Claude Code the skill appears in the available-skills list on the next session) and confirm the new name shows. Done — report the installed path and the source ref back to the user.

## Keep the snapshot honest

A skill made from a protocol drifts as the protocol evolves. Two rules keep the loop closed:

1. **Stamp the source.** The install comment (ref + date) makes staleness visible and refresh trivial — re-run the install.
2. **Prefer the ref in conversation.** When *citing* the knowledge to others, link the protocol ref, not your local snapshot — refs stay current, snapshots age.

## When NOT to install

- **You use it rarely.** Fetching on demand costs nothing until the moment of need; an installed skill costs context every session its description matches.
- **It changes often.** Fast-moving protocols (project conventions mid-build, live playbooks) are better fetched — the snapshot would mislead within weeks.
- **It's huge.** A 20 KB protocol as an eager-loading skill taxes every matching session. Fetch it, or install a trimmed pointer skill whose body says "fetch the full doc from this ref."

## The two-way street

Any skill can become a protocol ([@protocol/skill-to-protocol](@protocol/skill-to-protocol) — mind the license gate); any protocol can be installed as a skill (this document). Knowledge should live where it's cheapest to maintain — usually the hosted, versioned, searchable side — and deploy where it's cheapest to use.

---

*Related: `@content/web/xinyadu/2026-11-29-claude-code-task-framing-study` · `@content/web/github/2026-11-29-convex-backend-skill-issue-64` · `@content/web/github/2026-11-27-resume-command-osc-7577-issue-112408` · `@protocol/groom-protocols` · `@content/web/github/2026-11-26-opus-context-fills-faster-issue-112194`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*