---
title: "How to vendor agent skills with almanac"
description: "Inspect and pin a skill library, then check it for drift."
type: how-to
canonical_url: https://eng.rip/how-to-vendor-agent-skills-with-almanac/
---

# How to vendor agent skills with almanac

Start at the repository root with almanac installed. The `add` commands need network access. Install details are in [Tools](<tools.md>).

## Initialize the library

Create the manifest:

```sh
almanac init
```

The command prints `initialized almanac.yml (library: skills)`. The default library directory is `skills/`; `--library <dir>` changes it.

## Inspect and accept the skills

Fetch the gaff skill without accepting it:

```sh
almanac add github:cjohnhanson/gaff --path skills/gaff
```

The command prints `red-flag scan: gaff: clean` and stages the files under `.almanac-staged/gaff`. It ends with `almanac: not accepted` and exits 1; nothing lands in the library.

Inspect the staged files. To accept the skill, run the command again with `--accept`:

```sh
almanac add github:cjohnhanson/gaff --path skills/gaff --accept
```

The command prints `added gaff`. Delete `.almanac-staged/` afterwards, or keep it out of git.

Add the almanac skill with explicit acceptance:

```sh
almanac add github:cjohnhanson/almanac --path skills/almanac --accept
```

## Check and commit the library

List the accepted skills and check their pins:

```sh
almanac list
almanac sync --check
```

The list prints each skill's name, description, and source. The check prints `ok    gaff` for the gaff entry, with a corresponding line for each entry. It exits 1 on drift.

Commit `almanac.yml` and `skills/`. The manifest records each entry's source, path, ref, commit as `rev`, and content hash as `sha256`.

To check drift before commits, add a `git:` entry with `command: ["almanac", "sync", "--check"]` to `.gaff/gaff.yml`. Put it on `pre-commit`, then rerun `gaff init --git`. The hook setup is in [How to check issues, notes, and docs before a commit](<how-to-check-issues-notes-and-docs-before-a-commit.md>).

## Supply skills to an agent

Print a Markdown index for the agent's context at session start:

```sh
almanac index --md --max-bytes 4096
```

The index fits the byte budget. Use `almanac show <name>` to print one skill in full when needed.

## Update the pins

Review the upstream changes:

```sh
almanac update
```

The command prints a fresh red-flag scan and the upstream diff, and changes nothing. After review, re-pin:

```sh
almanac update --yes
```

[Curation](https://almanac.eng.rip/curation/) describes the acceptance and update process.
