---
language: "en"
title: "Bring your own harness"
canonical: "https://harnesspm.tenphi.me/bring-your-own/"
source: "docs/guide/bring-your-own.mdx"
version: "0.5.1"
index: true
---

# Bring your own harness

**In short**

* Your own harness is a git repository of rules, notes and skills about how you work. A team's harness is the same thing, owned by a team.
* Ask your agent to start it. Then add it once per machine, in your own terminal. It applies on top of every repository, and nothing from it is committed there.
* Two things stay with you: adding it, which trusts its tools, and what goes into its always-on rules.

This page is for your own way of working. To give a project the harness of its dependencies, see [Use a harness](/getting-started/). To ship a harness with a library, see [Share a harness](/share/).

## 1. Ask your agent to start it

Paste this into Claude Code or Codex, in any folder:

```text
Start a harness of my own with harnesspm
in ~/dev/my-harness. It holds how I work,
for every repository.

1. Run harnesspm as `npx -y @tenphi/harnesspm`.
   Do not install it anywhere.
2. Follow "Start one" in
   https://harnesspm.tenphi.me/guides/add-your-own.
3. Draft one short always-on rule about how I work,
   from what you know. I will correct it.
4. Commit it, and show me the harness.
   Do not add it yourself.
```

Your agent knows nothing about harnesspm in that folder. So the prompt names harnesspm, and says where the steps are. Keep both when you write your own.

Your agent then does this:

* It makes the folder a git repository, with `harness/plugin.json` and one rule. The rule is a draft: you know how you work.
* It runs `harnesspm check`, which validates the harness, and commits.

To use the harness on other machines and in cloud sessions, push it to a repository of yours.

## 2. Add it in your own terminal

```shell
npx -y @tenphi/harnesspm add ~/dev/my-harness
```

After a push, add it from there instead, for example `github:<owner>/<repo>`.

* **You** run it, once per machine. It applies in every repository on this machine, also in ones that do not use harnesspm. A hook keeps it current when a session starts.
* Adding a harness is your trust decision: its scripts, hooks and MCP servers run as you, in every repository. When an agent runs `add`, the rules and skills apply, and the tools wait for you.
* Nothing from it is ever committed to a project. `npx -y @tenphi/harnesspm doctor` checks that its files stay out of git.
* With `--local`, it applies in one repository only.

Your team has a harness too? Add the team's first and your own after it. The later one wins when both ship a skill with the same name.

## 3. Decide what goes in

Your harness costs context in every session, so the choice is yours:

* **Always-on rules** are in every session, in every repository. Keep them to what you would tell every agent, such as your commit style.
* **Notes** load only when an agent needs them, such as which repositories you work on and how they relate.
* **Skills** are workflows you repeat, such as releasing a package.
* **Changes for one repository** go into an entry for that repository, such as a local staging address.

[Add your own or your team's harness](/guides/add-your-own/#what-goes-in-it) has the kind of unit for each.

## 4. Grow it as you work

```text
Remember this in my own harnesspm harness:
I review pull requests with the checklist in my notes.
```

* **Your agent** writes a rule or a note into your harness, and saves the change the way your harness asks, such as a commit. Without the word harnesspm, an agent may keep the note in its own memory, on one machine and for one agent.
* **You** run `npx -y @tenphi/harnesspm update` on your other machines to get the change.

## 5. In cloud sessions

A Claude Code cloud session starts on a clean machine, without your harness. Put the `add` command into the setup script of your own environment, and each new session starts with it. [Cloud sessions](/guides/cloud/#your-own-harness) has the details, also for private repositories.

## Next

* [Ask your agent](/ask-your-agent/): prompts for the tasks after setup.
* [Add your own or your team's harness](/guides/add-your-own/): every step in detail, for your agent and for you.
* [Use a harness](/getting-started/): give a project the harness of its dependencies.
