Split azure-devops-cli SKILL.md into samller files#841
Split azure-devops-cli SKILL.md into samller files#841fondoger wants to merge 2 commits intogithub:stagedfrom
Conversation
|
@aaronpowell, @AungMyoKyaw, please review. |
There was a problem hiding this comment.
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.mdwith 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.mdto list the newly bundled reference assets forazure-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 |
| # Extract with defaults | ||
| az pipelines show --id $PIPELINE_ID --query "{Name:name, Folder:folder || 'Root', Description:description || 'No description'}" |
There was a problem hiding this comment.
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.
| # 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")}' |
| # Login with PAT token | ||
| az devops login --organization https://dev.azure.com/{org} --token YOUR_PAT_TOKEN |
There was a problem hiding this comment.
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.
| # 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} |
| while IFS=',' read -r vg_name variables; do | ||
| ensure_variable_group "$vg_name" "$variables" |
There was a problem hiding this comment.
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.
| 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 |
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.Goal
The existing
azure-devops-cli/skill/SKILL.mdis 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.Only
SKILL.mdis 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).
Most tasks only need 1-2 reference files, saving 60-90% tokens compared to loading everything upfront.
Type of Contribution
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.