create-new-task
Skill0 starsChanged 21 days agoMITView on GitHub
Create a new ADO Task under a parent PBI with intelligent defaults. Use this when asked to create a new task, work item, or ADO task — especially when already working on a feature or addressing PR feedback.
In this repository6 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- address-pr-commentsSkill
- apply-change-to-repo-hierarchySkill
- extract-learningsSkill
- run-coverageSkill
- watch-multiple-pr-statusSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 19 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 6
Create a new Azure DevOps Task as a child of a parent Product Backlog Item (PBI).
- Distinctive: line 14
Check if the current session already involves a work item:
- Distinctive: line 25
If one work item is linked: use it as the peer task and find its parent PBI (as in Strategy A.1)
- Distinctive: line 26
If multiple work items are linked: ask the user which work item the new task should peer with — do NOT guess
- Distinctive: line 27
If no work items are linked: fall through to Strategy B
- Distinctive: line 29
Session history: Check the session store for recent work item references:
- Distinctive: line 36
If no parent PBI can be inferred, ask the user:
- Distinctive: line 46
If it's a Task instead, find *its* parent PBI (walk up the hierarchy)
- Distinctive: line 47
If it's neither a PBI nor a Task, ask the user for clarification
- Distinctive: line 52
If the user provided a task title, use it
- Distinctive: line 53
If the user provided a prompt/description but no title, derive a concise title from the prompt
- Distinctive: line 56
If the user provided a prompt or description for the new task, place it in the task description field
- Distinctive: line 57
Use HTML format for the description (the ADO API default)
- Distinctive: line 58
If no prompt was provided, leave the description empty
- Very specific: line 67
Use ado-wit_add_child_work_items to create the task:
- Distinctive: line 84
After creating the task, report:
- Distinctive: line 102
Never guess the parent PBI: when multiple candidates exist — ask the user to disambiguate
- Distinctive: line 103
Peer tasks share a parent: when creating a task alongside an existing task, find the common parent PBI
- Distinctive: line 104
Prompts go in the description: if the user provides a prompt or instructions for the task, put it in the description field so it's captured …
- Distinctive: line 105
Validate the parent type: always confirm the parent is a PBI before creating the child task
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create a new Azure DevOps Task as a child of a parent Product Backlog Item (PBI). The task inherits Area Path and Iteration Path from the parent PBI.
Phase 1: Determine the Parent PBI
You need a parent PBI ID. Determine it using one of these strategies, in priority order:
Strategy A: Infer from Current Context
Check if the current session already involves a work item:
- Working on a task (e.g., "implement feature described in task 12345"):
- Fetch the task using
ado-wit_get_work_itemwithexpand: relations - Find the parent relation (
System.LinkTypes.Hierarchy-Reversewith name "Parent") - Extract the parent PBI ID from the relation URL (last segment of the URL path)
- The new task will be a peer of the current task (same parent PBI)
- Fetch the task using
- Addressing PR feedback (e.g., "address PR comments for PR #6789"):
- Fetch the PR using
ado-repo_get_pull_request_by_idwithincludeWorkItemRefs: true - Get the linked work item(s) from the PR
- If one work item is linked: use it as the peer task and find its parent PBI (as in Strategy A.1)
- If multiple work items are linked: ask the user which work item the new task should peer with — do NOT guess
- If no work items are linked: fall through to Strategy B
- Fetch the PR using
- Session history: Check the session store for recent work item references:
SELECT ref_value FROM session_refs WHERE ref_type = 'workitem' ORDER BY created_at DESC LIMIT 5;
Strategy B: Ask the User
If no parent PBI can be inferred, ask the user:
- "What is the parent PBI number for this new task?"
- Accept a PBI ID (number) or a full ADO URL (e.g.,
https://msazure.visualstudio.com/One/_workitems/edit/36748505) - Parse the PBI ID from the URL if a URL is provided
Validation
Once you have a candidate parent PBI ID:
- Fetch it with
ado-wit_get_work_item(includefields: ["System.WorkItemType", "System.AreaPath", "System.IterationPath", "System.Title"]) - Confirm
System.WorkItemTypeis"Product Backlog Item" - If it's a Task instead, find its parent PBI (walk up the hierarchy)
- If it's neither a PBI nor a Task, ask the user for clarification
Phase 2: Gather Task Details
Title
- If the user provided a task title, use it
- If the user provided a prompt/description but no title, derive a concise title from the prompt
Description
- If the user provided a prompt or description for the new task, place it in the task description field
- Use HTML format for the description (the ADO API default)
- If no prompt was provided, leave the description empty
Inherited Fields
From the parent PBI, extract and use:
- Area Path (
System.AreaPath) - Iteration Path (
System.IterationPath)
Phase 3: Create the Task
Use ado-wit_add_child_work_items to create the task:
Tool: ado-wit_add_child_work_items
Parameters:
project: <project from parent PBI's System.TeamProject>
parentId: <parent PBI ID>
workItemType: "Task"
items:
- title: <task title>
description: <task description or prompt, if any>
areaPath: <inherited from parent PBI>
iterationPath: <inherited from parent PBI>Phase 4: Report Results
After creating the task, report:
- The new task ID and title
- A link to the new task:
https://msazure.visualstudio.com/<project>/_workitems/edit/<task_id> - The parent PBI ID and title it was created under
- The inherited Area Path and Iteration Path
Example output:
Created Task #12345678: "Implement retry logic for blob storage"
Parent PBI #36748505: "Make MrBot better"
Area Path: One\AzureMessaging\Azure Messaging GeoReplication
Iteration: One\Custom\AzureMessaging\Krypton\KrM3
Link: https://msazure.visualstudio.com/One/_workitems/edit/12345678Key Principles
- Always inherit Area Path and Iteration Path from the parent PBI — never guess or use defaults
- Never guess the parent PBI when multiple candidates exist — ask the user to disambiguate
- Peer tasks share a parent: when creating a task alongside an existing task, find the common parent PBI
- Prompts go in the description: if the user provides a prompt or instructions for the task, put it in the description field so it's captured in ADO
- Validate the parent type: always confirm the parent is a PBI before creating the child task
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

