> For AI agents: the complete documentation index is available at https://tackup.dev/llms.txt, the full documentation bundle is available at https://tackup.dev/llms-full.txt.

# Add a worktree or clone

A project is a Git repository, and Tack links every worktree of it the same way: the picks belong
to the project, not to a folder. A worktree you add later needs one refresh and one sync.

This guide adds the worktree `~/code/app-hotfix` to the project `app`.

## A new worktree

Create the worktree with Git, then go into it:

```sh
git -C ~/code/app worktree add ~/code/app-hotfix -b hotfix
cd ~/code/app-hotfix
```

`tack project refresh` finds the project from the worktree's Git folder and previews the new root,
with the docs mounts it gets:


```text
$ tack project refresh
tack project refresh · project app · ✓ success

Preview only: nothing was written. 1 root change, 1 docs link to create, 1 docs
link unchanged.

Project app 1 root change
  + add  ~/code/app-hotfix

Docs links
  · keep  ~/code/app/.tack/docs/e71e644c-e9f8-42ac-b638-3b7504635ced/handbook
    docs handbook · project app
  + create
    ~/code/app-hotfix/.tack/docs/e71e644c-e9f8-42ac-b638-3b7504635ced/handbook
    docs handbook · project app

Next
  tack project refresh --apply
```


```text
$ tack project refresh --apply
tack project refresh · project app · ✓ success

Applied: 1 root change, 1 docs link created, 1 docs link unchanged.

Project app 1 root change
  ✓ applied  add  ~/code/app-hotfix

Docs links
  · kept  keep
    ~/code/app/.tack/docs/e71e644c-e9f8-42ac-b638-3b7504635ced/handbook
    docs handbook · project app
  ✓ applied  create
    ~/code/app-hotfix/.tack/docs/e71e644c-e9f8-42ac-b638-3b7504635ced/handbook
    docs handbook · project app

Next
  tack sync --project app
  tack sync --project app --apply
```

Inside a registered root, a bare `tack sync` selects its project. The preview creates the new
worktree's links and leaves the others as they are:


```text
$ tack sync
tack sync · project app · ✓ success

Nothing was written. 20 changes planned.

selected from the containing root ~/code/app-hotfix

claude → app · ~/code/app · 1 linked for the user
  skip  skill commit-message  linked for the user

codex → app · ~/code/app · 1 linked for the user
  skip  skill commit-message  linked for the user

cursor → app · ~/code/app · 1 linked for the user
  skip  skill commit-message  linked for the user

claude → app · ~/code/app-hotfix · 5 to link, 1 linked for the user
  create  .claude/skills/                  directory
  create  .claude/skills/debug-flaky-test  skill agent-setup:debug-flaky-test
  create  .claude/skills/pr-review         skill agent-setup:pr-review
  create  .claude/skills/release-notes     skill acme:release-notes
  create  .claude/skills/tack-sources      skill generated:tack-sources
  create  .claude/skills/triage-issue      skill agent-setup:triage-issue
  skip    skill commit-message             linked for the user

codex → app · ~/code/app-hotfix · 5 to link, 1 linked for the user
  create  .agents/skills/                  directory
  create  .agents/skills/debug-flaky-test  skill agent-setup:debug-flaky-test
  create  .agents/skills/pr-review         skill agent-setup:pr-review
  create  .agents/skills/release-notes     skill acme:release-notes
  create  .agents/skills/tack-sources      skill generated:tack-sources
  create  .agents/skills/triage-issue      skill agent-setup:triage-issue
  skip    skill commit-message             linked for the user

cursor → app · ~/code/app-hotfix · 6 to link, 1 linked for the user
  create  .cursor/commands/                directory
  create  .cursor/skills/                  directory
  create  .cursor/commands/ship.md         command agent-setup:ship
  create  .cursor/skills/debug-flaky-test  skill agent-setup:debug-flaky-test
  create  .cursor/skills/pr-review         skill agent-setup:pr-review
  create  .cursor/skills/release-notes     skill acme:release-notes
  create  .cursor/skills/tack-sources      skill generated:tack-sources
  create  .cursor/skills/triage-issue      skill agent-setup:triage-issue
  skip    skill commit-message             linked for the user

Commands reach cursor only: Tack does not link commands for claude, codex.

Docs · project app
Preview only: nothing was written. 2 docs links unchanged.

Docs links
  · keep  ~/code/app/.tack/docs/e71e644c-e9f8-42ac-b638-3b7504635ced/handbook
    docs handbook · project app
  · keep
    ~/code/app-hotfix/.tack/docs/e71e644c-e9f8-42ac-b638-3b7504635ced/handbook
    docs handbook · project app

Next
  tack sync --apply
```

Apply it with `tack sync --apply`. `tack doctor` warns about a worktree that refresh has not added
yet.

## Remove a worktree

Git refuses to remove a worktree that holds untracked files, and Tack's links are untracked unless
the repository ignores them. Remove it with `--force`, then drop its root from the project:

```sh
git -C ~/code/app worktree remove --force ~/code/app-hotfix
tack project refresh --project app --apply
```

The refresh forgets the root and the links Tack had recorded in it.

## A separate clone

A clone is a repository of its own, so it is a project of its own. From inside it, preview it
under a new name, then apply: `--apply` registers the clone and links it.

```sh
cd ~/code/app-review
tack project add app-review
tack project add app-review --apply
```

## Let agents do it

An agent that starts in a fresh worktree can run these steps itself. `tack guide agent-instructions`
prints a section for the repository's `AGENTS.md`, and where it goes when the repository also has a
`CLAUDE.md`. With `PROJECT` replaced by the project's name, the section reads:

```md
<!-- tack-block v1 -->

## Tack

This repository's agent skills come from Tack (project `PROJECT`). Before you work in a
new clone or worktree, load the `prepare-tack-checkout` skill. Without it, run from the
repository root: `tack project refresh --apply`, then `tack sync` and `tack sync --apply`. In a
clone Tack does not know, run `tack project add PROJECT --apply` instead: it registers and links
the clone. If `tack` is missing, tell the user: it installs with `npm install --global @tackup/cli`.
<!-- /tack-block -->
```

The section names no path of your machine, so it is safe to commit. The built-in
`prepare-tack-checkout` skill it names holds the steps above.

## Next

- [Check health](https://tackup.dev/docs/guides/check-health.md): `tack doctor` finds worktrees and projects that need a refresh.
- [Remove a source, a project or Tack](https://tackup.dev/docs/guides/remove.md) when a project is done.
