Give the harness instructions and skills
Load project guidance and offer task-specific skills to the model.
Use instructions for guidance that applies to every turn, and skills for guidance the model can load for a particular task. Start with a working harness. These declarations guide the model; enforced restrictions belong in tool permissions.
Write the system instructions
Section titled “Write the system instructions”API reference: HarnessInstructionsOption and HarnessSkillOptions.
Load the project’s AGENTS.md from the borrowed sandbox to build the system instructions. The example uses its content when the file can be read, and returns an empty string otherwise.
Pass instructions: ["Answer with evidence.", projectGuidance]. The resolver receives the borrowed sandbox, the signal, the model and, when the harness declares MCP servers, an mcp accessor for their prompts.
Load skills on demand
Section titled “Load skills on demand”A skill is guidance and tools the model loads only when it needs them. Its name and description appear in the system prompt; its instructions arrive as a tool result when loaded.
The script prints review [ 'git' ]: the skill name and the tools it unlocks. Pass it with createHarness({ skills: [review] }).
- The model sees the available skill names and descriptions.
- It calls
load_skillto read one skill’s instructions and unlock its tools. - It follows those instructions and can use the tools for the rest of the conversation.
Calling a skill tool before loading its skill returns an error.
The API lists the fixed skill catalog and loader texts. Names, descriptions and skill instructions are yours; the surrounding wording has no override option.
API reference: HarnessInstructionsOption and HarnessSkillOptions.
Account for history and tool cost
Section titled “Account for history and tool cost”- A compaction that removes the
load_skillcall locks that skill’s tools again until the model reloads it. - Skill tool definitions are sent with every request, loaded or not; skills save instruction text, not tool schemas.
History management explains compaction.

