Work
ProductivityworkWork is an Agent Skill for productivity published in the x-cmd/x-cmd repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Handle issue/PR work items with worktree isolation. Triggered by "/work [issue_link|description]" to start focused work.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/x-cmd/x-cmd/blob/HEAD/mod/slash/lib/preset/work/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/work, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Work Handler
Trigger
Use when:
- User says
/workwith an issue/PR link or description - User wants to start focused, isolated work
Steps
Step 1: Parse Input
/work [issue_link or pr_link or natural_description]
- Link: Parse number, fetch title/body
- Description: Use as branch name basis
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:
git commitin worktree- Merge via PR or
git worktree remove
Constraints
- Use slugified branch names:
work/YYYYMMDD-short-description - If URL provided (not issue/PR), fetch and summarize, then ask user how to proceed
- Do NOT auto-commit