Work

From x-cmd/x-cmd · View interactive version

Work is an AI agent skill from the GitHub repository x-cmd/x-cmd. Handle issue/PR work items with worktree isolation. Triggered by "/work [issue_link|description]" to start focused work.

How to use this skill

Skill file

Work Handler

Trigger

Use when:

Steps

Step 1: Parse Input

/work [issue_link or pr_link or natural_description]

Step 2: Fetch Context (for links)

gh issue view <number> --json title,body,labels
gh pr view <number> --json title,body,labels,files

Step 3: Create Worktree

SLUG="$(echo "$TITLE" | tr '[:upper:]' '[:lower:]' | tr ' ' '-' | tr -cd 'a-z0-9_-')"
BRANCH_NAME="work/$(date +%Y%m%d)-${SLUG}"
git worktree add -b "$BRANCH_NAME" "$WORKTREE_PATH"

Step 4: Report

Created worktree: $BRANCH_NAME
Location: $WORKTREE_PATH
Issue: $TITLE (#$NUMBER)

Step 5: Exit Guidance

When work done:

Constraints

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.