agentleFS
vellum-aivellum-ai/vellum-assistant/skills/windows-automation/SKILL.md

windows-automation

Skill1.4k starsChanged 5 months agoMITView on GitHub

Automate native Windows apps and system interactions with PowerShell, documented COM APIs, and Microsoft UI Automation through the Windows host executor. Use for launching or inspecting desktop apps, opening Windows Settings, controlling scriptable Microsoft Office apps, and interacting with native UI when no direct CLI or API is available.

1 other project uses a version of this.

Trending

Quiet since October.thin dataabout the whole repository

Jan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 5 mentionsSep 2026: 6 mentionsOct 2026: 2 mentionsNov 2026: 0 mentionsDec 2026: 0 mentions
Jan 2026Jul 2026Dec 2026
Mentions a month of the vellum-ai/vellum-assistant repository that our weekly crawl found: only 14 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about vellum-ai/vellum-assistant

The biggest 5 of 14 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 14

Talked about on GitHub and Bluesky (14 times).

On GitHub · 13

8 more on GitHub

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use host_bash for every command in this skill.

    line 20
  2. Distinctive:

    Prefer automation methods in this order:

    line 22
  3. Distinctive:

    Avoid screen coordinates and blind keystrokes.

    line 29
  4. Distinctive:

    Prefer a stable executable, AppUserModelId, URI scheme, process ID, or automation ID over a localized window title.

    line 48
  5. Distinctive:

    Do not use this skill to save, send, delete, or overwrite content.

    line 89
  6. Distinctive:

    If the user requests a consequential action, use a dedicated skill or product workflow with its own hard confirmation gate.

    line 93
  7. Distinctive:

    If an app exposes no useful automation pattern, verify the process and window before sending keys:

    line 122
  8. Distinctive:

    Use keyboard input only after activation succeeds.

    line 132

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Use host_bash for every command in this skill. On Windows, host_bash runs Windows PowerShell with no profile and no interactive prompt. Use PowerShell syntax and Windows paths.

Prefer automation methods in this order:

  1. A documented CLI or URI scheme
  2. A documented PowerShell module or COM API
  3. Microsoft UI Automation
  4. Keyboard input only when the target and focus are verified

Avoid screen coordinates and blind keystrokes. They are fragile and can affect the wrong app. Use computer control only when PowerShell and UI Automation cannot complete the task or the user explicitly requests it.

Discover and launch apps

# Find Start menu apps
Get-StartApps | Where-Object Name -Like "*Calculator*"

# Inspect running desktop apps
Get-Process | Where-Object MainWindowTitle | Select-Object Id, ProcessName, MainWindowTitle

# Launch an app or a Windows Settings page
Start-Process calc.exe
Start-Process "ms-settings:privacy-microphone"

# Open a folder in File Explorer
Start-Process explorer.exe -ArgumentList "C:\Users\Public\Documents"

Prefer a stable executable, AppUserModelId, URI scheme, process ID, or automation ID over a localized window title.

Use documented app automation

Microsoft Office desktop apps expose COM APIs. Check that the app is installed before relying on one. Keep the COM object alive for the full operation and release it when finished.

# Create an isolated temporary workbook
$excel = $null
$workbook = $null
$worksheet = $null
$cell = $null
try {
  $excel = New-Object -ComObject Excel.Application
  $excel.Visible = $true
  $workbook = $excel.Workbooks.Add()
  if (-not [string]::IsNullOrEmpty($workbook.Path) -or $workbook.AutoSaveOn) {
    throw "The workbook is not an isolated temporary document."
  }
  $worksheet = $workbook.Worksheets.Item(1)
  $cell = $worksheet.Cells.Item(1, 1)
  $cell.Value2 = "Example"
} finally {
  if ($null -ne $workbook) {
    $workbook.Close($false)
  }
  if ($null -ne $excel) {
    $excel.Quit()
  }
  foreach ($comObject in @($cell, $worksheet, $workbook, $excel)) {
    if ($null -ne $comObject) {
      [System.Runtime.InteropServices.Marshal]::ReleaseComObject($comObject) | Out-Null
    }
  }
}

Close unsaved temporary documents with Close($false), quit the application, and release COM objects in a finally block so cleanup never waits for a save prompt.

Consequential actions are unsupported

Do not use this skill to save, send, delete, or overwrite content. The Windows host executor does not provide an in-process confirmation gate that works for both local and remote assistants.

Treat every existing document, workbook, message, note, calendar item, file, and cloud-backed resource as read-only. AutoSave can persist an edit without an explicit save command. Only edit an isolated temporary document that the automation created during the current task, has no storage path or cloud connection, and has AutoSave definitively disabled. If those conditions cannot be verified, do not edit it.

If the user requests a consequential action, use a dedicated skill or product workflow with its own hard confirmation gate. If none is available, explain the limitation and ask the user to perform that final action manually.

Inspect native UI

Load the built-in UI Automation assemblies and identify elements by process ID, automation ID, control type, or name.

Add-Type -AssemblyName UIAutomationClient

$desktop = [System.Windows.Automation.AutomationElement]::RootElement
$windows = $desktop.FindAll(
  [System.Windows.Automation.TreeScope]::Children,
  [System.Windows.Automation.Condition]::TrueCondition
)

$windows | ForEach-Object {
  [pscustomobject]@{
    Name = $_.Current.Name
    ProcessId = $_.Current.ProcessId
    AutomationId = $_.Current.AutomationId
    ControlType = $_.Current.ControlType.ProgrammaticName
  }
}

Once the target window is known, search its descendants with a PropertyCondition and use the supported pattern, such as InvokePattern, ValuePattern, SelectionItemPattern, or TogglePattern. Check TryGetCurrentPattern before invoking a pattern.

Focus and keyboard fallback

If an app exposes no useful automation pattern, verify the process and window before sending keys:

$process = Get-Process notepad -ErrorAction Stop | Select-Object -First 1
$shell = New-Object -ComObject WScript.Shell
if (-not $shell.AppActivate($process.Id)) {
  throw "Could not activate Notepad"
}

Use keyboard input only after activation succeeds. Never use keyboard input to trigger a consequential action prohibited above.

Troubleshooting

  • An empty UI Automation tree can mean the target runs at a higher integrity level. Do not bypass Windows security boundaries. Ask the user to run both apps at the same privilege level if appropriate.
  • App names, window titles, and control names can be localized. Prefer process IDs and automation IDs.
  • Packaged apps may launch through an AppUserModelId rather than a stable executable. Discover them with Get-StartApps.
  • host_bash is non-interactive. Do not use commands that wait for terminal input or depend on a PowerShell profile.

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.