AgentSkillsCN

whats-next

寻找下一项合乎逻辑的工作。当用户输入 /whats-next,或询问接下来该做些什么,又或是希望获得下一项任务的推荐时,可使用此工具。

SKILL.md
--- frontmatter
name: whats-next
description: Find the next logical piece of work. Use when user types /whats-next or asks what they should work on next, or wants recommendations for the next task.

What's Next Workflow

When activated, execute this workflow to recommend the next issue to work on:

Steps

  1. Check current branch: Determine if we're on a feature branch and extract the issue number if present.

  2. Check for active cycles: Query Linear for the team's active cycle:

    json
    {"action": "graphql", "graphql": "query { teams { nodes { key activeCycle { id name issues { nodes { id identifier title state { name } priority } } } } } }"}
    

    If an active cycle exists, prioritize issues from that cycle.

  3. Get recent completed work: Query Linear for recently completed issues to understand work patterns:

    json
    {"action": "graphql", "graphql": "query { issues(filter: {team: {key: {eq: \"BT\"}}, state: {name: {in: [\"Done\", \"In Review\"]}}}, orderBy: updatedAt, first: 10) { nodes { id identifier title labels { nodes { name } } parent { identifier title } } } }"}
    
  4. Check git history: Review recent commits to understand what areas were recently worked on:

    bash
    git log --oneline -20 --format="%s" | grep -oE "BT-[0-9]+" | sort -u | head -5
    
  5. Find candidate issues: Query Linear for backlog issues that are ready to work on:

    json
    {"action": "graphql", "graphql": "query { issues(filter: {team: {key: {eq: \"BT\"}}, state: {name: {in: [\"Backlog\", \"Ready\"]}}}, orderBy: priority, first: 20) { nodes { id identifier title description priority state { name } labels { nodes { name } } parent { identifier title } children { nodes { identifier state { name } } } relations { nodes { type relatedIssue { identifier state { name } } } } } } }"}
    
  6. Prioritize issues: Score and rank issues based on:

    • Active cycle membership (highest priority if cycle is active)
    • agent-ready label (fully specified, can start immediately)
    • Priority level (1=Urgent, 2=High, 3=Medium, 4=Low)
    • Blocking relationships (issues that unblock others get priority)
    • Relatedness to recent work (same parent issue, similar area)
    • Dependencies satisfied (all blocking issues are Done)
  7. Present recommendations: Display the top 3-5 recommended issues with:

    • Issue identifier and title
    • Priority and state
    • Why it's recommended (cycle, related to recent work, unblocks others, etc.)
    • Any blockers that need resolution first
  8. Optional: Start work: Ask the user if they want to start on the top recommended issue (which would run the /next-issue workflow for that specific issue).

Scoring Logic

ConditionPoints
In active cycle+50
Has agent-ready label+30
Related to recently completed work (same parent or area)+20
Unblocks other issues+15
Priority 1 (Urgent)+10
Priority 2 (High)+5
Has unresolved blocking dependencies-100
Has needs-spec label (requires human input first)-50
Has blocked label-20