Efficiently update multiple Azure DevOps work items at once. Use when the user wants to update many work items, bulk state changes, mass updates, batch operations, or update work items in a loop. Use when user mentions "bulk", "batch", "multiple items", "all tasks", "update several", or "mass update".
/plugin marketplace add JoshuaRamirez/ms-ado-az-claude-code-plugin/plugin install ado-work-items@ms-ado-azThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Direct bash for loops are approximately 10x faster than sub-agents for bulk operations.
This is because:
-o none to skip JSON parsing# Update multiple work items to same state
for id in 1858 1859 1860; do
az boards work-item update --id $id --state "Done" -o none && echo "Updated $id"
done
# Query IDs then update each
ids=$(az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.State] = 'Active' AND [System.TeamProject] = 'ProjectName'" -o tsv | cut -f1)
for id in $ids; do
az boards work-item update --id $id --state "Resolved" -o none && echo "Updated $id"
done
for id in 1001 1002 1003; do
az boards work-item update --id $id --assigned-to "user@domain.com" -o none && echo "Assigned $id"
done
for id in 1001 1002 1003; do
az boards work-item update --id $id --fields "Microsoft.VSTS.Common.Priority=1" -o none && echo "Updated priority for $id"
done
for id in 1001 1002 1003; do
az boards work-item update --id $id --discussion "Reviewed in sprint planning" -o none && echo "Commented on $id"
done
Use -o none to suppress JSON output when you don't need the response:
# With output (slower)
az boards work-item update --id 1234 --state "Done" -o json
# Without output (faster)
az boards work-item update --id 1234 --state "Done" -o none
for id in 1001 1002 1003; do
az boards work-item update --id $id --state "Done" -o none 2>/dev/null && echo "OK: $id" || echo "FAIL: $id"
done
for id in 1001 1002 1003; do
az boards work-item update --id $id --state "Done" -o none || { echo "Failed on $id"; break; }
echo "Updated $id"
done
failed_ids=""
for id in 1001 1002 1003; do
if ! az boards work-item update --id $id --state "Done" -o none 2>/dev/null; then
failed_ids="$failed_ids $id"
fi
done
[ -n "$failed_ids" ] && echo "Failed IDs:$failed_ids"
az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE ..." --output table | tail -n +3 | wc -l
Note: tail -n +3 skips the header rows in table output.
count=$(az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.State] = 'Active' AND [System.TeamProject] = 'ProjectName'" -o tsv | wc -l)
echo "Will update $count items"
# SLOW - spawns sub-agent for each item
# Avoid patterns that create new agent instances per item
# SLOW - full JSON parsing with extra extraction
for id in 1001 1002 1003; do
az boards work-item update --id $id --state "Done" --query "id" -o tsv # Unnecessary if you already know the ID
done
# FAST - suppress output
for id in 1001 1002 1003; do
az boards work-item update --id $id --state "Done" -o none && echo "Updated $id"
done
For very large batches, consider parallel execution with background jobs:
# Run updates in parallel (use with caution - may hit rate limits)
for id in 1001 1002 1003 1004 1005; do
az boards work-item update --id $id --state "Done" -o none &
done
wait
echo "All updates complete"
Caution: Parallel execution may hit Azure DevOps API rate limits. Use sparingly.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.