All skills
github avatar

/batch-files

@7b9e822 official
by githubgithub/awesome-copilot40k stars
5,040

Expert-level Windows batch file (.bat/.cmd) skill for writing, debugging, and maintaining CMD scripts. Use when asked to "create a batch file", "write a .bat script", "automate a Windows task", "CMD scripting", "batch automation", "scheduled task script", "Windows shell script", or when working with .bat/.cmd files in the workspace. Covers cmd.exe syntax, environment variables, control flow, string processing, error handling, and integration with system tools.

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/batch-files

This session only. Nothing lands on disk.

referencesmsys2.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

MSYS2 Reference

MSYS2 provides a collection of tools and libraries for building, installing, and running native Windows software. It uses Pacman (from Arch Linux) for package management.

Getting Started

Environments

MSYS2 provides multiple environments targeting different use cases:

Environment Prefix Toolchain C Runtime
MSYS /usr GCC cygwin
MINGW64 /mingw64 GCC MSVCRT
UCRT64 /ucrt64 GCC UCRT
CLANG64 /clang64 LLVM UCRT
CLANGARM64 /clangarm64 LLVM UCRT

Configuration

Package Management

Development Tools

Package Development

Wiki

Source: SKILL.md on GitHub

No alerts15d3 checks · Risk SAFE
  • Gen Agent Trust Hub15d

    This skill is a comprehensive reference guide and template collection for Windows batch scripting. It provides detailed documentation on command-line syntax, system administration tasks, and security best practices for preventing code injection in batch files. No malicious patterns or security risks were detected.

  • Socket15d

    No alerts

  • Snyk15d

    Risk: LOW · No issues

Signed by skilld at 7b9e822. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 19 hours ago.

Activeupdated 5 months ago
  • batch
  • windows
  • cmd
  • shell-scripting
  • automation
  • scheduled-tasks
  • cli-tools
  • system-administration
  • error-handling
  • file-operations

README badge

README badge for github/awesome-copilot/batch-files

Writes, debugs, and maintains Windows batch files (.bat/.cmd) using cmd.exe syntax, control flow, error handling, and integration with system tools. Covers variable scoping, FOR loops, argument parsing, string manipulation, arithmetic, and file/network/system commands for CLI tool development, task automation, and scheduled scripts on Windows NT systems.

Generated from the current SKILL.md.

Does this skill cover PowerShell or only cmd.exe?
This skill is for cmd.exe batch files (.bat/.cmd) only. It does not cover PowerShell scripting.
Can I use this skill to write scripts for non-Windows systems?
No. This skill is Windows-specific and requires Windows NT-based OS (Windows 7 or later) with cmd.exe.
What should I use for string parsing and regex?
The skill covers FINDSTR (limited regex), substring syntax (%VAR:~start,length%), and FOR /F loops for parsing command output and files. Full regex support is not available in batch.
How do I handle errors in batch scripts?
Check %ERRORLEVEL% after commands, use && and || for conditional execution, or combine error checks with compound commands and parenthesized blocks.
Can I create reusable functions in batch files?
Yes. Use CALL :label to invoke functions, SETLOCAL/ENDLOCAL for variable scoping, and the endlocal & set pattern to return values from scoped blocks.

Generated from the current SKILL.md. These answers refresh after source changes.