← 返回 Skills 市场
94
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install git-factory
功能描述
Provision and manage isolated git worktrees for individual coding tasks, enabling parallel branches and clean PR workflows without merge conflicts.
使用说明 (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
new-worktree.ps1creates a branchmoth/\x3Cslug>and a worktree at.worktrees/\x3Cslug>- Moth works in the isolated directory — full git repo, own branch, no conflicts
finish-worktree.ps1commits, pushes, optionally creates a draft PR, then removes the worktreecleanup-stale.ps1runs periodically to remove abandoned worktrees
Limitations
- Worktrees share the same
.gitdirectory — 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
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install git-factory - 安装完成后,直接呼叫该 Skill 的名称或使用
/git-factory触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: worktree isolation for parallel subagent coding tasks. 4 PowerShell scripts for provision, finish, list, and cleanup.
元数据
常见问题
Git Factory 是什么?
Provision and manage isolated git worktrees for individual coding tasks, enabling parallel branches and clean PR workflows without merge conflicts. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 94 次。
如何安装 Git Factory?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install git-factory」即可一键安装,无需额外配置。
Git Factory 是免费的吗?
是的,Git Factory 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Git Factory 支持哪些平台?
Git Factory 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Git Factory?
由 Spaztazim(@spaztazim)开发并维护,当前版本 v1.0.0。
推荐 Skills