Azure DevOps Pipelines logging-command guidance for reliable script-to-agent signaling, variable passing, and log UX. Use when writing or debugging `##vso[...]` and `##[...]` commands in YAML/Bash/PowerShell pipelines, troubleshooting output variable scope, handling secrets and masking behavior, or publishing summaries/artifacts from scripts. Pair with `azuredevops-pipelines-template` when template architecture and logging semantics are both in scope.
Install with Tessl CLI
npx tessl i github:jjjermiah/dotagents --skill azuredevops-pipelines-logging100
Does it follow best practices?
Validation for skill structure
Produce correct, debuggable Azure DevOps logging commands from scripts without silent parser failures. Ensure variable flow, task outcomes, and log readability work predictably across jobs and stages.
azuredevops-pipelines-templateUse both skills together for full pipeline quality:
azuredevops-pipelines-template decides compile-time structure, typed
template contracts, and PR-versus-main topology.azuredevops-pipelines-logging implements script-level state signaling:
task.setvariable, task.logissue, task.complete, summaries, and tags.Treat Azure DevOps script output as two distinct families:
log-formatting commands: ##[...] lines that only change how logs look.agent-action commands: ##vso[...] lines that change pipeline state.When deciding a command, classify intent first:
##[...] only.##vso[...].Use exact command formats only:
##vso[area.action property=value;...]message##[group|warning|error|section|debug|command|endgroup]messageUse absolute paths for file-based commands (uploadsummary, uploadfile,
artifact/build upload commands).
Do not emit logging commands while Bash xtrace is enabled (set -x). Disable
around the command, then restore.
Never print secrets directly. Use environment variables and masking commands. Assume secret substrings are not masked.
For values that may contain %, \n, \r, ;, or ], escape first.
echo (Bash) or Write-Host (PowerShell).task.setvariableUse this when value may include newline, carriage return, or percent.
escape_azdo_value() {
local data="$1"
data="${data//'%'/'%AZP25'}"
data="${data//$'\n'/'%0A'}"
data="${data//$'\r'/'%0D'}"
printf '%s' "$data"
}
echo "##vso[task.setvariable variable=myVar;isOutput=true]$(escape_azdo_value "$VALUE")"{ set +x; } 2>/dev/null
echo "##vso[task.setvariable variable=buildFlavor;]release"
set -xisOutput: read as $(myVar) in later steps.isOutput=true: set task name and read as $(TaskName.myVar).dependencies.<job>.outputs['<task>.<var>'].stageDependencies.<stage>.<job>.outputs['<task>.<var>'].task.logissue type=error to surface actionable message.task.complete result=Failed; for explicit task status when needed.##[...])Use these for human-readable logs only. They do not modify pipeline variables, build number, artifacts, or task result.
##[group] / ##[endgroup]: collapsible log block.##[section]: visual section marker.##[warning] / ##[error]: highlighted log lines.##[debug]: diagnostics line.##[command]: show the command being run.##vso[...])Use these when you need side effects in pipeline state.
task.setvariable / task.setsecret: variable and secret handling.task.logissue: timeline warning/error metadata.task.complete: explicit task result.task.setprogress: progress indicator updates.task.uploadsummary / task.uploadfile: publish summary or files.task.prependpath: update PATH for downstream steps.build.updatebuildnumber / build.addbuildtag: build metadata updates.##[...].##vso[...].When this skill is used, respond with:
azuredevops-pipelines-template.a8e2aab
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.