← ClaudeAtlas

detect-tasklisted

Internal skill for commands. Detect active beads task from git branch name. Do not trigger on user conversation - only when commands need task detection.
restarter/lets-workflow · ★ 6 · Code & Development · score 78
Install: claude install-skill restarter/lets-workflow
# Detect Active Task 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. ## Why This Exists 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. ## Detection Flow ### Step 1: Parse Branch Name ```bash BRANCH=$(git branch --show-current) ``` Extract beads task ID from branch name. Formats: - `feature/<task-id>-<slug>` - standard LETS branches (main repo) - `worktree-<task-id>-<slug>` - worktree branches created via `/lets:worktree create` in new-branch mode (the LETS convention) - `worktree-<custom-name>` - worktree branch without an embedded task ID; use fallback - any other shape (e.g. `feature/foo`, `bugfix/bar`) - attached existing branch via `/lets:worktree create --attach`; no task ID in the name; use fallback Beads ID pattern: `<prefix>-<alphanum>[.<number>]` Examples: `lets-abc`, `lets-abc.1`, `proj-xyz.42` ### Step 2: Fallback If branch parse finds no ID: ```bash bd list --status=in_progress --format=ids 2>/dev/null | head -1 ``` ### Explicit task-id argument (resolve-and-claim) When the **calling command was invoked with an explicit `<task-