Skills and instructions
What a thread is given before your first message, and where it comes from
Before your first message, a thread is given its instructions and a list of skills. You can see exactly what it got, with an estimate of the tokens each part takes, from the thread's header.
Instructions
A thread starts with, in this order:
- Your instructions from Settings → Instructions:
- text of your own, for every thread,
- instructions imported from other agents on This Mac: pi's
~/.pi/agent/AGENTS.md, Claude Code's~/.claude/CLAUDE.mdand Codex's~/.codex/AGENTS.md, each with its path and when it was read (refresh them when you ask), - text for one project.
- The project's files:
AGENTS.mdandCLAUDE.mdat the top of the worktree. WhenCLAUDE.mdsays the same asAGENTS.md, for example because it's a link to it, it's left out.
When the thread reads or edits a file in a subfolder, AGENTS.md and CLAUDE.md files in the folders on the way are
added then, marked as being for that folder.
A thread keeps the instructions it started with, so the start of its prompt stays the same and the model's prompt cache keeps working. A change applies to new threads.
Skills
A skill is a folder with a SKILL.md file: a name, a description and instructions for one kind of task. A thread is
given each skill's name, description and path, and reads the whole skill when a task matches it.
Skills are found on the thread's device, the project's first:
| Where | Whose |
|---|---|
.agents/skills, .claude/skills, .keko/skills in the repository | The project's |
~/.agents/skills, ~/.claude/skills, ~/.pi/agent/skills, and skill packages installed with git under ~/.pi/agent/git | Yours |
When the same name is found twice, the project's wins. A skill with disable-model-invocation: true in its front matter
isn't listed for the model, but still shows in the / and @ menus.
Settings → Skills lists every skill a project has on This Mac, with a switch for each, per project. Every skill starts on. If the skills that are on take more than about 8,000 tokens, the rest are left out and the breakdown in the thread's header says how many, with a link to turn some off.
The breakdown
The thread's header shows what the model had before your first message, grouped:
- System instructions
- Instruction files, with their paths
- Skills, with their paths
- Tools, and tools from your connections
- For a crew thread, its major's rules
Token counts are estimates, with each group's share of the model's context window.