Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

linear-worktreeLinear 工作树

Agent Skill

用于处理 Linear 项目、Issue、团队、周期和产品开发任务流。它适合让 Agent 辅助查询任务状态、整理需求队列、创建缺陷或汇总迭代进展。使用时需要确认 workspace、team、label、assignee 和状态流转规则;涉及批量创建或修改任务时,应先核对字段和目标团队,避免把草稿需求直接写入正式项目。

总安装

1,350

周安装

58

GitHub Stars

33

下载量

473
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/mblode/agent-skills --skill linear-worktree

简介

将 Linear Issue 映射为 Git worktree,实现任务级代码隔离与开发。

  • 适用于并行开发多个功能或修复,避免分支合并冲突。
  • 每个 Issue 独立目录结构,便于专注编码并及时同步任务状态。
  • 需确保本地 Git 仓库空间充足,并正确关联 Issue ID 与分支命名。
  • linear-worktree 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

linear-worktree

Creates a git worktree from main for a Linear issue as a sibling directory of the current repo.

Copy and track this checklist:

Worktree creation progress:
- [ ] Step 1: Resolve REPO_ROOT / REPO_NAME / REPOS_BASE
- [ ] Step 2: Parse input into ISSUE_ID and BRANCH
- [ ] Step 3: git fetch origin main
- [ ] Step 4: git worktree add at $REPOS_BASE/$REPO_NAME-$ISSUE_ID
- [ ] Step 5: Report worktree path, branch, and cd command with resolved paths

Setup

Resolve three variables:

  1. Inside a git repo (most common): REPO_ROOT = git rev-parse --show-toplevel, REPO_NAME = its basename, REPOS_BASE = its parent directory.
  2. Not inside a git repo but config.json has repos_base: use that as REPOS_BASE. Ask the user which repo folder.
  3. Neither: ask for the full repo path.

Inputs

The user provides one of:

  • Linear URL: https://linear.app/myteam/issue/ABC-58/add-dark-mode-toggle
  • Copy as prompt: ABC-58 Add dark mode toggle to settings page
  • Issue ID only: ABC-58

Parsing

All parsing produces two values: ISSUE_ID (lowercased) and BRANCH (id + slug).

From URL

  1. Extract issue ID from the path segment after /issue/ISSUE_ID = abc-58
  2. Last path segment becomes the slug → BRANCH = abc-58-add-dark-mode-toggle

From copy as prompt

  1. First token is the issue ID → ISSUE_ID = abc-58
  2. Slugify the rest: lowercase, spaces to -, strip backticks/parentheses/.../quotes/#/@, collapse consecutive hyphens, trim leading/trailing hyphens
  3. BRANCH = abc-58-<slug>

Example: ABC-58 Add dark mode toggle (don't break "light" default)abc-58-add-dark-mode-toggle-dont-break-light-default

From issue ID only

Lowercase the ID → ISSUE_ID = abc-58. Slugify any description the user provides for the branch, otherwise BRANCH = abc-58.

Worktree Creation

git -C $REPO_ROOT fetch origin main

git -C $REPO_ROOT worktree add \
  -b $BRANCH \
  $REPOS_BASE/$REPO_NAME-$ISSUE_ID \
  main

This creates a worktree at $REPOS_BASE/$REPO_NAME-$ISSUE_ID (e.g. /Users/you/Code/myrepo-abc-58) — a sibling of the main repo, not inside it.

After Creation

Tell the user the worktree path, branch name, and cd command using actual resolved paths:

Worktree: /Users/you/Code/myrepo-abc-58
Branch:   abc-58-add-dark-mode-toggle
Run:      cd /Users/you/Code/myrepo-abc-58

Edge Cases and Gotchas

  • Branch exists but not checked out: drop -b — use git worktree add $REPOS_BASE/$REPO_NAME-$ISSUE_ID $BRANCH.
  • Branch checked out in another worktree: do not --force. Run git worktree list and tell the user to cd to the existing worktree.
  • Directory already exists: confirm with user before removing — may be a forgotten worktree.
  • Always fetch first: git fetch origin main before git worktree add, or the worktree gets a stale base.
  • Sibling, not child: worktree path is next to $REPO_ROOT, never inside it.
  • "Create a branch" means worktree: use git worktree add, not git checkout -b.
  • Always end with cd: the worktree is useless if the user stays in the original repo.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.92%
按下载量换算160

Claude

29.59%
按下载量换算140

Cursor

19.42%
按下载量换算92

Gemini CLI

8.53%
按下载量换算40

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills