DEV Community

Philip Stayetski
Philip Stayetski

Posted on

How to Give an AI Agent New Skills (Without Retraining It)

How to Give an AI Agent New Skills (Without Retraining It)

If you're running an AI agent — a coding assistant, a research bot, an autonomous
loop that does real work — you've hit this wall: the agent is smart, but it doesn't
know how to do the specific thing you need. It doesn't know your internal API. It
doesn't know how to drive that one CLI tool. It doesn't know your team's conventions
for writing a PR description.

The instinct is to think this means fine-tuning or prompt engineering gymnastics.
It usually doesn't. Most of the time what you actually need is a skill: a
packaged, reusable procedure the agent can discover, load, and follow — without
touching model weights.

What "giving an agent a new skill" actually means

A skill is not a plugin in the traditional sense, and it's not a fine-tune. The
pattern that's converged across agent runtimes (Claude Code, OpenClaw, and others)
looks like this:

  1. A markdown file with instructions — trigger conditions, numbered steps, exact commands, known pitfalls, verification steps. Usually named SKILL.md.
  2. A discovery mechanism — the agent's runtime scans available skills (by name, description, or tags) and decides which one is relevant to the current task.
  3. A loading step — the agent reads the skill's full content into context only when it's needed, keeping the rest of the system prompt lean.
  4. Optional supporting files — reference docs, templates, or small scripts the skill can point to without bloating the main file.

This is deliberately low-tech. You're not shipping code into the model. You're
shipping procedural memory — the same way a new hire reads a runbook instead of
attending a semester of training before touching production.

Anatomy of a SKILL.md

A good skill file has a predictable shape:

---
name: deploy-to-staging
description: >
  Deploy the current branch to the staging environment and verify
  the health check before reporting success.
---

# Deploy to Staging

## When to use this
Trigger: user asks to "deploy to staging" or "push to staging."

## Steps
1. Confirm the branch is not `main` — refuse if it is.
2. Run `./scripts/deploy.sh staging`.
3. Poll `https://staging.internal/health` until it returns 200 (max 2 min).
4. Report the deployed commit SHA and the health check result.

## Pitfalls
- `deploy.sh` silently no-ops if `.env.staging` is missing — check for it first.
- Health check can 200 before the app is actually warm; wait for two consecutive 200s.
Enter fullscreen mode Exit fullscreen mode

Notice what's not here: no retraining, no embeddings pipeline, no new model
version. The skill is a text file with a frontmatter block (name + description used
for discovery) and a body (the actual procedure). That's the whole contract.

The install loop that's emerging: discover → install → call

Across the agent ecosystem, the mechanics for adding a skill are converging on the
same three steps regardless of platform:

  • Discover — browse or search a catalog of available skills/capabilities.
  • Install — pull the skill (and any supporting files) into the agent's local skill directory.
  • Call/use — the agent's runtime picks it up automatically on the next relevant task; no restart, no redeploy.

This loop matters because it's what makes skills composable at scale. If adding a
skill required a code change and a deployment, teams would end up with five skills
and a backlog. If it's one command, teams end up with dozens, each solving a
narrow, real problem.

Pilot Protocol — an open-source overlay network that gives AI agents a permanent
address, encrypted peer-to-peer tunnels, and NAT traversal — takes this discover →
install → call pattern and extends it in a related but distinct direction: instead
of only shipping procedural skill files, it also ships agent apps — installable
capabilities that run as local, typed IPC services on your daemon (JSON in, JSON
out, auto-spawned on install). The loop looks the same from the operator's side:

pilotctl appstore catalogue                 # what's installable
pilotctl appstore view io.pilot.cosift      # inspect before installing
pilotctl appstore install io.pilot.cosift   # install — daemon auto-spawns it
pilotctl appstore call io.pilot.cosift cosift.help '{}'   # discover its methods
Enter fullscreen mode Exit fullscreen mode

Every installed app exposes a <app>.help method — the same discovery convention
skill files use with frontmatter — so an agent can introspect what it just gained
without a human writing new integration code. On the SKILL.md side specifically,
Pilot Protocol's own agent skill is distributed the same way most OpenClaw-style
skills are: browsable and installable in one command, listed at
pilotprotocol.network/for/skills.

When a skill is the wrong tool

Skills aren't a universal fix. They're good for procedures — repeatable,
describable workflows with clear steps and known pitfalls. They're the wrong tool
for:

  • Tasks that need genuinely new reasoning ability (a skill can't make a model better at math).
  • One-off tasks that will never recur — writing a skill has overhead; a single-use instruction in the prompt is faster.
  • Anything that requires live external data the model can't fetch — that's a job for a tool/API call (or, in Pilot's case, an installed app), not a markdown file.

Getting started

If your agent runtime already supports a skills directory (Claude Code, OpenClaw,
and similar tools do), the fastest way to internalize the pattern is to write one
skill for a task you've corrected the agent on more than once. That's usually the
clearest signal that a procedure — not a smarter model — is what's missing.

To try the broader agent-networking and app-store side of this:

curl -fsSL https://pilotprotocol.network/install.sh | sh
Enter fullscreen mode Exit fullscreen mode

FAQ

Do skills require fine-tuning?
No. A skill is a markdown file (plus optional supporting files) that the agent
reads into context when relevant. No model weights change.

How is a skill different from a tool/function call?
A tool gives the agent a new capability (e.g., call an API, run a script). A
skill gives the agent a new procedure — how and when to use existing capabilities
correctly, including pitfalls to avoid.

Can skills call out to external services?
Yes — a skill's steps can include running scripts or hitting APIs. If the
capability itself needs to run as a persistent local service rather than a one-off
script, that's closer to what an installable agent app (like Pilot Protocol's app
store) is for.

Where do I find existing skills to install instead of writing my own?
Check your agent runtime's marketplace or catalog first — for OpenClaw-style
agents, Pilot Protocol's skill and the broader catalog are at
pilotprotocol.network/for/skills.

Top comments (0)