batch-files
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.
npx skills add github/awesome-copilot --skill batch-files --agent copilot
Same command for any agent — swap --agent for claude-code, codex, cursor.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Batch Files A comprehensive skill for creating, editing, debugging, and maintaining Windows batch files (.bat/.cmd) using cmd.exe. Applies to CLI tool development, system administration automation, scheduled tasks, file operations scripting, and PATH-based executable scripts. ## When to Use This Skill - Creating or editing `.bat` or `.cmd` files - Automating Windows tasks (file operations, deployments, backups) - Building CLI tools intended for a `bin/` folder on PATH - Writing scheduled task scripts (SCHTASKS, Task Scheduler) - Debugging batch script issues (variable expansion, error levels, quoting) - Integrating batch scripts with external tools (curl, git, Node.js, Python) - Scaffolding new batch-based projects with structured templates ## Prerequisites - Windows NT-based OS (Windows 7 or later) - cmd.exe (built-in) - Optional: a `bin/` directory on PATH for distributing scripts as commands - Optional: PATHEXT configured to include `.BAT;.CMD` (default on Windows) ## Command Interpretation cmd.exe processes each line through four stages in order: 1. **Variable substitution** — `%VAR%` tokens are replaced with environment variable values. `%0`–`%9` reference batch arguments. `
- When to Use This Skill
- Prerequisites
- Command Interpretation
- Variables
- Environment Variables
- Special Variables
- Scoping with SETLOCAL / ENDLOCAL
- Delayed Expansion
- Control Flow
- Conditional Execution
- Compound Commands
- FOR Loops
- GOTO and Labels
- Command-Line Arguments
What does the batch-files skill do?
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.
How do I install it?
Run `npx skills add github/awesome-copilot --skill batch-files --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From github/awesome-copilot, a repository with 37,432 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.