Official agent skill

AI Docs Submit

by MicrosoftDocs in MicrosoftDocs/windows-driver-docs-ddi

Submit generated WDK DDI API reference documentation as a PR to the wdk-ddi repo.

OfficialCC-BY-4.0Auto-check passedDevelopment

Install AI Docs Submit

skills CLI
$ npx skills add MicrosoftDocs/windows-driver-docs-ddi --skill ai-docs-submit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MicrosoftDocs/windows-driver-docs-ddi ai-docs-submit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MicrosoftDocs/windows-driver-docs-ddi.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/3-ai-docs-submit .claude/skills/ai-docs-submit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ai-docs-submit
GitHub stars
316
Token cost
~2.8k tokens
SKILL.md length
962 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
CC-BY-4.0

At a glance

Submit generated WDK DDI API reference documentation as a PR to the wdk-ddi repo.

  • Works in 12 steps: Strip the .h extension from the… → Resolve the user alias for branch naming… → Resolve paths. The user provides the CSV… → …
  • : submitting docs
  • SKILL.md covers Parameters, Prerequisites and Procedure
  • Calls az; reaches dev.azure.com

What it does

AI Docs Submit is an agent skill from MicrosoftDocs/windows-driver-docs-ddi, published by the product's own GitHub organization. Submit generated WDK DDI API reference documentation as a PR to the wdk-ddi repo. Use when: submitting docs, creating a PR for DDI docs, pushing documentation changes.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: The official Windows Driver Kit DDI reference documentation sources. The licence is CC-BY-4.0.

When your agent uses it

  • : submitting docs
  • Creating a PR for DDI docs
  • Pushing documentation changes

Example prompts

  • “/ai-docs-submit”

Workflow steps

12 steps, taken from the first numbered list in SKILL.md.

  1. Strip the .h extension from the user-provided header name to get {header} (e.g. soundwireclass.h → soundwireclass).
  2. Resolve the user alias for branch naming ({user-alias}). The alias identifies who is submitting the PR, not who owns the APIs. Try these…
  3. Resolve paths. The user provides the CSV path. Derive the working and output directories
  4. Verify the output directory exists and contains files
  5. Obtain ADO auth token. Try Azure CLI first, then fall back to prompting for a PAT
  6. Get the latest commit SHA on main. This is required as the oldObjectId for the push
  7. Determine change type for each file. Check which files already exist on main to set the correct changeType (add vs edit)
  8. Build the push payload. Read each output file, base64-encode its content, and create the change entries
  9. Generate the commit message. Use the CSV entries to list the API entity names
  10. Pause for human review. Display
  11. Create or locate the branch. This step MUST be completed separately before the push in step 11. The branch must exist and point to a real…
  12. Push the commit to the branch. The oldObjectId in refUpdates MUST be $branchSha (which equals $mainSha for a newly created branch). This…

What it can do on your machine

Read from SKILL.md and the folder at commit 7515063. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • az

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • dev.azure.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

AI Docs Submit loads about 2.8k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 962 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MicrosoftDocs/windows-driver-docs-ddi at commit 7515063, republished under its CC-BY-4.0 licence (© MicrosoftDocs). 962 words, ~2,807 tokens.

Download SKILL.mdSave it as .claude/skills/ai-docs-submit/SKILL.md (or your agent's skills folder).
name
ai-docs-submit
description
Submit generated WDK DDI API reference documentation as a PR to the wdk-ddi repo. Use when: submitting docs, creating a PR for DDI docs, pushing documentation changes.
argument-hint
Specify a header name (e.g. soundwireclass) and the path to the CSV file. The output\ subfolder next to the CSV must contain generated docs.

Submit DDI Docs

Submit generated API reference documentation as a pull request to the wdk-ddi Azure DevOps repo using the ADO REST API.

No local repo clone required. Branch creation, file push, and PR creation are all done via the ADO REST API.

Parameters

ParameterValue
Header NameProvided by the user (e.g. soundwireclass)
CSV PathProvided by the user at any local path
Working DirectoryDerived from CSV path (parent folder of the CSV file)
Output Directory{working_dir}\output\
ADO Orghttps://dev.azure.com/cpubwin
ADO Projectdrivers
Docs Repowdk-ddi
Target Branchmain
Source BranchAuto-generated as {user-alias}/{header}-update (e.g. brbenefield/soundwireclass-update)
User AliasAuto-detected from CSV Owner column, $env:USERNAME, or az account show

Prerequisites

  • The output folder {working_dir}\output\ must contain generated documentation files (from the ai-docs-generate skill).
  • Tip: To run all three steps (inventory → generate → submit) with no interaction, use the ai-docs-autopilot skill instead.
  • Azure CLI (az) should be available for auth token acquisition. If not, the agent will prompt for an ADO Personal Access Token (PAT) once per session (scope: Code Read+Write, Pull Request Contribute).

Procedure

  1. Strip the .h extension from the user-provided header name to get {header} (e.g. soundwireclass.h → soundwireclass).

  2. Resolve the user alias for branch naming ({user-alias}). The alias identifies who is submitting the PR, not who owns the APIs. Try these sources in order and use the first non-empty value: a. The Windows username: $env:USERNAME. b. The Azure CLI identity: az account show --query user.name -o tsv, extracting the alias portion before @.

  3. Resolve paths. The user provides the CSV path. Derive the working and output directories:

    powershell
    $csvPath = "{user-provided CSV path}"
    if (-not (Test-Path $csvPath)) {
        Write-Error "CSV not found at $csvPath."
        return
    }
    $workingDir = Split-Path $csvPath -Parent
    $outputDir = Join-Path $workingDir "output"
    $entries = Import-Csv $csvPath

    If the CSV does not exist, inform the user and stop. Use the CSV entries to identify the API entities for the commit message and PR description.

  4. Verify the output directory exists and contains files:

    powershell
    $outputFiles = Get-ChildItem -Path $outputDir -Filter "*.md" -ErrorAction SilentlyContinue
    if (-not $outputFiles -or $outputFiles.Count -eq 0) {
        Write-Error "No generated docs found in $outputDir. Run ai-docs-generate first."
        return
    }
  5. Obtain ADO auth token. Try Azure CLI first, then fall back to prompting for a PAT:

    powershell
    try {
        $token = (az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv 2>$null)
        if (-not $token) { throw "No token" }
        $headers = @{ Authorization = "Bearer $token"; "Content-Type" = "application/json" }
    } catch {
        $pat = Read-Host "Enter ADO PAT (scope: Code Read+Write, PR Contribute)"
        $base64 = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$pat"))
        $headers = @{ Authorization = "Basic $base64"; "Content-Type" = "application/json" }
    }
    $adoBase = "https://dev.azure.com/cpubwin/drivers/_apis/git/repositories"
  6. Get the latest commit SHA on main. This is required as the oldObjectId for the push:

    powershell
    $refs = Invoke-RestMethod -Uri "$adoBase/wdk-ddi/refs?filter=heads/main&api-version=7.0" -Headers $headers
    $mainSha = $refs.value[0].objectId
  7. Determine change type for each file. Check which files already exist on main to set the correct changeType (add vs edit):

    powershell
    $mainFiles = Invoke-RestMethod -Uri "$adoBase/wdk-ddi/items?scopePath=wdk-ddi-src/content/{header}/&recursionLevel=OneLevel&versionDescriptor.version=main&versionDescriptor.versionType=branch&api-version=7.0" -Headers $headers
    $existingNames = $mainFiles.value | ForEach-Object { Split-Path $_.path -Leaf }
  8. Build the push payload. Read each output file, base64-encode its content, and create the change entries:

    powershell
    $changes = @()
    foreach ($file in $outputFiles) {
        $contentBytes = [System.IO.File]::ReadAllBytes($file.FullName)
        $base64Content = [Convert]::ToBase64String($contentBytes)
        $repoPath = "/wdk-ddi-src/content/{header}/$($file.Name)"
        $changeType = if ($file.Name -in $existingNames) { "edit" } else { "add" }
        $changes += @{
            changeType = $changeType
            item = @{ path = $repoPath }
            newContent = @{
                content = $base64Content
                contentType = "base64encoded"
            }
        }
    }
  9. Generate the commit message. Use the CSV entries to list the API entity names:

    Add/update API reference docs for {header}.h
    
    Documented {N} API entities:
    - {ApiName1} ({type})
    - {ApiName2} ({type})
    ...
    
    AI-assisted content generation.
  10. Pause for human review. Display:

    • List of files to be pushed with their change types (add / edit)
    • Total file count
    • The generated commit message
    • The target branch name: {user-alias}/{header}-update

    Prompt the user to confirm before proceeding.

  11. Create or locate the branch. This step MUST be completed separately before the push in step 11. The branch must exist and point to a real commit on main before any push is attempted.

    CRITICAL — Orphan commit prevention: The oldObjectId used in the push (step 11) determines the parent commit of the new commit. If oldObjectId is set to 0000000000000000000000000000000000000000 (all zeros), the ADO pushes API creates an orphan root commit with no parent. The resulting commit tree will contain ONLY the files in the changes array — all other repository files will appear as deletions in any PR diff. NEVER use all-zeros as oldObjectId in the pushes API. Always use $mainSha or the branch's current commit SHA.

    First, check if the branch already exists:

    powershell
    $branchRef = Invoke-RestMethod -Uri "$adoBase/wdk-ddi/refs?filter=heads/{user-alias}/{header}-update&api-version=7.0" -Headers $headers
    if ($branchRef.value.Count -gt 0) {
        # Branch exists — use its current SHA
        $branchSha = $branchRef.value[0].objectId
    } else {
        # Create the branch via the refs API (JSON array body)
        $createBranchPayload = "[{`"name`":`"refs/heads/{user-alias}/{header}-update`",`"oldObjectId`":`"0000000000000000000000000000000000000000`",`"newObjectId`":`"$mainSha`"}]"
        $refResult = Invoke-RestMethod -Uri "$adoBase/wdk-ddi/refs?api-version=7.0" -Method Post -Headers $headers -Body $createBranchPayload
        $branchSha = $refResult.value[0].newObjectId
    }

    Important: The POST /refs endpoint requires the body to be a JSON array, not an object. Using ConvertTo-Json on a single hashtable wraps it in an {} object, which the API rejects. Either manually construct the JSON string or wrap the hashtable in @(...) and verify the output is [{...}].

    Validate that $branchSha is a real commit SHA (40 hex chars, not all zeros) before proceeding:

    powershell
    if (-not $branchSha -or $branchSha -eq "0000000000000000000000000000000000000000") {
        Write-Error "Branch SHA is null or all-zeros. Branch creation may have failed. Aborting."
        return
    }
    Write-Host "Branch SHA for push: $branchSha"
  12. Push the commit to the branch. The oldObjectId in refUpdates MUST be $branchSha (which equals $mainSha for a newly created branch). This tells ADO to create a new commit whose parent is $branchSha, inheriting all existing files from that commit's tree:

    powershell
    $pushBody = @{
        refUpdates = @(
            @{
                name = "refs/heads/{user-alias}/{header}-update"
                oldObjectId = $branchSha   # MUST be a real SHA, never all-zeros
            }
        )
        commits = @(
            @{
                comment = "<generated commit message>"
                changes = $changes
            }
        )
    } | ConvertTo-Json -Depth 10
    
    $pushResult = Invoke-RestMethod -Uri "$adoBase/wdk-ddi/pushes?api-version=7.0" -Method Post -Headers $headers -Body $pushBody

    Do NOT combine branch creation and push into a single pushes API call. Always create the branch first (step 10), then push to it (step 11).

  13. Verify the push. Confirm the new commit has a parent (is not orphaned) by checking the commit details:

    powershell
    $newCommitId = $pushResult.commits[0].commitId
    $commitDetail = Invoke-RestMethod -Uri "$adoBase/wdk-ddi/commits/$newCommitId?api-version=7.0" -Headers $headers
    if (-not $commitDetail.parents -or $commitDetail.parents.Count -eq 0) {
        Write-Error "FATAL: Push created an orphan commit (no parent). The branch must be deleted and recreated. This means oldObjectId was wrong."
        # Clean up: delete the broken branch
        $deletePayload = "[{`"name`":`"refs/heads/{user-alias}/{header}-update`",`"oldObjectId`":`"$($commitDetail.commitId)`",`"newObjectId`":`"0000000000000000000000000000000000000000`"}]"
        Invoke-RestMethod -Uri "$adoBase/wdk-ddi/refs?api-version=7.0" -Method Post -Headers $headers -Body $deletePayload
        Write-Error "Broken branch deleted. Please retry the submission."
        return
    }
    Write-Host "Commit $newCommitId verified — parent: $($commitDetail.parents[0])"
  14. Create a pull request targeting main:

    powershell
    $prBody = @{
        sourceRefName = "refs/heads/{user-alias}/{header}-update"
        targetRefName = "refs/heads/main"
        title = "{user-alias}/{header}-update: API reference docs for {header}.h"
        description = "<PR description with header name, API entity list, AI-assisted note>"
    } | ConvertTo-Json
    
    $prResult = Invoke-RestMethod -Uri "$adoBase/wdk-ddi/pullrequests?api-version=7.0" -Method Post -Headers $headers -Body $prBody

    The PR description should include:

    • Header name documented
    • List of API entities with their types
    • Note that content was AI-assisted (ai-usage: ai-assisted metadata is set in each file)
  15. Display the PR URL to the user:

    powershell
    $prUrl = "https://dev.azure.com/cpubwin/drivers/_git/wdk-ddi/pullrequest/$($prResult.pullRequestId)"
    Write-Host "PR created: $prUrl"
  16. Display Workflow completed confirming completion.

© MicrosoftDocs, CC-BY-4.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/3-ai-docs-submit of MicrosoftDocs/windows-driver-docs-ddi.

Open the folder on GitHubat commit 7515063

Compare with similar skills

AI Docs Submit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

AI Docs Submit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AI Docs Submit this skillMicrosoftDocs/windows-driver-docs-ddi316—~2.8kAutomated safety check: PassCC-BY-4.0
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k24 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Greplooponyx-dot-app/onyx32k4 repos~3.3kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 24 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed
  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 22 repos~577 tokens
    DevelopmentAuto-check passed

More from MicrosoftDocs/windows-driver-docs-ddi

  • AI Docs Generate

    MicrosoftDocs/windows-driver-docs-ddi

    Official

    Generate WDK DDI API reference documentation pages from source code and stubs.

    316 GitHub stars~4k tokensUpdated 2 mo ago
    Auto-check passed
  • AI Docs Inventory

    MicrosoftDocs/windows-driver-docs-ddi

    Official

    Inventory and classify APIs listed in a pre-provided CSV for a WDK header file.

    316 GitHub stars~2.6k tokensUpdated 2 mo ago
    Auto-check passed
  • AI Docs Autopilot

    MicrosoftDocs/windows-driver-docs-ddi

    Official

    End-to-end autopilot: inventory, generate, and submit WDK DDI API reference docs from a CSV file with no user interaction.

    316 GitHub stars~9.7k tokensUpdated 2 mo ago
    Auto-check passed

Categories

Questions about AI Docs Submit

What does AI Docs Submit do?

Submit generated WDK DDI API reference documentation as a PR to the wdk-ddi repo. AI Docs Submit is an agent skill from MicrosoftDocs/windows-driver-docs-ddi, published by the product's own GitHub organization. Submit generated WDK DDI API reference documentation as a PR to the wdk-ddi repo.

When should I use AI Docs Submit?

AI Docs Submit fits situations like: : submitting docs; creating a PR for DDI docs; pushing documentation changes.

How do I install AI Docs Submit in Claude Code?

Run `npx skills add MicrosoftDocs/windows-driver-docs-ddi --skill ai-docs-submit -a claude-code`. Or copy the skill folder (.github/skills/3-ai-docs-submit in MicrosoftDocs/windows-driver-docs-ddi) into .claude/skills/ai-docs-submit in your project. Claude Code loads it when a task matches its description.

How do I install AI Docs Submit in Codex?

Run `npx skills add MicrosoftDocs/windows-driver-docs-ddi --skill ai-docs-submit -a codex`. Or copy the skill folder (.github/skills/3-ai-docs-submit in MicrosoftDocs/windows-driver-docs-ddi) into .agents/skills/ai-docs-submit in your project. Codex loads it when a task matches its description.

Can I use AI Docs Submit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MicrosoftDocs/windows-driver-docs-ddi --skill ai-docs-submit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ai-docs-submit, .gemini/skills/ai-docs-submit, .github/skills/ai-docs-submit and .opencode/skills/ai-docs-submit in your project.

What does AI Docs Submit need to run?

Going by SKILL.md and its folder, AI Docs Submit needs the command-line tools its instructions call (az).

Does AI Docs Submit access the network?

SKILL.md names 1 domain. In commands or code: dev.azure.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is AI Docs Submit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does AI Docs Submit use?

AI Docs Submit is published under the CC-BY-4.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does AI Docs Submit use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to AI Docs Submit?

Skills that share tags, products or a category with AI Docs Submit: Finishing a Development Branch (obra/superpowers, 296k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars), PR Babysitter (openinterpreter/openinterpreter, 69k stars) and Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains AI Docs Submit?

MicrosoftDocs (a GitHub organization, an official publisher) maintains it in MicrosoftDocs/windows-driver-docs-ddi, which has 316 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on July 25, 2026.

Source: MicrosoftDocs/windows-driver-docs-ddi on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.