# Context: what an agent knows when it starts

An agent that starts cold makes cold mistakes. OpenRig gives each agent what it needs to do its job:
- the team's culture;
- its own role;
- its skills;
- the lessons earlier agents in its seat learned;
- the right reading for the moment: a fresh start, a handover, or a return from compaction.

Agents can also pull more when they need it, down to a single section, instead of carrying everything all the time.

## Pull exactly what you need

[Context packs](/features/context-packs) are bundles of files you write once and serve to any agent by name. `rig context get` serves a whole pack or one section of it.

```
rig context list
rig context get world-public
rig context get world-public/boundaries.md#this-pack-does-not-cover
```

*Demonstration: Read one heading with rig context get. Asked how Slack connects to OpenRig messaging, the agent runs rig context get 'demo/slack.md#messaging'. It returns only that section: Slack connects through OpenRig messaging, the adapter handles Slack-specific work, and two links lead onward, to messaging.md#routing and team.md#slack.*

## Give an agent the right reading for the moment

A pack can declare what to read in each situation. `rig context profile` puts it together, in order, and tells you how many tokens it adds up to.

```
rig context profile world-public --situation fresh --runtime claude-code
```

`rig context work-install` does the same for a project: the project's intent, its context files and its skills, for the mission and slice an agent is working on.

*Demonstration: Install OpenRig's project orientation. The agent runs rig context add with the openrig-world manifest URL, and the pack installs. Then rig context profile openrig-world --situation fresh returns the orientation, starting with what OpenRig is for: launching and restoring agents, delivering messages between them, keeping durable work in a queue, and giving each agent the right skills and context. It ends at the developing-openrig skill, a map to ARCHITECTURE.md, docs/as-built/arteries.md and docs/as-built/test-layers.md.*

## Skills

Skills are repeatable procedures an agent loads by name. `rig skill loadout` shows which skills a project's agents get; `--apply` installs the set OpenRig manages, and `--seat <session>` works on one agent's own skills, kept outside your project. `rig skill audit` checks where each skill came from and whether it's current.

```
rig skill loadout --runtime claude-code
rig skill loadout --runtime codex --apply
rig skill audit
```

## Lessons that stay with the seat

Each seat can keep a `LEARNED.md`: what agents in that seat have learned about doing the job, kept for the next agent who sits there ([Seat lessons](/features/seat-lessons)). At a handover or compaction, `rig context recap-write` saves the outgoing agent's decisions and reasons beside it. `rig context trace` reads one of these files at every level, from the team down to the seat.

## Refocus: fresh context for an agent that's been running a while

An agent reads its files when it starts, so later edits don't reach it on their own. Refocus brings a running agent back to its current goal and guidance at a natural break:
- after it compacts;
- on a long-running Claude agent, after roughly 300k tokens of conversation.

The `refocusing` skill lets an agent do the same on purpose before a big step. It comes with the `openrig-core` plugin. `OPENRIG_REFOCUS_ENABLED=0` turns it off.

## Packs, sources and plugins

- **`rig context add ./my-pack`** adds a pack. `--git` adds one from a Git repository and keeps it linked, so `rig context source update` can pull changes when you choose to.
- **`rig plugin list`, `show`, `used-by` and `validate`** show the plugins your agents use: their skills, hooks and MCP servers.

## Where to go next

- [Continuity](/docs/continuity): handovers, compaction and restore packets.
- [Specs](/specs/agentspec): where an agent's skills and guidance are declared.
- Every option is in the [CLI reference](/docs/generated/cli-reference).
