azure-devops-workitem

Creates and updates Azure DevOps work items via REST API with UTF-8 and field mapping.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/heidgert/claude-skills --skill azure-devops-workitem-heidgert
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-devops-workitem
Source: https://github.com/heidgert/claude-skills/tree/main/azure-devops-workitem
Command: npx skills add https://github.com/heidgert/claude-skills --skill azure-devops-workitem-heidgert

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Creating or updating Azure DevOps work items from the command line often breaks on multi-line bodies, Swedish characters (å/ä/ö) getting mangled, and bodies written to the wrong field for the work-item type. This Skill runs a deterministic PowerShell script that talks to the Azure DevOps REST API directly, avoiding the known failures of the az boards CLI. ## Core Features & Use Cases - Create and update work items: Supports Bug, Product Backlog Item, Task, and User Story, routing the body to the correct field per type (e.g. ReproSteps for Bugs) via a configurable mapping. - UTF-8 safe and verifiable: Sends bodies as raw UTF-8 bytes without BOM, then re-fetches the item after writing to verify the content landed and warn on truncation. - Dry-run preview: Inspect the exact URL and JSON-Patch body (PAT redacted) before sending anything. - Use Case: From a repo, ask to file a bug with a multi-line Swedish description; the script finds .azuredevops.json, writes the body to ReproSteps, assigns the default user, and prints the work-item URL. ## Quick Start Ask the assistant to create an Azure DevOps bug titled "Login fails" with your repro steps as the body, running the script with -DryRun first to preview the request.

Frequently Asked Questions about azure-devops-workitem

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an Azure DevOps work item from PowerShell?

Run azdo-workitem.ps1 with -Action create, a -Type such as Bug or Product Backlog Item, a -Title, and a -Body. Use -DryRun first to preview the exact REST request, then re-run without it to send.

How do I update an existing Azure DevOps work item body?

Call the script with -Action update, the work item -Id, and the new -Body. You do not need to pass -Type on updates; the script fetches the item to learn its type and resolves the correct body field automatically.

Why use this instead of the az boards CLI?

The az CLI is known to truncate multi-line bodies, mangle Swedish characters (å/ä/ö), and write bodies to the wrong field. This script calls the REST API directly with raw UTF-8 bytes and a per-type body field mapping, avoiding those failures.

What configuration does the Azure DevOps script need?

It needs a .azuredevops.json file in the repo or an ancestor directory specifying org, project, the name of the PAT environment variable, default type, body field mapping, and default assignee. The PAT itself lives only in that environment variable with Work Items read/write scope.

Can I clear a work item field to empty with this script?

No. An empty string for -Body or -Title is treated as not provided, not as a clear instruction. Clearing a field to empty is not supported in this version.

Why does the script warn about body truncation after a successful write?

After writing, the script re-fetches the item and compares body lengths. Azure DevOps normalizes HTML on store, so small differences are normal; it only warns when less than 50% of the sent content landed, indicating possible truncation.