Skip to Content
Keko

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:

  1. 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.md and Codex's ~/.codex/AGENTS.md, each with its path and when it was read (refresh them when you ask),
    • text for one project.
  2. The project's files: AGENTS.md and CLAUDE.md at the top of the worktree. When CLAUDE.md says the same as AGENTS.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:

WhereWhose
.agents/skills, .claude/skills, .keko/skills in the repositoryThe project's
~/.agents/skills, ~/.claude/skills, ~/.pi/agent/skills, and skill packages installed with git under ~/.pi/agent/gitYours

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.

On this page