Skip to content
Back to skills

fork

ASecurity

Create an exploration git worktree on a new branch from the current phase. Allows isolated experimentation that can be merged back or discarded without affecting the main branch.

  • 724 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added June 5, 2026
ai-agentsgit

Security analysis

A100/100

Pro scans all 18 files and shows the line behind each finding

Scanned June 5, 2026

npx -y skills add Snowflake-Labs/cocoplus --skill skills --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of fork?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for fork
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/snowflake-labs-fork/badge)](https://www.skillsdirectory.com/skills/snowflake-labs-fork)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "fork"
description: "Create an exploration git worktree on a new branch from the current phase. Allows isolated experimentation that can be merged back or discarded without affecting the main branch."
version: "1.0.0"
author: "CocoPlus"
tags:
  - cocoplus
  - lifecycle-engine
---

Your objective is to create a git worktree for isolated exploration.

Before proceeding, verify that `.cocoplus/` exists.
If not: output "CocoPlus not initialized in this directory. Run `$pod init` to begin." Then stop.

## Usage

`$fork [branch-name]` — creates a worktree on branch `explore/[branch-name]`

If no branch-name provided: output "Usage: $fork [branch-name] — e.g., $fork try-new-schema" Then stop.

## Create Worktree

```
BRANCH_NAME="explore/[branch-name]"
WORKTREE_PATH="../[project-dir]-explore-[branch-name]"
git worktree add "$WORKTREE_PATH" -b "$BRANCH_NAME"
```

## Output

Output:
```
Exploration worktree created.
Branch: explore/[branch-name]
Path: [worktree-path]

In the new worktree, all .cocoplus/ state is shared (same files).
Your changes in the worktree are isolated on the explore/[branch-name] branch.

To merge back:  git merge explore/[branch-name]
To discard:     git worktree remove [worktree-path] && git branch -d explore/[branch-name]
```

## Anti-Rationalization

| Shortcut / Temptation | Why It Fails |
|-----------------------|--------------|
| Create a branch without using a worktree | A branch without a worktree shares the working directory; changes in the exploration bleed into the main session |
| Use a flat branch name instead of `explore/` prefix | The `explore/` prefix clearly marks the branch as temporary exploration; flat names get lost among feature branches |

## Exit Criteria

- [ ] A git worktree exists at `[project-dir]-explore-[branch-name]` path
- [ ] Branch `explore/[branch-name]` exists in the git repository
- [ ] Output shows worktree path, branch name, merge command, and discard command

Files in this skill

  • assist-mode/cocoplus-off.skill.md3.3 KB
  • assist-mode/cocoplus-on.skill.md4.1 KB
  • cocobehavior/SKILL.md3.8 KB
  • cocobloom/bloom-crystallize.skill.md4.8 KB
  • cocobloom/bloom-skip.skill.md1.3 KB
  • cocobloom/bloom.skill.md6.4 KB
  • cocobrew/build.skill.md4.1 KB
  • cocobrew/plan.skill.md6.9 KB
  • cocobrew/review.skill.md5.3 KB
  • cocobrew/ship.skill.md5.6 KB
  • cocobrew/spec.skill.md7.2 KB
  • cocobrew/test.skill.md3.1 KB
  • cocobrew/worktree-utils.md580 B
  • cococontext/context-add.skill.md5.3 KB
  • cococontext/context-list.skill.md2.4 KB
  • cococontext/context-view.skill.md1.8 KB
  • cococupper/cup-history.skill.md1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…