Token导航 LogoToken导航

Agent Skill · 开发

rlm-worktree(RLM 工作树)

rlm-worktree 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

rlm-worktree 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 18,928。

总安装 306周安装 13GitHub Stars 53下载 107核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:rlm-worktree(RLM 工作树)
来源仓库:https://github.com/doubleuuser/rlm-workflow
仓库路径:skills/rlm-worktree
安装命令:
npx skills add https://github.com/doubleuuser/rlm-workflow --skill rlm-worktree
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/doubleuuser/rlm-workflow --skill rlm-worktree

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

rlm-worktree 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。适用于代码协作、仓库管理和开发流程优化场景。支持主流 Agent 宿主环境,通过 npx 方式便捷安装。

来源仓库内路径:skills/rlm-worktree

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/doubleuuser/rlm-workflow --skill rlm-worktree;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

rlm-worktree 怎么安装?

在终端执行 npx skills add https://github.com/doubleuuser/rlm-workflow --skill rlm-worktree。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

rlm-worktree 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

rlm-worktree 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

rlm-worktree 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

rlm-worktree 用的人多吗?

公开数据是累计安装 306 次,近一周安装 13 次,下载 107 次,GitHub 53 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

rlm-worktree 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
rlm-worktree

RLM 工作树 · 本页

30653需要联网未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

RLM Git Worktree Isolation (Phase 0)

Overview

Git worktrees create isolated workspaces sharing the same repository, allowing parallel development without switching branches. This prevents:

  • Pollution of main/master branch during development
  • Accidental commits to production branches
  • Context switching overhead
  • Conflicts between parallel requirements

Core Principle: Systematic directory selection + safety verification = reliable isolation.

The Iron Law for RLM Worktrees:

NEVER WORK ON MAIN/MASTER BRANCH WITHOUT EXPLICIT CONSENT

Trigger examples

  • Create an isolated worktree for this requirement
  • Set up Phase 0 worktree isolation for run '2026-02-24-add-oauth'
  • I'm on main; move me to a worktree
  • Use.worktrees/ and ensure it is git-ignored

When to Use

REQUIRED for all RLM runs:

  • New features
  • Bug fixes
  • Refactoring
  • Experiments/prototypes

Insert as Phase 0:

Phase 0R: 00-requirements.md (user-created first)
    ->
Phase 0W: 00-worktree.md (isolated workspace setup; this skill)
    ->
Phase 1: 01-as-is.md

The Worktree Rule

Directory Selection Process

Step 1: Check Existing Directories

# Check in priority order
ls -d .worktrees 2>/dev/null     # Preferred (hidden)
ls -d worktrees 2>/dev/null      # Alternative

If found: Use that directory. If both exist, .worktrees wins.

Step 2: Check CLAUDE.md

grep -i "worktree.*director" CLAUDE.md 2>/dev/null
grep -i "worktrees" CLAUDE.md 2>/dev/null

If preference specified: Use it without asking.

Step 3: Ask User (if no convention exists)

No worktree directory found. Where should I create worktrees?

1. .worktrees/ (project-local, hidden - RECOMMENDED)
2. ~/.config/rlm-workflow/worktrees/<project-name>/ (global location)

Which would you prefer? (1/2)

Default: .worktrees/ (option 1)

Safety Verification

For Project-Local Directories (.worktrees or worktrees)

MUST verify directory is ignored before creating worktree:

# Check if directory is ignored (respects local, global, and system gitignore)
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null

If NOT ignored:

Per "Fix broken things immediately" rule:

  1. Add appropriate line to.gitignore: # RLM worktrees.worktrees/
  2. Commit the change: git add.gitignore git commit -m "chore: ignore RLM worktree directory"
  3. Proceed with worktree creation

Why critical: Prevents accidentally committing worktree contents to repository.

For Global Directory (~/.config/rlm-workflow/worktrees)

No.gitignore verification needed - outside project entirely.

Worktree Creation Process

Step 1: Detect Project Name

project=$(basename "$(git rev-parse --show-toplevel)")
branch_name="rlm/${run_id}"

Step 2: Check Current Branch

current_branch=$(git branch --show-current)

if [ "$current_branch" = "main" ] || [ "$current_branch" = "master" ]; then
    # STOP - Require explicit consent
    echo "WARNING: Currently on $current_branch branch."
    echo "RLM Workflow requires isolated worktrees."
    echo ""
    read -p "Create worktree and switch to feature branch? (yes/no): " consent

    if [ "$consent" != "yes" ]; then
        echo "Aborted. Please run from a feature branch or consent to worktree creation."
        exit 1
    fi
fi

Step 3: Create Worktree with New Branch

# Determine full path
case $LOCATION in
  .worktrees|worktrees)
    path="$LOCATION/$run_id"
    ;;
  ~/.config/rlm-workflow/worktrees/*)
    path="~/.config/rlm-workflow/worktrees/$project/$run_id"
    ;;
esac

# Create worktree with new branch
git worktree add "$path" -b "$branch_name"
cd "$path"

Step 4: Run Project Setup

Auto-detect and run appropriate setup:

# Node.js
if [ -f package.json ]; then
    echo "Detected Node.js project"
    npm install
fi

# Rust
if [ -f Cargo.toml ]; then
    echo "Detected Rust project"
    cargo build
fi

# Python
if [ -f requirements.txt ]; then
    echo "Detected Python project (requirements.txt)"
    pip install -r requirements.txt
elif [ -f pyproject.toml ]; then
    echo "Detected Python project (pyproject.toml)"
    poetry install || pip install -e .
fi

# Go
if [ -f go.mod ]; then
    echo "Detected Go project"
    go mod download
fi

# Java/Maven
if [ -f pom.xml ]; then
    echo "Detected Maven project"
    mvn compile -q
fi

# Java/Gradle
if [ -f build.gradle ] || [ -f build.gradle.kts ]; then
    echo "Detected Gradle project"
    ./gradlew compileJava --quiet 2>/dev/null || gradlew compileJava --quiet 2>/dev/null
fi

# .NET
if [ -f *.csproj ] || [ -f *.sln ]; then
    echo "Detected .NET project"
    dotnet restore
fi

Step 5: Verify Clean Test Baseline

Run tests to ensure worktree starts clean:

# Detect test command and run
if [ -f package.json ]; then
    # Check for npm test script
    if grep -q '"test"' package.json; then
        echo "Running npm test..."
        npm test
    fi
elif [ -f Cargo.toml ]; then
    echo "Running cargo test..."
    cargo test
elif [ -f requirements.txt ] || [ -f pyproject.toml ]; then
    echo "Running pytest..."
    pytest -q || python -m pytest -q
elif [ -f go.mod ]; then
    echo "Running go test..."
    go test ./...
elif [ -f pom.xml ]; then
    echo "Running Maven tests..."
    mvn test -q
elif [ -f build.gradle ] || [ -f build.gradle.kts ]; then
    echo "Running Gradle tests..."
    ./gradlew test --quiet 2>/dev/null || gradlew test --quiet 2>/dev/null
elif [ -f *.csproj ] || [ -f *.sln ]; then
    echo "Running dotnet tests..."
    dotnet test --verbosity quiet
fi

If tests fail:

  • Report failures
  • Ask whether to proceed or investigate
  • Document decision in Phase 0 artifact

If tests pass:

  • Report baseline verified
  • Record test count and pass rate

Step 6: Record in Phase 0 Artifact

## Worktree Details

**Location:** `/full/path/to/.worktrees/run-id`
**Branch:** `rlm/run-id`
**Created from:** `main` (commit: abc123)
**Setup commands executed:**
- npm install
- npm test (47 passing, 0 failing)

**Baseline verified:** ✅

Main Branch Protection

Automatic Detection

When user invokes "Implement requirement 'run-id'" from main/master:

branch=$(git branch --show-current)

if [ "$branch" = "main" ] || [ "$branch" = "master" ]; then
    echo "╔════════════════════════════════════════════════════════════╗"
    echo "║  !   MAIN BRANCH PROTECTION                                ║"
    echo "╠════════════════════════════════════════════════════════════╣"
    echo "║  You are currently on the $branch branch.                  ║"
    echo "║                                                            ║"
    echo "║  RLM Workflow requires isolated worktrees to:             ║"
    echo "║  • Prevent accidental commits to production               ║"
    echo "║  • Enable parallel requirement development                ║"
    echo "║  • Maintain clean main branch history                     ║"
    echo "║                                                            ║"
    echo "║  Options:                                                  ║"
    echo "║  1. Create worktree (RECOMMENDED)                          ║"
    echo "║  2. Switch to existing feature branch                      ║"
    echo "║  3. Abort and run from feature branch                      ║"
    echo "╚════════════════════════════════════════════════════════════╝"
    echo ""

    # Default to worktree creation
    echo "Creating worktree by default (press Ctrl+C to abort)..."
    sleep 3
fi

Explicit Consent Required

If user explicitly requests main branch work:

## Main Branch Work Acknowledgment

User has explicitly requested to work on main branch.

**Acknowledged risks:**
- [ ] Commits go directly to production branch
- [ ] No isolation for this requirement
- [ ] Cannot run parallel requirements
- [ ] Harder to discard if abandoned

**Consent:** User has chosen to proceed on main branch
**Reason:** [user-provided reason]
**Recorded:** [timestamp]

**Recommendation:** Use worktrees for future requirements.

Phase 0 Artifact Template

File: /.codex/rlm/<run-id>/00-worktree.md

Run: `/.codex/rlm/<run-id>/`
Phase: `00 Worktree Setup`
Status: `DRAFT` | `LOCKED`
Inputs:
- Current git repository state
- User preference (for worktree location)
Outputs:
- `/.codex/rlm/<run-id>/00-worktree.md`
- Isolated worktree at `[location]`
Scope note: This document records isolated workspace setup and verifies clean test baseline.

## Directory Selection

**Convention checked:**
- [ ] `.worktrees/` exists
- [ ] `worktrees/` exists
- [ ] CLAUDE.md preference found
- [ ] User preference obtained

**Selected location:** `.worktrees/` (project-local, hidden)

## Safety Verification

**Gitignore check:**

$ git check-ignore -q .worktrees && echo "IGNORED" || echo "NOT IGNORED" IGNORED


**Result:** ✅ Directory is properly ignored

## Worktree Creation

**Command:**

git worktree add .worktrees/run-id -b rlm/run-id


**Output:**

Preparing worktree (new branch 'rlm/run-id') HEAD is now at abc1234 Previous commit message


**Branch created:** `rlm/run-id` **Location:** `/full/path/to/project/.worktrees/run-id`

## Project Setup

**Detected project type:** Node.js (package.json found)

**Commands executed:**

cd .worktrees/run-id npm install


**Output:**

added 472 packages in 8s


## Test Baseline Verification

**Command:**

npm test


**Results:**

- Total: 47 tests
- Passed: 47
- Failed: 0
- Skipped: 0

**Baseline:** ✅ Clean (all tests passing)

## Main Branch Protection

**Original branch:** `main` **Worktree branch:** `rlm/run-id` **Isolation:** ✅ Working in isolated worktree

## Traceability

- RLM process -> Isolated workspace established | Evidence: worktree at `.worktrees/run-id`

## Coverage Gate

- Worktree location selected following priority rules
- Directory verified as git-ignored (if project-local)
- Worktree created successfully on feature branch
- Project setup completed without errors
- Clean test baseline verified (all tests passing)
- Main branch protection confirmed (working in isolation)

Coverage: PASS / FAIL

## Approval Gate

- Isolated workspace ready for development
- No pending setup issues
- Ready to proceed to Phase 1/2

Approval: PASS / FAIL

LockedAt: `YYYY-MM-DDTHH:MM:SSZ` LockHash: `<sha256-hex>`

Integration with RLM

Phase 0 -> Phase 1 Transition

Phase 0 must be locked before proceeding:

  1. Verify worktree exists and is properly configured
  2. Check Phase 0 gates are PASS
  3. Lock Phase 0 artifact
  4. Proceed to Phase 1 (requirements already exist)
  5. All subsequent phases execute in worktree context

Worktree Context for All Phases

Once Phase 0 is complete:

  • All RLM commands run from worktree directory
  • Git operations target feature branch
  • Main branch remains untouched
  • Development is fully isolated

Phase 6/7 (Global Updates)

When updating global artifacts:

  1. Changes are made in worktree context
  2. Commits go to feature branch
  3. User merges feature branch to main when ready
  4. DECISIONS.md and STATE.md updates are part of the merge

Common Mistakes

Skipping ignore verification

  • Problem: Worktree contents get tracked, pollute git status
  • Fix: Always use git check-ignore before creating project-local worktree

Assuming directory location

  • Problem: Creates inconsistency, violates project conventions
  • Fix: Follow priority: existing > CLAUDE.md > ask

Proceeding with failing tests

  • Problem: Can't distinguish new bugs from pre-existing issues
  • Fix: Report failures, get explicit permission to proceed

Hardcoding setup commands

  • Problem: Breaks on projects using different tools
  • Fix: Auto-detect from project files (package.json, Cargo.toml, etc.)

Red Flags

Never:

  • Create worktree without verifying it's ignored (project-local)
  • Skip baseline test verification
  • Proceed with failing tests without asking
  • Assume directory location when ambiguous
  • Skip CLAUDE.md check
  • Work on main/master without explicit consent and documentation

Always:

  • Follow directory priority: existing > CLAUDE.md > ask
  • Verify directory is ignored for project-local
  • Auto-detect and run project setup
  • Verify clean test baseline
  • Create feature branch (rlm/run-id pattern)
  • Document worktree location in Phase 0 artifact

Quick Reference

SituationAction
.worktrees/ existsUse it (verify ignored)
worktrees/ existsUse it (verify ignored)
Both existUse .worktrees/
Neither existsCheck CLAUDE.md -> Ask user
Directory not ignoredAdd to .gitignore + commit
Tests fail during baselineReport failures + ask
On main/master branchCreate worktree (default)
User insists on mainDocument consent, proceed with caution
No package.json/Cargo.tomlSkip dependency install

Real-World Impact

From development sessions:

  • Before worktrees: 15% of requirements had accidental main branch commits
  • After worktrees: 0% accidental main branch commits
  • Parallel development: 3+ requirements can be worked simultaneously
  • Clean main branch: Production history is clean and linear
  • Easy discard: Abandoned requirements don't pollute main branch

References

  • REQUIRED: Use this skill for ALL RLM runs
  • TRIGGERS: At start of "Implement requirement 'run-id'"
  • OUTPUT: 00-worktree.md artifact + isolated worktree
  • NEXT: Continue with Phase 1 (requirements) in worktree context

平台分布

Codex

35.1%
按下载量换算38

Claude

28.88%
按下载量换算31

Cursor

20.09%
按下载量换算21

Gemini CLI

10.17%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills