discover-tasks
Use when user asks to \"discover tasks\", \"find next task\", \"prioritize issues\", \"what should I work on\", or \"list open issues\". Discovers and ranks tasks from GitHub, GitLab, local files, and custom sources.
npx skills add agent-sh/agentsys --skill discover-tasks --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# discover-tasks Discover tasks from configured sources, validate them, and present for user selection. ## When to Use Invoked during Phase 2 of `/next-task` workflow, after policy selection. Also usable standalone when the user wants to discover and select tasks from configured sources. ## Workflow ### Phase 1: Load Policy and Claimed Tasks ```javascript // Use relative path from skill directory to plugin lib // Path: skills/discover-tasks/ -> ../../lib/state/workflow-state.js const workflowState = require('../../lib/state/workflow-state.js'); const state = workflowState.readState(); const policy = state.policy; // Load claimed task IDs from registry (tasks[] contains worktree-manager claims) const tasksRegistry = workflowState.readTasks(); const claimedIds = new Set(tasksRegistry.tasks.map(t => t.id)); ``` ### Phase 2: Fetch Tasks by Source **Source types:** - `github` / `gh-issues`: GitHub CLI - `gh-projects`: GitHub Projects (v2 boards) - `gitlab`: GitLab CLI - `local` / `tasks-md`: Local markdown files - `custom`: CLI/MCP/Skill tool - `other`: Agent interprets description **GitHub Issues:** ```bash # Fetch with pagination awareness gh issue list --state open \ --json number,ti
- When to Use
- Workflow
- Phase 1: Load Policy and Claimed Tasks
- Phase 2: Fetch Tasks by Source
- Phase 2.5: Collect PR-Linked Issues (GitHub only)
- Phase 3: Filter and Score
- Phase 4: Present to User via AskUserQuestion
- Phase 5: Update State
- Phase 6: Post Comment (GitHub only)
- Output Format
- Error Handling
- Constraints
Fetch with pagination awareness gh issue list --state open \ glab issue list --state opened --output json --per-page 100 > /tmp/glab-issues.json for f in PLAN.md tasks.md TODO.md; do done Requires 'project' token scope. If permission error: gh auth refresh -s project gh project item-list "$PROJECT_NUMBER" --owner "$OWNER" --format json --limit 100 > /tmp/gh-project-items.json Only run when policy.taskSource?.source is 'github', 'gh-issues', or 'gh-projects' gh pr list --state open --json number,title,body,headRefName --limit 100 > /tmp/gh-prs.json Only run for GitHub sources (github, gh-issues, gh-projects). Use policy.taskSource?.source from Phase 1 to check.
What does the discover-tasks skill do?
Use when user asks to \"discover tasks\", \"find next task\", \"prioritize issues\", \"what should I work on\", or \"list open issues\". Discovers and ranks tasks from GitHub, GitLab, local files, and custom sources.
How do I install it?
Run `npx skills add agent-sh/agentsys --skill discover-tasks --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From agent-sh/agentsys, a repository with 923 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.