detect-task

detect-task is a skill for Claude Code from restarter/lets-workflow. It costs 41 tokens per session (4,805 once invoked), scanned A, original, MIT.

An internal helper that finds the active task by reading the task-state file or the current Git branch. A Git branch is a separate line of work in a repository.

In plain words
What is it for?
Use it indirectly when a command needs the current task ID for planning, implementation, worktrees, or reviews.
Why use it?
It gives other commands one consistent way to identify the task being worked on, even when different task trackers or branch naming styles are used.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the lets plugin — 20 skills, 26 commands, 16 agents shipped together

Good fit Use it indirectly when a command needs the current task ID for planning, implementation, worktrees, or reviews.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add restarter/lets-workflow
Claude Code
/plugin install lets

Made for: Claude Code.

Or install lets, the plugin that ships this one along with the rest of its 20 skills, 26 commands, 16 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for detect-task

README.md
[![agentmods](https://agentmods.dev/badge/skills/restarter/lets-workflow/detect-task/github.svg)](https://agentmods.dev/skills/restarter/lets-workflow/detect-task)
Your own site
<a href="https://agentmods.dev/skills/restarter/lets-workflow/detect-task"><img src="https://agentmods.dev/badge/skills/restarter/lets-workflow/detect-task/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for detect-task

Your own site · 80×15
<a href="https://agentmods.dev/skills/restarter/lets-workflow/detect-task"><img src="https://agentmods.dev/badge/skills/restarter/lets-workflow/detect-task.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,805 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 118
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.04805
Opus 5.5 $0.00016 $0.01922
Sonnet 5.5 $0.00008 $0.00961
Haiku 4.5 $0.00004 $0.00481

Measured 19d ago against content hash f7d6de4f0126, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

detect-task scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/lets/skills/detect-task/SKILL.md · 201 lines

How it starts

The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Detect Active Task

Parse the task-state file / current git branch to find the active task ID (tracker-adapter-aware). 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

Go reads the branch against the active tracker's convention (the adapter's ## Worktree id: / branch: / worktree-branch:, overridable per key by the user's board file) - markdown never matches an id regex by eye:

lets worktree info --json --task-candidate --plugin-root "${CLAUDE_PLUGIN_ROOT}"

Take task_candidate.id when task_candidate.source is created - a branch: / worktree-branch: match is this branch's task by construction. reason=no_match or detached_head -> the name carries no id; go on (Step 2 fallback). For the branch=<ref> variant, add --ref-file (see Optional arguments) - Go reads the ref from that file, so an untrusted ref is never typed into a shell.

reason=convention_undeclared / convention_declaration_invalid, or no lets binary - parse the branch name (git branch --show-current) by the shapes below, unchanged. 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

The <task-id> shape is TRACKER-DEPENDENT (the id sits immediately after feature/ or worktree-, up to the first -<slug> boundary):

  • beads: <prefix>-<alphanum>[.<number>] - e.g. lets-abc, lets-abc.1, proj-xyz.42
  • a numeric-id tracker: a pure-numeric id - e.g. 48647, so feature/48647-<slug>
  • other adapters: the tracker's own id shape

Read the full file on GitHub · 201 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago Changed · +2 lines f7d6de4f0126
  2. 1mo ago Changed · +22 lines 335baee45bc7
  3. 1mo ago Changed · +46 lines 8a9468bb6395
  4. 1mo ago First seen · 131 lines · 41 tokens per session scan A 8d0346ed08d8

Subscribe to this mod's changes

detect-task is a skill published in the GitHub repository restarter/lets-workflow (17 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 4,805 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

fix

Read this repo's open issues, triage them, and open one pull request per issue that can be fixed without a judgement call. Issues that need a decision, or that look stale or superseded, are reported with a recommendation rather than guessed at.

Jebel-Quant/rhiza-claude · 51 tokens

watch-pr

Watch a GitHub pull request for CI status, reviews, comments, merge conflicts, and terminal states using the gh-watch extension. Use when the user wants to monitor a PR, wait for CI, or track PR progress.

justincampbell/gh-watch · 48 tokens

diff-summary

Structured triage of a git diff. One call replaces the per-file Read sweep an agent normally does to figure out which files in a diff are tests, which touch the public API, which are migrations, which need careful review.

osouthgate/agent-plus · 109 tokens

gh-find-prs

Survey open Codewhale PRs and triage each for mergeability and disposition against the real landing branch.

Hmbown/CodeWhale · 27 tokens

git

Git and code hosting platform management — GitHub, GitLab, Codeberg, Forgejo. Zero barrier — install x-cmd and manage repos from the terminal. Use for "git", "github", "gitlab", "repo", "pull request", "code hosting".

x-cmd/x-cmd · 58 tokens

pr-threads-address

Address PR review feedback by systematically working through every unresolved PR review thread on the current branch's PR - analyze each comment, make the requested code changes (with tests where useful), commit, and optionally reply and resolve.

posit-dev/skills · 48 tokens