Skip to content

Split azure-devops-cli SKILL.md into samller files#841

Open
fondoger wants to merge 2 commits intogithub:stagedfrom
fondoger:fondoger/ado-skill-update
Open

Split azure-devops-cli SKILL.md into samller files#841
fondoger wants to merge 2 commits intogithub:stagedfrom
fondoger:fondoger/ado-skill-update

Conversation

@fondoger
Copy link

@fondoger fondoger commented Feb 28, 2026

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, agent, skill, or workflow file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, or workflow with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.

Goal

The existing azure-devops-cli/skill/SKILL.md is too large. By separating it to smaller files, the agents can efferently load a partial of the skill, which not only saves tokens, but also helps AI to focus.

Structure

The original monolithic SKILL.md (2,466 lines) has been split into a compact main file with on-demand reference files to save tokens.

skills/azure-devops-cli/
├── SKILL.md                              (93 lines - basics + routing table)
└── references/
    ├── repos-and-prs.md                  (Repositories, PRs, Git refs, branch policies)
    ├── pipelines-and-builds.md           (Pipelines, runs, builds, releases, artifacts)
    ├── boards-and-iterations.md          (Work items, area paths, iterations)
    ├── variables-and-agents.md           (Pipeline variables, variable groups, agents)
    ├── org-and-security.md               (Projects, teams, users, permissions, wikis, admin)
    ├── advanced-usage.md                 (Output formats, JMESPath queries, global args)
    └── workflows-and-patterns.md         (Workflows, best practices, scripting patterns)

Only SKILL.md is loaded when the skill triggers. Reference files are read on demand based on the user's task.

Token Estimation

Estimated using ~1 token per 4 characters (English text approximation).

Scenario Loaded content ~Tokens
Before (monolithic) Full SKILL.md (55KB, 2,466 lines) ~14,000
After (always loaded) Compact SKILL.md (3.9KB, 93 lines) ~1,000
After (typical task) SKILL.md + 1 reference file ~2,500 - 4,500

Most tasks only need 1-2 reference files, saving 60-90% tokens compared to loading everything upfront.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • Update to existing instruction, prompt, agent, plugin, skill, or workflow.
  • Other (please specify):

Additional Notes


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Copilot AI review requested due to automatic review settings February 28, 2026 09:37
@fondoger
Copy link
Author

@aaronpowell, @AungMyoKyaw, please review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Splits the previously monolithic skills/azure-devops-cli/SKILL.md into a compact entrypoint plus domain-focused reference documents, so agents can load only the relevant content on demand.

Changes:

  • Replaced the large SKILL.md with a shorter overview plus a routing table to reference docs.
  • Added seven new reference markdown files under skills/azure-devops-cli/references/ covering major Azure DevOps CLI domains.
  • Updated docs/README.skills.md to list the newly bundled reference assets for azure-devops-cli.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
skills/azure-devops-cli/SKILL.md Slimmed main skill file; added authentication snippet and reference routing table
skills/azure-devops-cli/references/repos-and-prs.md New reference for Azure Repos/PRs/policies examples
skills/azure-devops-cli/references/pipelines-and-builds.md New reference for Pipelines, runs, builds, releases, artifacts
skills/azure-devops-cli/references/boards-and-iterations.md New reference for Boards work items, area paths, iterations
skills/azure-devops-cli/references/variables-and-agents.md New reference for pipeline variables, variable groups, agents/pools/queues
skills/azure-devops-cli/references/org-and-security.md New reference for projects, teams/users, permissions, wikis, admin
skills/azure-devops-cli/references/advanced-usage.md New reference for output formats, --query usage, global args, aliases
skills/azure-devops-cli/references/workflows-and-patterns.md New reference for automation workflows, scripting/idempotency patterns
docs/README.skills.md Lists the new reference files as bundled assets for the skill

Comment on lines +125 to +126
# Extract with defaults
az pipelines show --id $PIPELINE_ID --query "{Name:name, Folder:folder || 'Root', Description:description || 'No description'}"
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These examples rely on query features that Azure CLI’s JMESPath typically doesn’t support (e.g., format_datetime(...) and the ternary enabled ? 'Enabled' : 'Disabled'). As written, they’re likely to fail when users copy/paste them. Please switch to supported JMESPath constructs or show a jq-based post-processing alternative after --output json.

Suggested change
# Extract with defaults
az pipelines show --id $PIPELINE_ID --query "{Name:name, Folder:folder || 'Root', Description:description || 'No description'}"
# Extract with defaults using jq after JSON output
az pipelines show --id $PIPELINE_ID --output json \
| jq '{Name:.name, Folder:(.folder // "Root"), Description:(.description // "No description")}'

Copilot uses AI. Check for mistakes.
Comment on lines +26 to +27
# Login with PAT token
az devops login --organization https://dev.azure.com/{org} --token YOUR_PAT_TOKEN
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The authentication example passes the PAT directly on the command line (--token YOUR_PAT_TOKEN), which is likely to be captured in shell history/process listings. Prefer documenting a safer pattern (e.g., AZURE_DEVOPS_EXT_PAT env var + az devops login, or piping the token via stdin) and avoid showing tokens in CLI arguments.

Suggested change
# Login with PAT token
az devops login --organization https://dev.azure.com/{org} --token YOUR_PAT_TOKEN
# Login with PAT token using environment variable (recommended)
export AZURE_DEVOPS_EXT_PAT=YOUR_PAT_TOKEN
az devops login --organization https://dev.azure.com/{org}

Copilot uses AI. Check for mistakes.
Comment on lines +454 to +455
while IFS=',' read -r vg_name variables; do
ensure_variable_group "$vg_name" "$variables"
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sync_variable_groups reads variables as a single comma-separated string (per the config.csv example), then passes it as one argument to ensure_variable_group. az pipelines variable-group create --variables ... expects space-separated key=value pairs, so the comma-separated format (and single-argument pass-through) will likely fail. Either parse the CSV into individual key=value args (and call ensure_variable_group with multiple args), or change the documented config format to match what the CLI expects.

Suggested change
while IFS=',' read -r vg_name variables; do
ensure_variable_group "$vg_name" "$variables"
while IFS=',' read -r vg_name vars; do
# Convert comma-separated key=value pairs into a space-separated list
local formatted_vars=${vars//,/ }
ensure_variable_group "$vg_name" $formatted_vars

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants