← Back to Skills Marketplace
spaztazim

Git Factory

by Spaztazim · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
94
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install git-factory
Description
Provision and manage isolated git worktrees for individual coding tasks, enabling parallel branches and clean PR workflows without merge conflicts.
README (SKILL.md)

Git Factory — Worktree Isolation for Moths

Each moth gets its own branch, its own workspace, its own PR. No conflicts. No merge hell.

When to Use

  • Multi-moth coding tasks — parallel feature work on the same repo
  • Open-source PRs — isolated branch per contribution
  • Skill packaging — each skill gets its own worktree for clean commits
  • Any moth that writes code — default to worktree isolation

Quick Reference

Provision a worktree for a moth

# From the repo root
.\skills\git-factory\scripts\
ew-worktree.ps1 -RepoPath . -TaskSlug "fix-login-bug"
# Returns: C:\Users\spaz\clawd\.worktrees\fix-login-bug

Finish and submit PR

.\skills\git-factory\scripts\finish-worktree.ps1 `
  -WorktreePath ".worktrees\fix-login-bug" `
  -CommitMessage "moth(fix-login-bug): fix auth redirect loop" `
  -CreatePR -PRTitle "Fix login redirect bug" `
  -PRBody "Fixes the auth redirect loop on expired sessions"

List active worktrees

.\skills\git-factory\scripts\list-worktrees.ps1 -RepoPath .

Clean up stale worktrees (>7 days)

.\skills\git-factory\scripts\cleanup-stale.ps1 -RepoPath . -MaxAgeDays 7

Moth Dispatch Integration

When spawning a coding moth, include the worktree in the task prompt:

Your working directory is: C:\Users\spaz\clawd\.worktrees\\x3Ctask-slug>
You are on branch: moth/\x3Ctask-slug>
Base branch: master

Work ONLY in this directory. When finished:
1. Stage and commit your changes
2. Push your branch: git push -u origin moth/\x3Ctask-slug>
3. Report what you built and any issues

Do NOT modify files outside your worktree.

Conventions

Item Convention
Worktree location \x3Crepo>/.worktrees/\x3Ctask-slug>
Branch naming moth/\x3Ctask-slug>
Commit prefix moth(\x3Ctask-slug>): \x3Cdescription>
PR mode Draft by default
Stale threshold 7 days (configurable)
.worktrees/ Added to .gitignore automatically

How It Works

  1. new-worktree.ps1 creates a branch moth/\x3Cslug> and a worktree at .worktrees/\x3Cslug>
  2. Moth works in the isolated directory — full git repo, own branch, no conflicts
  3. finish-worktree.ps1 commits, pushes, optionally creates a draft PR, then removes the worktree
  4. cleanup-stale.ps1 runs periodically to remove abandoned worktrees

Limitations

  • Worktrees share the same .git directory — large repos may have lock contention on heavy git ops
  • Can't have two worktrees on the same branch
  • Windows file locking can prevent cleanup if processes have files open\r
Usage Guidance
This skill's documentation describes useful behavior, but the package contains no scripts or install steps — the SKILL.md points at PowerShell scripts that aren't included and references Windows-specific paths. Before installing or using: 1) ask the publisher for the missing script files or the repository that contains them and inspect those scripts for unsafe actions (especially any network calls, credential handling, or deletion logic); 2) confirm which Git host (GitHub/GitLab/etc.) and credential method the workflow expects and ensure you won't leak tokens or push unintended changes; 3) verify OS compatibility (the instructions are PowerShell/Windows-centric) and test in a safe sandbox or throwaway repo; 4) if you plan to allow automated PR creation/cleanup, ensure any tokens are scoped minimally and review scheduling/cleanup behavior to avoid accidental data loss. If the author cannot produce the scripts or a trusted repository, treat the skill as incomplete/untrusted.
Capability Analysis
Type: OpenClaw Skill Name: git-factory Version: 1.0.0 The skill bundle contains documentation and metadata for managing Git worktrees to isolate agent tasks. The instructions in SKILL.md describe a legitimate development workflow for parallel feature work and include safety constraints for the AI agent (e.g., restricting file modifications to specific directories). While the referenced PowerShell scripts (e.g., new-worktree.ps1) are not included in the provided files, the documented intent and usage patterns show no evidence of malicious behavior or prompt injection.
Capability Assessment
Purpose & Capability
The name and description (provision/manage worktrees) match the SKILL.md content, but the SKILL.md expects concrete scripts at .\skills\git-factory\scripts\*.ps1 to perform actions. No code files or install spec are present, so the skill declares capability it cannot perform as packaged. Additionally the instructions are Windows/PowerShell-specific (examples, C:\ paths, .ps1 files) while the skill has no OS restriction declared.
Instruction Scope
The instructions tell the agent (or operator) to run specific PowerShell scripts to create/finish/cleanup worktrees, to push branches and create PRs, and to add .worktrees to .gitignore. Those actions involve filesystem changes, network operations (git push, PR creation), and periodic cleanup, but the SKILL.md does not include or link the scripts, nor does it describe how credentials or remote hosts are handled. The agent would be asked to perform operations (push, create PRs, delete worktrees) that transmit data externally and change repo state without declared credential handling.
Install Mechanism
No install spec (instruction-only) — low disk/write risk. However the SKILL.md assumes the presence of packaged scripts under the repo path; since no code files are present, that is an incoherence: the skill expects artifacts that are not included, which means the instructions are incomplete or the packaging is broken.
Credentials
The skill declares no required environment variables or credentials, but the documented workflow requires pushing branches and optionally creating PRs (operations that typically require Git credentials or API tokens). The absence of any declared credential requirement is noteworthy; it relies implicitly on the user's existing git authentication without documenting host/provider assumptions (e.g., GitHub, GitLab) or token usage.
Persistence & Privilege
No elevated persistence requested (always: false). The skill does not request to run always or to modify other skill configs. There is mention of periodic cleanup, but no mechanism is provided and no automation privilege is requested in the metadata.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install git-factory
  3. After installation, invoke the skill by name or use /git-factory
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: worktree isolation for parallel subagent coding tasks. 4 PowerShell scripts for provision, finish, list, and cleanup.
Metadata
Slug git-factory
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Git Factory?

Provision and manage isolated git worktrees for individual coding tasks, enabling parallel branches and clean PR workflows without merge conflicts. It is an AI Agent Skill for Claude Code / OpenClaw, with 94 downloads so far.

How do I install Git Factory?

Run "/install git-factory" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Git Factory free?

Yes, Git Factory is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Git Factory support?

Git Factory is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Git Factory?

It is built and maintained by Spaztazim (@spaztazim); the current version is v1.0.0.

💬 Comments