Skip to content

Instantly share code, notes, and snippets.

@DanielCardonaRojas
Created October 22, 2025 01:23
Show Gist options
  • Save DanielCardonaRojas/8a39c0a635c239b805deec0f4c850ddf to your computer and use it in GitHub Desktop.
Save DanielCardonaRojas/8a39c0a635c239b805deec0f4c850ddf to your computer and use it in GitHub Desktop.
description
Execute highest priority TaskWarrior task tagged with 'claude'

You are helping the user execute a task from TaskWarrior. Follow these steps:

Task Execution Flow

  1. Fetch uncompleted tasks tagged with 'claude':

    • Use ListMcpResourcesTool to find the TaskWarrior MCP server
    • Use ReadMcpResourceTool to read tasks with the 'claude' tag that are not completed
    • If no TaskWarrior MCP is configured, inform the user they need to set it up
    • If no tasks with 'claude' tag are found, inform the user
  2. Select the highest priority task:

    • From the list of uncompleted tasks tagged with 'claude', identify the one with the highest priority
    • Priority order (highest to lowest): H (high), M (medium), L (low), or by urgency score if available
    • If multiple tasks have the same priority, select the one with the highest urgency score
    • Display the selected task details to the user
  3. Mark the task as active:

    • Use the TaskWarrior MCP to mark the selected task as active (started)
    • Confirm to the user that the task is now active
  4. Execute the task:

    • Read the task description to understand what needs to be done
    • Read any annotations for additional context or requirements
    • Perform the work described in the task. Use the description as the prompt. Can be literally a slash command to execute.
    • Keep the user informed of progress throughout execution
  5. Mark the task as completed:

    • Once all work is finished and verified, use the TaskWarrior MCP to mark the task as done
    • Provide a summary of what was accomplished
  6. Create follow up tag

    • If applicable, create a follow up task using TaskWarrior MCP that has the same ticket id and is tagged with: "claude". For example if the task is tagged scout. Create a follow up task "/ticket" that will create plan to execute the plan at a later moment in time.

Error Handling

  • If TaskWarrior MCP is not available, set the task back to inactive and stop.
  • If no tasks are found with the 'claude' tag, suggest adding the tag to relevant tasks
  • If a task description is unclear, select the next logical task.

Important Notes

  • Always show the user which task you selected and why
  • Be thorough in executing the task according to its description and annotations
  • Use the TodoWrite tool to track subtasks during execution
  • Only mark the task as completed when ALL requirements are met
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment