AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Swe Worktree

skill-sniko-agent-skills-swe-worktree · by SNIKO

Create an isolated git worktree for an SWE change workspace. Use before implementation when the user wants the change isolated from the current working tree.

No reviews yet
0 installs
12 views
0.0% view→install

Install

$ agentstack add skill-sniko-agent-skills-swe-worktree

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-sniko-agent-skills-swe-worktree)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
17d ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Swe Worktree? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Pipeline

swe-shapeswe-spec → [swe-plan] → [swe-worktree] → swe-executeswe-review, with swe-research available at any point.

Each stage runs in its own session: the user invokes one skill, reviews the result, clears the context, then invokes the next. Assume no memory of other stages beyond the files named below.

  • This stage: optional infrastructure. Isolate the change before implementation.
  • Reads: the change directory produced by earlier stages — brief.md, spec.html, and plan.md when present. Their contents are not needed; only their location.
  • Writes: a git branch and worktree, with the change directory copied into it.
  • Next: the user runs swe-execute inside the new worktree. Do not invoke it.

Purpose

Create a safe isolated branch and git worktree, copy the complete SWE change workspace into it, and report where implementation should continue. Worktrees are optional execution infrastructure, not a required specification stage.

Inputs

Infer from user input or an artifact path:

  • CHANGE_DIR: .swe//
  • SLUG: kebab-case change label
  • REPO_NAME: repository root basename
  • BRANCH_NAME: repository convention, otherwise ``
  • WORKTREE_PARENT: repository convention, otherwise ../worktrees//
  • WORKTREE_PATH: /

Use the change directory named by the user. If it is ambiguous, ask which one to prepare.

The shared research corpus at .swe/research/ is not change scope. It is repository documentation that outlives any branch, so it is not copied and not branched: research produced during implementation is written to the corpus in the main working tree and committed independently. Copying it would fork the corpus per branch and guarantee divergence.

Workflow

  1. Inspect repository state. Read repository git guidance and inspect git status --short, current branch, existing branches, and worktrees. Preserve unrelated changes.
  2. Resolve names. Follow repository branch and worktree conventions. Fall back to the defaults above only when guidance is absent.
  3. Handle conflicts. If the branch or path already exists, report the exact conflict and ask whether to reuse it or choose another name.
  4. Create the worktree. Run:

``bash git worktree add -b "$BRANCH_NAME" "$WORKTREE_PATH" ``

If creation fails, stop and report the command error before retrying.

  1. Copy artifacts. Copy the complete CHANGE_DIR to the same repository-relative location inside the worktree — brief.md, spec.html and any split spec-.html files, mockups/, plan.md when present, and state.md. Do not copy .swe/research/.
  2. Verify readiness. Confirm the new path, branch, copied artifact paths, and clean worktree status.

Autonomy

Inspect git state, and create the branch, worktree, and artifact copies described in Inputs and Workflow without asking.

Ask first before reusing, overwriting, force-creating, or deleting an existing branch or worktree, and before changing anything in the original working tree.

Never install dependencies, run migrations, commit, push, deploy, open a pull request, or begin implementation.

Constraints

  • Do not require plan.md when the spec is intentionally one slice.
  • Do not copy, branch, or duplicate the shared research corpus.
  • Stop immediately when worktree creation or artifact copying fails.

Output

## Worktree ready

- **Path:** ``
- **Branch:** ``
- **Artifacts:** `/.swe//`
- **Execution source:** `plan.md` | `spec.html` as one slice
- **Next:** Run `swe-execute` in the new worktree.

Completion Criteria

  • The worktree and branch exist without overwriting user state.
  • Selected artifacts are present at the expected relative path.
  • The original working tree has no changes caused by this skill beyond artifact copying requested by the user.
  • The final response gives the exact absolute path and branch.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.