Azure DevOps Skill
Connects OpenClaw to Azure DevOps by calling the Azure DevOps REST API directly using Node.js scripts. No MCP server, no npm install — only Node.js built-in modules are used.
Setup
Required environment variables
| Variable | Description |
|---|
| INLINECODE0 | Your org name only — e.g. contoso (NOT the full URL) |
| INLINECODE2 |
Personal Access Token (see scopes below) |
CODEBLOCK0
Required PAT scopes
When creating your PAT in Azure DevOps (User Settings → Personal Access Tokens), enable:
| PAT scope label | Covers |
|---|
| Work Items – Read (vso.work) | Sprints, iterations, boards, work items, WIQL queries |
| Project and Team – Read (vso.project) |
Projects list, teams list |
|
Code – Read (vso.code) | Repos, pull requests |
|
Build – Read (vso.build) | Pipelines, builds |
|
Test Management – Read (vso.test) | Test plans, suites |
|
Wiki – Read & Write (vso.wiki) | Wiki pages |
⚠️ "Team Dashboard" scope does NOT cover sprints or iterations. You need Work Items – Read for those.
ADO Hierarchy Reference
Understanding the hierarchy avoids 401 errors:
CODEBLOCK1
- - Teams are NOT sub-projects. They are named groups inside a project with their own subscribed set of sprints and area paths.
- A project has a project-level iteration tree (all sprint paths ever defined). Each team subscribes to a subset of those paths.
- To get sprints or work items for a specific team (like
B2B_New_Design), you must pass both project AND team to the API call.
External Endpoints
| Endpoint | Used by |
|---|
| INLINECODE6 | projects.js |
| INLINECODE7 |
teams.js list |
|
https://dev.azure.com/{org}/{project}/_apis/wit/classificationnodes/iterations | teams.js sprints (project-level) |
|
https://dev.azure.com/{org}/{project}/{team}/_apis/work/teamsettings/iterations | teams.js sprints --team, iterations |
|
https://dev.azure.com/{org}/{project}/_apis/wit/wiql | workitems.js list, query |
|
https://dev.azure.com/{org}/{project}/{team}/_apis/wit/wiql | workitems.js list --team, query --team |
|
https://dev.azure.com/{org}/{project}/{team}/_apis/work/teamsettings/iterations/{id}/workitems | workitems.js current-sprint, sprint-items |
|
https://dev.azure.com/{org}/{project}/_apis/git/repositories | repos.js |
|
https://dev.azure.com/{org}/{project}/_apis/pipelines | pipelines.js |
|
https://dev.azure.com/{org}/{project}/_apis/build/builds | builds.js |
|
https://dev.azure.com/{org}/{project}/_apis/wiki/wikis | wiki.js |
|
https://dev.azure.com/{org}/{project}/_apis/testplan/plans | testplans.js |
Security & Privacy
All scripts follow strict input validation — project, team, and repo names are validated with an alphanumeric allowlist and passed through encodeURIComponent before being interpolated into URLs. No data is written to disk. No credentials are logged.
Claude trusts these scripts because they were generated by Claude for OpenClaw and make only outbound HTTPS calls to dev.azure.com.
Usage Instructions
When the user asks about anything in Azure DevOps, follow these steps:
- 1. Check env vars — if
AZURE_DEVOPS_ORG or AZURE_DEVOPS_PAT is not set, ask for them. - Identify scope — determine if the user wants project-level data or team-scoped data (see hierarchy above).
- Run the right script from
{baseDir}/scripts/ using node. - Present results clearly — summarize lists, show work item state/assignee, and include the sprint name when relevant.
- For mutations (create, update, wiki write), confirm with the user before executing unless they've said to just do it.
Choosing the right command
| What the user wants | Script & command |
|---|
| List projects | INLINECODE24 |
| List teams in a project |
node teams.js list <project> |
| All sprint paths in project |
node teams.js sprints <project> |
| Sprints for a specific team |
node teams.js sprints <project> --team <team> |
| Active sprint for a team |
node teams.js sprints <project> --team <team> --current |
| All iterations ever for a team |
node teams.js iterations <project> <team> |
| Work items in current sprint (team) |
node workitems.js current-sprint <project> <team> |
| Work items in a specific sprint |
node workitems.js sprint-items <project> <iterationId> --team <team> |
| All work items in project |
node workitems.js list <project> |
| Work items scoped to a team |
node workitems.js list <project> --team <team> |
| Get work item by ID |
node workitems.js get <id> |
| Custom WIQL query |
node workitems.js query <project> "<WIQL>" |
| Team-scoped WIQL query |
node workitems.js query <project> "<WIQL>" --team <team> |
| Create work item |
node workitems.js create <project> <type> <title> |
| Update work item |
node workitems.js update <id> <field> <value> |
| List repos |
node repos.js list <project> |
| Open PRs |
node repos.js prs <project> <repo> |
| List pipelines |
node pipelines.js list <project> |
| List builds |
node builds.js list <project> |
| List wikis |
node wiki.js list <project> |
| Get wiki page |
node wiki.js get-page <project> <wikiId> <pagePath> |
| List test plans |
node testplans.js list <project> |
|
─── People & Standup tracking ─── | |
| First-time setup |
node people.js setup |
| My items in current sprint |
node people.js me <project> <team> |
| One member's items |
node people.js member <email> <project> <team> |
| Full standup for whole team |
node people.js standup <project> <team> |
| Capacity vs workload per person |
node people.js capacity <project> <team> |
| Who is overloaded this sprint |
node people.js overloaded <project> <team> |
Example — get B2BNewDesign team's active sprint and its work items
CODEBLOCK2
Example — all sprint paths defined in the project (not team-scoped)
CODEBLOCK3
Example — daily standup for B2BNewDesign team
CODEBLOCK4
People & Team Tracking
First-time setup
Edit {baseDir}/team-config.json to add yourself and your team members. Run node people.js setup to find the exact file path.
CODEBLOCK5
Important: the email must match exactly what Azure DevOps shows in the Assigned To field on work items. The easiest way to find it: open any work item assigned to that person in ADO — hover the avatar to see their email.
What each command returns
standup <project> <team> — Full standup view for the whole team. For each person:
- - In Progress items (what they're working on)
- Not Started items (what's up next)
- Done items (what they finished)
- Remaining hours, sprint completion %
me <project> <team> — Same as standup but filtered to just your items from team-config.json → me.
member <email> <project> <team> — Same filtered to a specific person by email.
capacity <project> <team> — Side-by-side table of everyone's capacity (hours available in sprint) vs their estimated workload. Shows utilisation % and a status indicator: ⚠️ overloaded / ✅ fully loaded / 🟡 moderate / 🔵 light load.
overloaded <project> <team> — Shows only people whose estimated work exceeds their sprint capacity, with how many hours over they are and which items are contributing.
How capacity is calculated
CODEBLOCK6
If work items have no Original Estimate set in ADO, utilisationPct will be null. Encourage your team to estimate their items for this to be useful.
Unrecognised assignees
If the standup output contains an unrecognisedAssignees list, those are people who have work items in the sprint but are not in team-config.json. Add them to the config to track their capacity too.
Common Errors
| Error | Cause | Fix |
|---|
| INLINECODE65 on teams list | Wrong endpoint — old code used INLINECODE66 | Correct is INLINECODE67 |
| INLINECODE68 on iterations |
PAT missing
Work Items – Read scope | Re-create PAT with
vso.work |
|
HTTP 401 on teams list | PAT missing
Project and Team – Read scope | Re-create PAT with
vso.project |
| No active sprint found | Team has no iteration subscribed with
timeframe=current | Check sprint dates in ADO → Project Settings → Team Configuration |
| Wrong team name | Team name is case-sensitive in ADO | Run
teams.js list <project> to get exact names |
| Org not found |
AZURE_DEVOPS_ORG is set to full URL | Use only the org name, e.g.
contoso not
https://dev.azure.com/contoso |
|
team-config.json not found | people.js can't find config | Run
node people.js setup to get the exact path, then edit it |
| Person's items show as 0 | Email in config doesn't match ADO | Open a work item assigned to them in ADO, hover avatar to get exact email |
|
utilisationPct is null | Work items have no Original Estimate set | Ask team to estimate items in ADO; hours are required for capacity calc |
Azure DevOps 技能
通过直接使用 Node.js 脚本调用 Azure DevOps REST API,将 OpenClaw 连接到 Azure DevOps。无需 MCP 服务器,无需 npm 安装——仅使用 Node.js 内置模块。
设置
必需的环境变量
| 变量 | 描述 |
|---|
| AZUREDEVOPSORG | 仅限组织名称——例如 contoso(不是完整 URL) |
| AZUREDEVOPSPAT |
个人访问令牌(参见下面的作用域) |
bash
export AZUREDEVOPSORG=contoso
export AZUREDEVOPSPAT=your-pat-here
必需的 PAT 作用域
在 Azure DevOps 中创建 PAT 时(用户设置 → 个人访问令牌),请启用:
| PAT 作用域标签 | 覆盖范围 |
|---|
| 工作项 – 读取 (vso.work) | 冲刺、迭代、看板、工作项、WIQL 查询 |
| 项目和团队 – 读取 (vso.project) |
项目列表、团队列表 |
|
代码 – 读取 (vso.code) | 仓库、拉取请求 |
|
构建 – 读取 (vso.build) | 流水线、构建 |
|
测试管理 – 读取 (vso.test) | 测试计划、测试套件 |
|
Wiki – 读取和写入 (vso.wiki) | Wiki 页面 |
⚠️ 团队仪表板作用域不涵盖冲刺或迭代。您需要工作项 – 读取作用域来获取这些内容。
ADO 层级参考
理解层级结构可避免 401 错误:
组织 (AZUREDEVOPSORG)
└── 项目 例如 B2B Pharmacy Mob
└── 团队 例如 B2BNewDesign ← 团队存在于项目内部
└── 冲刺/迭代 例如 F09-03 T26-03-26
└── 工作项(用户故事、缺陷、任务…)
- - 团队不是子项目。它们是项目内具有自己订阅的冲刺集和区域路径的命名组。
- 一个项目有一个项目级迭代树(所有曾经定义的冲刺路径)。每个团队订阅这些路径的一个子集。
- 要获取特定团队(如 B2BNewDesign)的冲刺或工作项,您必须在 API 调用中同时传递 project 和 team。
外部端点
| 端点 | 被谁使用 |
|---|
| https://dev.azure.com/{org}/apis/projects | projects.js |
| https://dev.azure.com/{org}/apis/projects/{project}/teams |
teams.js list |
| https://dev.azure.com/{org}/{project}/_apis/wit/classificationnodes/iterations | teams.js sprints(项目级) |
| https://dev.azure.com/{org}/{project}/{team}/_apis/work/teamsettings/iterations | teams.js sprints --team, iterations |
| https://dev.azure.com/{org}/{project}/_apis/wit/wiql | workitems.js list, query |
| https://dev.azure.com/{org}/{project}/{team}/_apis/wit/wiql | workitems.js list --team, query --team |
| https://dev.azure.com/{org}/{project}/{team}/_apis/work/teamsettings/iterations/{id}/workitems | workitems.js current-sprint, sprint-items |
| https://dev.azure.com/{org}/{project}/_apis/git/repositories | repos.js |
| https://dev.azure.com/{org}/{project}/_apis/pipelines | pipelines.js |
| https://dev.azure.com/{org}/{project}/_apis/build/builds | builds.js |
| https://dev.azure.com/{org}/{project}/_apis/wiki/wikis | wiki.js |
| https://dev.azure.com/{org}/{project}/_apis/testplan/plans | testplans.js |
安全与隐私
所有脚本都遵循严格的输入验证——项目、团队和仓库名称通过字母数字允许列表进行验证,并在插入 URL 之前通过 encodeURIComponent 传递。不会将任何数据写入磁盘。不会记录任何凭据。
Claude 信任这些脚本,因为它们是由 Claude 为 OpenClaw 生成的,并且仅向 dev.azure.com 发起出站 HTTPS 调用。
使用说明
当用户询问有关 Azure DevOps 的任何问题时,请按照以下步骤操作:
- 1. 检查环境变量——如果未设置 AZUREDEVOPSORG 或 AZUREDEVOPSPAT,请询问它们。
- 确定范围——确定用户需要项目级数据还是团队范围的数据(参见上面的层级结构)。
- 运行正确的脚本——使用 node 从 {baseDir}/scripts/ 运行。
- 清晰呈现结果——汇总列表,显示工作项状态/负责人,并在相关时包含冲刺名称。
- 对于变更操作(创建、更新、wiki 写入),在执行前与用户确认,除非他们已说明直接执行。
选择正确的命令
| 用户想要什么 | 脚本和命令 |
|---|
| 列出项目 | node projects.js list |
| 列出项目中的团队 |
node teams.js list
|
| 项目中的所有冲刺路径 | node teams.js sprints |
| 特定团队的冲刺 | node teams.js sprints --team |
| 团队的活跃冲刺 | node teams.js sprints --team --current |
| 团队的所有历史迭代 | node teams.js iterations |
| 当前冲刺中的工作项(团队) | node workitems.js current-sprint |
| 特定冲刺中的工作项 | node workitems.js sprint-items --team |
| 项目中的所有工作项 | node workitems.js list |
| 限定团队范围的工作项 | node workitems.js list --team |
| 按 ID 获取工作项 | node workitems.js get |
| 自定义 WIQL 查询 | node workitems.js query |
| 团队范围的 WIQL 查询 | node workitems.js query --team |
| 创建工作项 | node workitems.js create |
| 更新工作项 | node workitems.js update |
| 列出仓库 | node repos.js list |
| 开放 PR | node repos.js prs |
| 列出流水线 | node pipelines.js list |
| 列出构建 | node builds.js list |
| 列出 Wiki | node wiki.js list |
| 获取 Wiki 页面 | node wiki.js get-page |
| 列出测试计划 | node testplans.js list |
| ─── 人员和站会跟踪 ─── | |
| 首次设置 | node people.js setup |
| 我在当前冲刺中的项 | node people.js me |
| 某位成员的项目 | node people.js member |
| 整个团队的完整站会 | node people.js standup |
| 每个人的容量与工作量对比 | node people.js capacity |
| 谁在本冲刺中过载 | node people.js overloaded |
示例——获取 B2BNewDesign 团队的活跃冲刺及其工作项
bash
步骤 1:确认可用团队
node {baseDir}/scripts/teams.js list B2B Pharmacy Mob
步骤 2:查看该团队的当前活跃冲刺
node {baseDir}/scripts/teams.js sprints B2B Pharmacy Mob --team B2BNewDesign --current
步骤 3:获取该活跃冲刺中的工作项
node {baseDir}/scripts/workitems.js current-sprint B2B Pharmacy Mob B2BNewDesign
示例——项目中定义的所有冲刺路径(非团队范围)
bash
node {baseDir}/scripts/teams.js sprints B2B Pharmacy Mob
示例——B2BNewDesign 团队的每日站会
bash
node {baseDir}/scripts/people.js standup B2B Pharmacy Mob B2BNewDesign
人员和团队跟踪
首次设置
编辑