$npx -y skills add microsoft/azure-devops-skills --skill work-iterationsList, create, and assign iterations for Azure DevOps projects and teams.
| 1 | # Skill Instructions |
| 2 | |
| 3 | This skill always works in the context of a **project**. A **team** is optional and only required when assigning iterations or listing iterations for a specific team. |
| 4 | |
| 5 | ## Project selection |
| 6 | |
| 7 | - If the user **provides a project name** in their request (for example, "for Contoso"), use that project directly and **do not call** `core_list_projects`. |
| 8 | - If the user **does not provide a project name**, first ask the user once to provide the project name. |
| 9 | - If the project name is **still not provided after asking once**, call `core_list_projects` to return a list of projects the user can choose from. |
| 10 | |
| 11 | ## Team selection |
| 12 | |
| 13 | - If the **team is not provided**, only perform actions that require **project-only context** (list or create project-level iterations). Do **not** attempt to assign iterations. |
| 14 | - If the user asks to **assign iterations** and **no team is provided**, ask once for the team name. |
| 15 | - If the team name is **still not provided after asking once**, call `core_list_project_teams` for the selected project so the user can pick a team. |
| 16 | |
| 17 | # Tools |
| 18 | |
| 19 | Use Azure DevOps MCP Server tools for all interactions with Azure DevOps. |
| 20 | |
| 21 | - `core_list_projects`: Get a list of projects in the organization. |
| 22 | - `core_list_project_teams`: Get a list of teams for a project. |
| 23 | - `work_iteration_write` (action: `create`): Create iterations in the project. |
| 24 | - `work_iteration_write` (action: `assign`): Assign iterations to a team. |
| 25 | - `work` (action: `list_team_iterations`): List iterations currently assigned to a team. |
| 26 | - `work` (action: `list_iterations`): List iterations for the project. |
| 27 | |
| 28 | # Rules |
| 29 | |
| 30 | ## 1. List iterations for a project |
| 31 | |
| 32 | - When the user asks **only to list iterations for a project**, call `work` with action `list_iterations` for that project. |
| 33 | - Do **not** call `work_iteration_write` in this case. |
| 34 | - Show the results in a list, including iteration name and dates. |
| 35 | - If there are no iterations, explicitly state that there are no iterations for this project. |
| 36 | |
| 37 | ### Example |
| 38 | |
| 39 | - "list iterations for project Contoso" |
| 40 | |
| 41 | ## 2. List iterations for a project and team |
| 42 | |
| 43 | - When the user asks to **list iterations for a specific project and team**, call `work` with action `list_team_iterations` for the given project and team. |
| 44 | - Do **not** call `work_iteration_write` in this case. |
| 45 | - Show the results in a list, including iteration name and dates. |
| 46 | - If there are no iterations, explicitly state that there are no iterations for this team. |
| 47 | |
| 48 | ### Example |
| 49 | |
| 50 | - "list iterations for project Contoso and team Contoso" |
| 51 | |
| 52 | ## 3. Create iterations for a project |
| 53 | |
| 54 | - When the user asks to **create iterations** for a project, use the tool `work_iteration_write` with action `create`. |
| 55 | - First, call `work` with action `list_iterations` to get the full list of current iterations and determine the existing date cadence (start and finish dates, and iteration length). |
| 56 | - Using that cadence, create new iterations and pass them to `work_iteration_write` with action `create`. |
| 57 | - After creation, show the new iterations in a list, including iteration name and dates. |
| 58 | - If no iterations are created, explicitly state that no iterations were created for this project. |
| 59 | |
| 60 | ### Example 1 |
| 61 | |
| 62 | - "create iterations after the last available iteration, using the same cadence, through 2026" |
| 63 | |
| 64 | - Call `work` with action `list_iterations` to get the full list of current iterations and determine the existing date cadence. |
| 65 | - Using that date cadence, create new iterations and pass them to `work_iteration_write` with action `create`. |
| 66 | |
| 67 | ### Example 2 |
| 68 | |
| 69 | - "create iterations after the last available iteration, using the same cadence, through 2026. Then assign all of those new iterations to team 'Contoso Team'" |
| 70 | |
| 71 | - Call `work` with action `list_iterations` to get the full list of current iterations and determine the existing date cadence. |
| 72 | - Using that date cadence, create new iterations and pass them to `work_iteration_write` with action `create`. |
| 73 | - Take the iterations created and assign them to the team "Contoso Team" using `work_iteration_write` with action `assign`. |
| 74 | - Show the created iterations (and, if helpful, note that they are assigned to the specified team). |
| 75 | |
| 76 | ## 4. Assign iterations to a team |
| 77 | |
| 78 | - When the user asks to **assign iterations to a team**, use `work_iteration_write` with action `assign`. |
| 79 | - Make sure the project and team are selected using the rules above. |
| 80 | - Show the iterations that were assigned in a list, including iteration name and dates. |
| 81 | - If no iterations are assigned, explicitly state that there are no iterations assigned for this team. |
| 82 | |
| 83 | ### Example 1 |
| 84 | |
| 85 | - "assign iterations 'Iteration 1', 'Iteration 2', and 'Iteration 3' to team 'Contoso Team'" |
| 86 | |
| 87 | - Call `work_iteration_write` with action `assign` with the list of iterations and team name to assign those iterations to the team. |
| 88 | |
| 89 | ### Example 2 |
| 90 | |
| 91 | - "assign all iterations in 2025 and 2026 to team 'Contoso |