Propose the next ticket to work on. Queries Linear for unblocked, unstarted tickets assigned to you, ranks by priority, and presents top 3 options. Use when: "what should I work on", "next ticket", "pick a task", "what's next".
Run this first:
# Bootstrap: resolve LINEAR_SDLC_ROOT from this skill's symlink, then source
# the shared preamble (safe env loader + project detection + session tracking).
if [ -z "${LINEAR_SDLC_ROOT:-}" ]; then
for _c in "$HOME/.claude/skills/brainstorm/SKILL.md" \
"$HOME/.claude/skills/linear-sdlc-brainstorm/SKILL.md"; do
if [ -L "$_c" ]; then
LINEAR_SDLC_ROOT="$(cd "$(dirname "$(readlink "$_c")")/../.." && pwd)"
break
fi
done
[ -z "${LINEAR_SDLC_ROOT:-}" ] && LINEAR_SDLC_ROOT="$(lsdlc-config get source_dir 2>/dev/null || true)"
export LINEAR_SDLC_ROOT
fi
SKILL_NAME=next . "$LINEAR_SDLC_ROOT/references/preamble.sh"
# Learnings (skill-specific display)
_LEARN_FILE="$_PROJ/learnings.jsonl"
if [ -f "$_LEARN_FILE" ]; then
_LEARN_COUNT=$(wc -l < "$_LEARN_FILE" | tr -d ' ')
echo "LEARNINGS: $_LEARN_COUNT entries"
[ "$_LEARN_COUNT" -gt 0 ] && lsdlc-learnings-search --limit 3 2>/dev/null || true
else
echo "LEARNINGS: 0"
fi
echo "---"
Before suggesting new work, check if there's already something in flight via the bundled lsdlc-linear helper:
TEAM=$(lsdlc-config get linear_team_id)
[ -n "$TEAM" ] && TEAM_FLAG="--team $TEAM" || TEAM_FLAG=""
lsdlc-linear list-assigned $TEAM_FLAG --status "In Progress" --limit 10
The output is JSON with count and issues[]. If any exist, present them first:
You have work in progress:
- VER-42: Auth middleware refactor (In Progress)
Continue this work, or pick something new?
If user wants to continue, suggest /implement VER-42.
Fetch unstarted assigned tickets:
TEAM=$(lsdlc-config get linear_team_id)
[ -n "$TEAM" ] && TEAM_FLAG="--team $TEAM" || TEAM_FLAG=""
lsdlc-linear list-assigned $TEAM_FLAG --status "Todo,Backlog" --limit 20
Parse the JSON to extract identifier, title, priority, priorityLabel, state, labels, cycle, createdAt for ranking in Step 3:
lsdlc-linear list-assigned $TEAM_FLAG --status "Todo,Backlog" --limit 20 | node -e '
const data = JSON.parse(require("fs").readFileSync(0, "utf8"));
for (const i of data.issues) {
const labels = (i.labels?.nodes || []).map(l => l.name).join(",");
const cycle = i.cycle?.name || "";
console.log([i.identifier, i.priorityLabel, i.title, labels, cycle].join("\t"));
}
'
If user provides filters (project, cycle, label) in their prompt, narrow the results in your post-processing — Linear's filter syntax for these is more elaborate than the simple flags lsdlc-linear exposes.
If lsdlc-linear list-assigned returns non-zero (Linear unreachable, key
invalid), capture the failure and report BLOCKED with a recovery