Skills
A skill is a folder with a file SKILL.md. The file tells an agent how to do one kind of work, for example a code review. A workflow step names a skill with skill:, and a prompt can name a skill too.
Opfold knows two kinds of skills. Both are in the skills folder of the vault, for example skills/.
| Kind | Where | For |
|---|---|---|
| Shared skill | skills/<name>/SKILL.md |
The rules of this vault. Git tracks them, and each person of the vault gets them. |
| Local skill | skills/_local/<name>/SKILL.md |
Your own rules on this computer. Git does not track the folder _local. |
The contract of a skill
A skill that works on a task can have a file opfold.yaml beside its SKILL.md. SKILL.md is the text for the agent. opfold.yaml is the contract for Opfold: the workflow runner, the chat, and the board read it.
# skills/code-implementation/opfold.yaml
taskStatus: { start: implementing, success: implemented }
workflowStatus: { start: implementing, success: implemented }
requires:
taskStatus: [planned]
parts: [instructions.md]
partFrontmatter:
instructions.md: { status: approved }
repo: true
context: [worktree]
personas: none
pre:
- git -C "{{repo}}" fetch --quiet
expects: []
| Key | Meaning |
|---|---|
taskStatus |
The task state at the start and after a successful end. Only a task step has it. A task step moves the card to another lane. |
workflowStatus |
The workflow state at the start and after a successful end. A sub step changes only this state, so the card stays in its lane. |
requires |
The checks before the step: taskStatus, parts, partFrontmatter, repo, worktree, and reviewGate (no open blocking finding in the newest code review). |
context |
More blocks of the step context: worktree, diff, and review-gate. The task and the project are always in it. |
personas |
none gives no persona, paths gives the files of each persona, full gives the full text of each persona. |
pre |
Commands before the step. Their output goes into the step context. A failed command fails the checks. The placeholders {{vault}}, {{taskRoot}}, {{taskFolder}}, {{repo}}, and {{worktree}} hold absolute paths. |
expects |
The files that the step must write beside the task file |
A contract without taskStatus and workflowStatus is valid, for example for pr-code-review. Opfold then records the step in the timeline of the task without a state change, and the card stays where it is.
A change of opfold.yaml is no new version of the skill, so a local extension does not show a change. A local skill in skills/_local/<name>/ can bring its own opfold.yaml. That file then replaces the shared one on this computer.
The step context
Before a step, Opfold computes the facts of the step and gives them to the agent as the block ## Step context: the task, the project, the personas, the blocks of context, the result of each check, and the output of pre. The agent runs no command to find a path.
| Place | What happens |
|---|---|
| Workflow run | The runner adds the block to the prompt of the step. A failed check stops the step before its agent starts. The runner records the step. |
| Chat of Opfold | The first message with a task gets the block. A message that starts with the slash command of a skill with a contract also gets it, and the chat records the step. See Chat. |
| Agent outside of Opfold | The agent runs opfold kit context --skill <name> --task <path>. The block names the two commands that record the step. See Command line. |
Opfold records each step in the file timeline.json of the task folder. No agent writes a status field or a timeline.
Sync the skills to the agents
Claude Code, Codex, and other agents read their own skills from a folder of the vault. Opfold copies the shared skills into these folders, so an agent knows them also outside of Opfold.
- Open Settings and select Skills.
- Select Sync to agents.
Opfold copies each shared skill with all of its files into .claude/skills, .agents/skills, and .codex/skills. A line shows the count of the new files and of the changed files.
- The sync adds and changes files. It removes no file, because other tools put their own skills into these folders too.
- The local skills stay out of the sync, because git can track the skill folders of the agents.
- After a change of a shared skill, select Sync to agents again.
The command opfold skill sync does the same sync.
Extend a shared skill
A local skill can extend a shared skill. The shared skill keeps its rules. The local skill adds the rules of this computer.
- Open Settings and select Skills.
- Find the shared skill and select Extend locally.
- Opfold creates the local skill with the same name in
skills/_local. Open it and write your rules below Rules of this computer.
The frontmatter of the local skill names the shared skill with the version of the shared skill. A local skill has no version of its own:
---
name: code-review
description: "Review the changes of a task."
extends: "code-review@1.2.0"
---
When a rule of the local skill and a rule of the shared skill disagree, the rule of the local skill wins.
When the vault is a git repository, Opfold adds the line /skills/_local/ to the file .gitignore of the vault.
How an agent gets both skills
- A workflow step: a step that names the shared skill uses the local skill with the same name. Opfold puts the text of the shared skill in front of the text of the local skill, so the agent gets both texts in one prompt.
- An agent outside of Opfold: the local skill starts with a sentence that tells the agent to read the shared skill first. The sentence names the file of the shared skill.
A local skill without extends replaces the shared skill with the same name on this computer.
Versions
Write the version of a shared skill in its frontmatter, for example version: 1.2.0. A shared skill without a version gets a short code from its text, for example #1a2b3c4d. A new text gives a new code.
Opfold keeps a copy of each version of a shared skill that a local skill extends. The copies are in .opfold/skills/versions of the vault.
Review a change of a shared skill
When the shared skill changes, its local skill shows the old and the new version, for example "code-review 1.2.0 → 1.3.0". A change of the text without a new version also shows.
- Select Show changes. A window shows each removed line in red and each added line in green.
- Change the rules of your local skill when necessary.
- Select Accept with the new version. The local skill then names the new version.
A local skill whose shared skill is not in the skills folder shows "not found".