From lets
Internal skill for commands. Detect active beads task from git branch name. Do not trigger on user conversation - only when commands need task detection.
How this skill is triggered — by the user, by Claude, or both
Slash command
/lets:detect-taskThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Parse current git branch to find the active beads task ID. Used by commands that need to know which task is in progress.
Parse current git branch to find the active beads task ID. Used by commands that need to know which task is in progress.
IMPORTANT: If the spec below invokes any deferred tool (e.g.
AskUserQuestion), you MUST load and call it as specified. Never skip the call, never substitute a default answer of your own — the tool invocation is part of the contract. This is critical.
10+ commands need to detect the active task from branch name. This skill centralizes the logic so branch format changes are updated in one place.
BRANCH=$(git branch --show-current)
Extract beads task ID from branch name. Formats:
feature/<task-id>-<slug> - standard LETS branchesworktree-<task-id>-<slug> - worktree branchesworktree-<custom-name> - no task ID, use fallbackBeads ID pattern: <prefix>-<alphanum>[.<number>]
Examples: lets-abc, lets-abc.1, proj-xyz.42
If branch parse finds no ID:
bd list --status=in_progress --format=ids 2>/dev/null | head -1
If fallback returns multiple tasks - behavior depends on the caller:
The calling command specifies what to do when ambiguous.
Returns one of:
Internal skill used by most commands that need task detection.
See: grep -r "detect-task" commands/ for current usage.
npx claudepluginhub restarter/lets-workflow --plugin letsGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.