agentleFS
TJaenichenTJaenichen/claude-code-harness/skills/project/devops-wiki-update/SKILL.md

devops-wiki-update

Skill0 starsChanged 3 months agoMITView on GitHub

Update Azure DevOps wiki page (handles ETag, Mermaid syntax)

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Update a wiki page in Azure DevOps.

    line 17
  2. Distinctive:

    Ask the user what content should go on the wiki page.

    line 43
  3. Very specific:

    No markdown formatting (bold) inside node labels

    line 75
  4. Very specific:

    No HTML tags (<br/>) inside node labels

    line 76
  5. Distinctive:

    Use plain text labels and add detailed descriptions below the diagram

    line 78
  6. Distinctive:

    If ETag doesn't match (412 error): Someone else edited the page, fetch new ETag and retry

    line 88
  7. Distinctive:

    If page doesn't exist (404): Use POST instead of PUT to create it

    line 89

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Update Azure DevOps Wiki Page

Arguments: $ARGUMENTS

Expected format: <wiki-name> <page-path> Example: Team%20Wiki /Architecture%20Overview

Your task

Update a wiki page in Azure DevOps. This requires getting the current ETag (for optimistic concurrency), then updating with the new content.

Important notes

  • URL-encode spaces in wiki/page names (%20)
  • versionDescriptor.versionType=branch and versionDescriptor.version=main are required
  • If-Match header with ETag is required for existing pages

Process

Step 1: Get current page and ETag

$wikiName = "<WIKI_NAME>"
$pagePath = "/<PAGE_PATH>"
$baseUrl = "https://devops.example.com/DefaultCollection/MyProject/_apis/wiki/wikis/$wikiName/pages"

$response = Invoke-WebRequest -Uri "$baseUrl`?path=$pagePath&api-version=6.0&includeContent=true" -UseDefaultCredentials
$etag = $response.Headers.ETag
$currentContent = ($response.Content | ConvertFrom-Json).content
Write-Output "ETag: $etag"
Write-Output "Current content: $currentContent"

Step 2: Ask for new content

Ask the user what content should go on the wiki page.

Step 3: Update the page

$body = @{ content = "# Page Title`n`nContent here..." } | ConvertTo-Json -Depth 5

Invoke-RestMethod -Uri "$baseUrl`?path=$pagePath&api-version=6.0&versionDescriptor.versionType=branch&versionDescriptor.version=main" -Method Put -Body $body -ContentType "application/json" -Headers @{ "If-Match" = $etag } -UseDefaultCredentials

Mermaid Diagrams - Azure DevOps Syntax

Azure DevOps uses different syntax than standard markdown for Mermaid:

Correct (Azure DevOps):

::: mermaid
flowchart TB
    A[Start] --> B[End]
:::

Wrong (standard markdown - won't render):

```mermaid
flowchart TB
    A[Start] --> B[End]
```

Mermaid limitations in Azure DevOps

  • No markdown formatting (**bold**) inside node labels
  • No HTML tags (<br/>) inside node labels
  • classDef styling may not work - keep diagrams simple
  • Use plain text labels and add detailed descriptions below the diagram

Common wikis

WikiURL-encoded name
Team WikiTeam%20Wiki

Error handling

  • If ETag doesn't match (412 error): Someone else edited the page, fetch new ETag and retry
  • If page doesn't exist (404): Use POST instead of PUT to create it

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.