Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

wiql-queries

verified

Build and execute WIQL (Work Item Query Language) queries for Azure DevOps. Use when the user wants to query work items, find bugs, list tasks, search by assignee, filter by state, find items in a sprint, or build custom work item queries. Use when user mentions "query", "find work items", "list bugs", "my tasks", "assigned to", "in sprint", or "WIQL".

View on GitHub

Marketplace

ms-ado-az

JoshuaRamirez/ms-ado-az-claude-code-plugin

Plugin

ado-work-items

integrations

Repository

JoshuaRamirez/ms-ado-az-claude-code-plugin

skills/wiql-queries/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/JoshuaRamirez/ms-ado-az-claude-code-plugin/blob/main/skills/wiql-queries/SKILL.md -a claude-code --skill wiql-queries

Installation paths:

Claude
.claude/skills/wiql-queries/
Powered by add-skill CLI

Instructions

# WIQL Query Reference (Verified)

## CRITICAL LIMITATIONS - READ FIRST

1. **NO TOP CLAUSE** - WIQL does NOT support `SELECT TOP N` like SQL Server. Limit results with shell:
   ```bash
   az boards query --wiql "..." -o table | head -10
   ```

2. **Use explicit project name** - The `@project` macro is unreliable in CLI:
   ```sql
   -- UNRELIABLE:
   WHERE [System.TeamProject] = @project

   -- RELIABLE:
   WHERE [System.TeamProject] = 'YourProjectName'
   ```

3. **Only flat queries supported** - The CLI only supports flat queries, not tree/hierarchical queries.

4. **NO LIKE OPERATOR** - WIQL does NOT support SQL-style LIKE patterns. Use CONTAINS instead:
   ```sql
   -- DOES NOT WORK:
   WHERE [System.Title] LIKE '%keyword%'

   -- USE THIS INSTEAD:
   WHERE [System.Title] CONTAINS 'keyword'
   ```

5. **CANNOT ORDER BY System.Parent** - Sorting by parent ID is not supported:
   ```sql
   -- DOES NOT WORK:
   ORDER BY [System.Parent]

   -- WORKAROUND: Filter by parent IDs with IN clause, sort client-side
   WHERE [System.Parent] IN (1234, 1235, 1236) ORDER BY [System.Id]
   ```

## Basic Query Syntax

```bash
az boards query --wiql "SELECT [fields] FROM workitems WHERE [conditions]" -o table
```

## Verified Working Examples

### Query all work items in project
```bash
az boards query --wiql "SELECT [System.Id], [System.Title], [System.State] FROM workitems WHERE [System.TeamProject] = 'ProjectName'" -o table
```

### Query by state
```bash
az boards query --wiql "SELECT [System.Id], [System.Title] FROM workitems WHERE [System.State] = 'In Progress' AND [System.TeamProject] = 'ProjectName'" -o table
```

### Query by work item type
```bash
az boards query --wiql "SELECT [System.Id], [System.Title], [System.State] FROM workitems WHERE [System.WorkItemType] = 'Bug' AND [System.TeamProject] = 'ProjectName'" -o table
```

### Query by assignee
```bash
az boards query --wiql "SELECT [System.Id], [System.Title] FROM workitems WHERE [System.AssignedTo] = 'user@domai

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
5970 chars