> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apostra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Give your Prime a skill

> Write down how your team wants a job done as a skill, put it in your Buyer Library, make it Live, and your account's Prime follows it when it applies.

> [!NOTE]
>
> Skills are in beta. They are available to accounts with the Buyer Library on.

A **skill** is a short set of instructions your team writes for your account's
own agent, the Prime (see [hosted buyer agents](https://docs.apostra.com/v3/hosted-buyer-agents.md)): how
you review pacing, how you name campaigns, what a weekly report must include.
A skill is a document in your [Buyer Library](https://docs.apostra.com/v3/buyer-library.md), so it follows
the Library's rules. There is no separate skills page and no new tool.

## What a skill file looks like

A skill is one Markdown file, `.md`, uploaded as `text/markdown`, at most 64 KB.
It starts with a `---` line, then two fields, then another `---` line, then the
instructions:

```markdown theme={null}
---
name: weekly-pacing-review
description: How we review pacing every Monday for this advertiser's campaigns.
---

1. Compare each campaign's spend with its flight so far.
2. Flag any campaign more than 15% behind, and say why.
3. End with the two campaigns that need a budget decision.
```

* `name` is lowercase letters and numbers joined by hyphens, at most 64
  characters. The Prime calls the skill by this name.
* `description` says when the skill applies, in at most 1,024 characters. The
  Prime reads only the name and description to decide whether a skill fits the
  question, so say when to use it.
* The instructions follow, and must not be empty. Other fields in the
  frontmatter are ignored.

A file that is not plain UTF-8 text, has no frontmatter, or has a name or
description outside these limits is refused when you upload it, with the reason.

## Put a skill on the account or on one advertiser

A skill is assigned like any Library document. Leave advertisers empty and it
applies to the whole account. Choose advertisers and it applies to them. A
document can concern up to 20 advertisers.

## Make it Live

A skill is saved as a Draft, whoever uploads it. A Prime ignores a Draft. Only
a directly signed-in person with write access to the account and to every
assigned advertiser can make it Live, on the Library page. No agent and no
standing rule can. Apostra sets the skill's category (`skill`) from the `.md`
file, and only a `.md` file can have it.

To change a skill, upload a new version of the file. Replacing a Live skill
needs a directly signed-in person too, and the new version is Live at once. To
stop a skill, archive it.

## What your Prime does with it

At the start of a turn a person began, your Prime is told which Live skills it
may use: each one's name, description and what it applies to. When the job it was
asked matches a skill's description, it reads that skill's text, and it does not
use a skill it has not read. Your Prime reads a skill with a read of its own
that only your account's Prime can make. It is not a new tool for you or your
agents, and nobody else can read a skill's text through it. Apostra records each read
in its audit log. A skill guides the Prime. It never lets the Prime
make a change you have not approved: after it reads a skill, every change it
wants to make still asks for your approval.

Which skills a turn is told about follows the Library's access rules:

* In a chat for one advertiser, the Prime sees that advertiser's Live skills.
  It does not see skills for the whole account, as the Library is not yet
  available that way.
* In an account chat, the Prime sees the whole account's Live skills and those of
  every advertiser the person can read. Each skill says what it applies to.
* It sees at most the newest 20. Use `search` with `kind: "material"` and
  `filter.documentPurpose: "skill"` to find the others.

## Try it

1. In the Library page, upload your `SKILL.md` file: choose **Upload**, pick the
   file, and assign it to the advertiser you want, or leave it for the whole
   account. Apostra shows it under the **Skill** category as a Draft.
2. Open the Draft and choose **Make Live**. You must be signed in directly.
3. Open a chat with your Prime for that advertiser (or an account chat for a
   whole-account skill) and ask for something the skill's description covers,
   for example "Do the weekly pacing review".
4. Your Prime reads the skill and follows it. Ask it which skill it used to
   check.

If the Prime does not use it, check that the skill is Live (not Draft), that its
description says when it applies, and that you chose the right chat: an
advertiser chat sees only that advertiser's skills.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.