Skip to content

What a reference is

A reference is a document an agent reads by name. A skill names it, such as release-checklist, and the reference command finds every file that holds that name, puts them together, and hands the agent one document.

Load `release-checklist` with the `reference` skill of `cyber-agentkit`.

The text could sit in the skill’s SKILL.md instead. It goes in a reference when someone other than the skill’s author should be able to change it.

Text inside SKILL.md has one owner, the skill’s author. A team that wants another rollback step, or a user who writes commit messages in another tone, must fork the skill to change it, and the fork stops getting the author’s fixes.

A reference splits that text out and gives it a name. Several places can then hold a file for the name:

  • the plugin that ships it;
  • the skill that loads it, as a bundled default;
  • one user, in ~/.agents/references/;
  • a repository, in .agents/references/;
  • a folder of the repository, for work in that folder;
  • an administrator, for every user of a harness on the machine.

The command stacks those files in a fixed order and applies each one over the files below it.

For a skill’s author, that means:

  • The skill states what it needs by name, and stays short. The agent reads the reference only when the skill loads it.
  • A choice that differs between teams, such as a tracker, a checklist, or a house style, becomes a name others can answer. The skill does not need to know every team’s answer.
  • A skill can declare an interface: a contract that other plugins and repositories implement. A new tracker is then a new implementation, not an edit to the skill.

For a skill’s user, that means:

  • You change one section of a shipped reference by writing only that section. The rest keeps coming from the plugin, and keeps getting its updates.
  • A change can reach only you, everyone in a repository, or work in one folder.
  • reference load <name> --trace shows which file each section came from, so you can see why the agent got the text it got.

The Agent Skills specification, the open standard for a skill’s folder, gives a skill an optional references/ folder. It holds documentation the agent reads when it needs it, such as references/REFERENCE.md, linked from SKILL.md by a relative path. Those files belong to the skill. The agent opens them by path, and only the skill’s author can change them.

A reference in this section is read by name instead of by path, and its text can come from many places. The two work side by side:

  • Keep a file in the skill’s references/ folder, linked by path, when only the skill’s author should change it, such as one command’s steps.
  • Make it a named reference when a user, a repository, or another plugin should be able to change it.

The reference command reads one kind of file in a skill’s references/ folder: the skill’s bundled default, <name>.default.md, its own copy of a reference it loads. It leaves every other file there alone. The one exception is a plain <name>.md with the same name as a reference the skill loads, which it reports as misnamed. Kinds of reference gives the file names.

A plugin named acme-release ships release-checklist:

---
description: Steps to run before cutting a release.
---
## Steps
Run the tests, then tag the commit.
## Rollback
Revert the tag.

The repository wants a different rollback. It writes .agents/references/release-checklist.md with that one section:

## Rollback
Revert the tag, then post in #releases.

A skill that loads release-checklist in this repository now gets the plugin’s Steps and the repository’s Rollback:

Terminal window
npx -y cyber-agentkit reference load release-checklist
## Steps
Run the tests, then tag the commit.
## Rollback
Revert the tag, then post in #releases.

The plugin’s file did not change. When the plugin improves its Steps, the repository gets the new text.

The pages of this section follow the order a reader needs them:

Page Answers
Kinds of reference Every kind of reference file, side by side: its file name, who writes it, and who loads it
How a name resolves The tiers, extends, the merge operations, project sections, and a skill’s default
Interfaces and implementations Declaring a contract, implementing it, and loading the implementations
Capability references and blueprints Describing an outside system once, and the ways a skill can use it
Customizing a reference Worked examples for a user and a repository, and how to see why a name resolved as it did
Authoring references Writing a reference, an interface, and an implementation, and wiring a skill to load them
Checking references What check, uses, advise, and the doctor each examine
The reference command Every reference subcommand, its output, and its exit codes
Migrating from version 1 Moving files written for version 1 to the current form

The reference skill runs the command for you. Type /reference to start it. When cyber-agentkit is installed as a Claude Code plugin, the command is /cyber-agentkit:reference.