[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AD938MZK88DHJ2VXD3TSQP":3,"skill-same:01M6AD938MZK88DHJ2VXD3TSQP":124},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":55,"linkOnly":56,"markdownContent":57,"markdownBody":58,"frontMatter":59,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":63,"repositoryHtmlUrl":64,"repositoryHomepageUrl":65,"ownerHtmlUrl":66,"ownerBlogUrl":67,"ownerDescription":68,"updatedAt":69,"install":70,"resources":83},"01M6AD938MZK88DHJ2VXD3TSQP","batch-files",null,"Expert-level Windows batch file (.bat\u002F.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\u002F.cmd files in the workspace. Covers cmd.exe syntax, environment variables, control flow, string processing, error handling, and integration with system tools.","github\u002Fawesome-copilot","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD3PBDYPK7NVFJNJ66Y8RS",41046,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54],"batch","batch files","files","system","for","scheduled","Variables","processing","error","environment variables","expert","use","write","workspace","writing","scripting","integration","file","error handling","create","debugging","windows","automation","2026-11-10 10:12:30",false,"---\nname: batch-files\ndescription: 'Expert-level Windows batch file (.bat\u002F.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\u002F.cmd files in the workspace. Covers cmd.exe syntax, environment variables, control flow, string processing, error handling, and integration with system tools.'\n---\n\n# Batch Files\n\nA comprehensive skill for creating, editing, debugging, and maintaining Windows batch files (.bat\u002F.cmd) using cmd.exe. Applies to CLI tool development, system administration automation, scheduled tasks, file operations scripting, and PATH-based executable scripts.\n\n## When to Use This Skill\n\n- Creating or editing `.bat` or `.cmd` files\n- Automating Windows tasks (file operations, deployments, backups)\n- Building CLI tools intended for a `bin\u002F` folder on PATH\n- Writing scheduled task scripts (SCHTASKS, Task Scheduler)\n- Debugging batch script issues (variable expansion, error levels, quoting)\n- Integrating batch scripts with external tools (curl, git, Node.js, Python)\n- Scaffolding new batch-based projects with structured templates\n\n## Prerequisites\n\n- Windows NT-based OS (Windows 7 or later)\n- cmd.exe (built-in)\n- Optional: a `bin\u002F` directory on PATH for distributing scripts as commands\n- Optional: PATHEXT configured to include `.BAT;.CMD` (default on Windows)\n\n## Command Interpretation\n\ncmd.exe processes each line through four stages in order:\n\n1. **Variable substitution** — `%VAR%` tokens are replaced with environment variable values. `%0`–`%9` reference batch arguments. `%*` expands to all arguments.\n2. **Quoting and escaping** — Caret `^` escapes special characters (`& | \u003C > ^`). Quotation marks prevent interpretation of enclosed special characters. In batch files, `%%` yields a literal `%`.\n3. **Syntax parsing** — Lines are split into pipelines (`|`), compound commands (`&`, `&&`, `||`), and parenthesized groups `( )`.\n4. **Redirection** — `>` overwrites, `>>` appends, `\u003C` reads input, `2>` redirects stderr, `2>&1` merges stderr into stdout, `>NUL` discards output.\n\n## Variables\n\n### Environment Variables\n\n```bat\nset _MY_VAR=Hello World\necho %_MY_VAR%\nset _MY_VAR=\n```\n\n- `set` with no arguments lists all variables\n- `set _PREFIX` lists variables starting with `_PREFIX`\n- No spaces around `=` — `set name = val` sets variable `\"name \"` to `\" val\"`\n\n### Special Variables\n\n| Variable | Value |\n|----------|-------|\n| `%CD%` | Current directory |\n| `%DATE%` | System date (locale-dependent) |\n| `%TIME%` | System time HH:MM:SS.mm |\n| `%RANDOM%` | Pseudorandom number 0–32767 |\n| `%ERRORLEVEL%` | Exit code of last command |\n| `%USERNAME%` | Current user name |\n| `%USERPROFILE%` | Current user profile path |\n| `%TEMP%` \u002F `%TMP%` | Temporary file directory |\n| `%PATHEXT%` | Executable extensions list |\n| `%COMSPEC%` | Path to cmd.exe |\n\n### Scoping with SETLOCAL \u002F ENDLOCAL\n\n```bat\nsetlocal\nset _LOCAL_VAR=scoped value\nendlocal\nREM _LOCAL_VAR is no longer defined here\n```\n\nTo return a value from a scoped block:\n\n```bat\nendlocal & set _RESULT=%_LOCAL_VAR%\n```\n\n### Delayed Expansion\n\nVariables inside parenthesized blocks are expanded at parse time. Use delayed expansion for runtime evaluation:\n\n```bat\nsetlocal EnableDelayedExpansion\nset _COUNT=0\nfor \u002Fl %%i in (1,1,5) do (\n    set \u002Fa _COUNT+=1\n    echo !_COUNT!\n)\nendlocal\n```\n\n- `!VAR!` expands at execution time (delayed)\n- `%VAR%` expands at parse time (immediate)\n\n## Control Flow\n\n### Conditional Execution\n\n```bat\nif exist \"output.txt\" echo File found\nif not defined _MY_VAR echo Variable not set\nif \"%_STATUS%\"==\"ready\" (echo Go) else (echo Wait)\nif %ERRORLEVEL% neq 0 echo Command failed\n```\n\nComparison operators: `equ`, `neq`, `lss`, `leq`, `gtr`, `geq`. Use `\u002Fi` for case-insensitive string comparison.\n\n### Compound Commands\n\n```bat\ncommand1 & command2        & REM Always run both\ncommand1 && command2       & REM Run command2 only if command1 succeeds\ncommand1 || command2       & REM Run command2 only if command1 fails\n```\n\n### FOR Loops\n\n```bat\nREM Iterate over a set of values\nfor %%i in (alpha beta gamma) do echo %%i\n\nREM Numeric range: start, step, end\nfor \u002Fl %%i in (1,1,10) do echo %%i\n\nREM Files in a directory\nfor %%f in (*.txt) do echo %%f\n\nREM Recursive file search\nfor \u002Fr %%f in (*.log) do echo %%f\n\nREM Directories only\nfor \u002Fd %%d in (*) do echo %%d\n\nREM Parse command output\nfor \u002Ff \"tokens=1,2 delims=:\" %%a in ('ipconfig ^| findstr \"IPv4\"') do echo %%b\n\nREM Parse file lines\nfor \u002Ff \"usebackq tokens=*\" %%a in (\"data.txt\") do echo %%a\n```\n\n### GOTO and Labels\n\n```bat\ngoto :main_logic\n:usage\necho Usage: %~nx0 [options]\nexit \u002Fb 1\n\n:main_logic\necho Running main logic...\ngoto :eof\n```\n\n`goto :eof` exits the current batch or subroutine. Labels start with `:`.\n\n## Command-Line Arguments\n\n| Syntax | Value |\n|--------|-------|\n| `%0` | Script name as invoked |\n| `%1`–`%9` | Positional arguments |\n| `%*` | All arguments (unaffected by SHIFT) |\n| `%~1` | Argument 1 with enclosing quotes removed |\n| `%~f1` | Full path of argument 1 |\n| `%~d1` | Drive letter of argument 1 |\n| `%~p1` | Path (without drive) of argument 1 |\n| `%~n1` | File name (no extension) of argument 1 |\n| `%~x1` | Extension of argument 1 |\n| `%~dp0` | Drive and path of the batch file itself |\n| `%~nx0` | File name with extension of the batch file |\n| `%~z1` | File size of argument 1 |\n| `%~$PATH:1` | Search PATH for argument 1 |\n\n### Argument Parsing Pattern\n\n```bat\n:parse_args\nif \"%~1\"==\"\" goto :args_done\nif \u002Fi \"%~1\"==\"--help\" goto :usage\nif \u002Fi \"%~1\"==\"--output\" (\n    set \"_OUTPUT_DIR=%~2\"\n    shift\n)\nshift\ngoto :parse_args\n:args_done\n```\n\n## String Processing\n\n### Substrings\n\n```bat\nset _STR=Hello World\necho %_STR:~0,5%       & REM \"Hello\"\necho %_STR:~6%         & REM \"World\"\necho %_STR:~-5%        & REM \"World\"\necho %_STR:~0,-6%      & REM \"Hello\"\n```\n\n### Search and Replace\n\n```bat\nset _STR=Hello World\necho %_STR:World=Earth%       & REM \"Hello Earth\"\necho %_STR:Hello=%            & REM \" World\" (remove \"Hello\")\n```\n\n### Substring Containment Test\n\n```bat\nif not \"%_STR:World=%\"==\"%_STR%\" echo Contains \"World\"\n```\n\n## Functions\n\nFunctions use labels, CALL, and SETLOCAL\u002FENDLOCAL:\n\n```bat\n@echo off\ncall :greet \"Jane Doe\"\necho Result: %_GREETING%\nexit \u002Fb 0\n\n:greet\nsetlocal\nset \"_MSG=Hello, %~1\"\nendlocal & set \"_GREETING=%_MSG%\"\nexit \u002Fb 0\n```\n\n- `call :label args` invokes a function\n- `exit \u002Fb` returns from the function (not the script)\n- Use the `endlocal & set` trick to pass values out of a scoped block\n\n## Arithmetic\n\n`set \u002Fa` performs 32-bit signed integer arithmetic:\n\n```bat\nset \u002Fa _RESULT=10 * 5 + 3\nset \u002Fa _COUNTER+=1\nset \u002Fa _REMAINDER=14 %% 3       & REM Use %% for modulo in batch files\nset \u002Fa _BITS=\"255 & 0x0F\"       & REM Bitwise AND\n```\n\nSupported operators: `+ - * \u002F %% ( )` and bitwise `& | ^ ~ \u003C\u003C >>`.\n\nHexadecimal (`0xFF`) and octal (`077`) literals are supported.\n\n## Error Handling\n\n### Error Level Conventions\n\n- `0` = success\n- Non-zero = failure (typically `1`)\n\n```bat\nmycommand.exe\nif %ERRORLEVEL% neq 0 (\n    echo ERROR: mycommand failed with code %ERRORLEVEL%\n    exit \u002Fb %ERRORLEVEL%\n)\n```\n\n### Fail-Fast Pattern\n\n```bat\ncommand1 || (echo command1 failed & exit \u002Fb 1)\ncommand2 || (echo command2 failed & exit \u002Fb 1)\n```\n\n### Setting Exit Codes\n\n```bat\nexit \u002Fb 0        & REM Return success from a batch\u002Ffunction\nexit \u002Fb 1        & REM Return failure\ncmd \u002Fc \"exit \u002Fb 42\"   & REM Set ERRORLEVEL to 42 inline\n```\n\n## Essential Commands Reference\n\n### File Operations\n\n| Command | Purpose |\n|---------|---------|\n| `DIR` | List directory contents |\n| `COPY` | Copy files |\n| `XCOPY` | Extended copy with subdirectories (legacy) |\n| `ROBOCOPY` | Robust copy with retry, mirror, logging |\n| `MOVE` | Move or rename files |\n| `DEL` | Delete files |\n| `REN` | Rename files |\n| `MD` \u002F `MKDIR` | Create directories |\n| `RD` \u002F `RMDIR` | Remove directories |\n| `MKLINK` | Create symbolic or hard links |\n| `ATTRIB` | View or set file attributes |\n| `TYPE` | Print file contents |\n| `MORE` | Paginated file display |\n| `TREE` | Display directory structure |\n| `REPLACE` | Replace files in destination with source |\n| `COMPACT` | Show or set NTFS compression |\n| `EXPAND` | Extract from .cab files |\n| `MAKECAB` | Create .cab archives |\n| `TAR` | Create or extract tar archives |\n\n### Text Search and Processing\n\n| Command | Purpose |\n|---------|---------|\n| `FIND` | Search for literal strings |\n| `FINDSTR` | Search with limited regular expressions |\n| `SORT` | Sort lines alphabetically |\n| `CLIP` | Copy piped input to clipboard |\n| `FC` | Compare two files |\n| `COMP` | Binary file comparison |\n| `CERTUTIL` | Encode\u002Fdecode Base64, compute hashes |\n\n### System Information\n\n| Command | Purpose |\n|---------|---------|\n| `SYSTEMINFO` | Full system configuration |\n| `HOSTNAME` | Display computer name |\n| `VER` | Windows version |\n| `WHOAMI` | Current user and group info |\n| `TASKLIST` | List running processes |\n| `TASKKILL` | Terminate processes |\n| `WMIC` | WMI queries (drives, OS, memory) |\n| `SC` | Service control (query, start, stop) |\n| `DRIVERQUERY` | List installed drivers |\n| `REG` | Registry operations (query, add, delete) |\n| `SETX` | Set persistent environment variables |\n\n### Network\n\n| Command | Purpose |\n|---------|---------|\n| `PING` | Test network connectivity |\n| `IPCONFIG` | IP configuration |\n| `NSLOOKUP` | DNS lookup |\n| `NETSTAT` | Network connections and ports |\n| `TRACERT` | Trace route to host |\n| `NET USE` | Map\u002Fdisconnect network drives |\n| `NET USER` | Manage user accounts |\n| `NETSH` | Network configuration utility |\n| `ARP` | ARP cache management |\n| `ROUTE` | Routing table management |\n| `CURL` | HTTP requests (Windows 10+) |\n| `SSH` | Secure shell (Windows 10+) |\n\n### Scheduling and Automation\n\n| Command | Purpose |\n|---------|---------|\n| `SCHTASKS` | Create and manage scheduled tasks |\n| `TIMEOUT` | Wait N seconds (Vista+) |\n| `START` | Launch programs asynchronously |\n| `RUNAS` | Run as different user |\n| `SHUTDOWN` | Shutdown or restart |\n| `FORFILES` | Find files by date and execute commands |\n\n### Shell Utilities\n\n| Command | Purpose |\n|---------|---------|\n| `WHERE` | Locate executables in PATH |\n| `DOSKEY` | Create command macros |\n| `CHOICE` | Prompt for single-key input |\n| `MODE` | Configure console size and ports |\n| `SUBST` | Map folder to drive letter |\n| `CHCP` | Get or set console code page |\n| `COLOR` | Set console colors |\n| `TITLE` | Set console window title |\n| `ASSOC` \u002F `FTYPE` | File type associations |\n\n## Shell Syntax and Expressions\n\n### Parentheses for Grouping\n\nParentheses turn compound commands into a single unit for redirection or conditional execution:\n\n```bat\n(echo Line 1 & echo Line 2) > output.txt\nif exist \"data.csv\" (\n    echo Processing...\n    call :process \"data.csv\"\n) else (\n    echo No data found.\n)\n```\n\n### Escape Characters\n\nThe caret `^` escapes the next character:\n\n```bat\necho Total ^& Summary          & REM Outputs: Total & Summary\necho 100%% complete            & REM Outputs: 100% complete (in batch)\necho Line one^\nLine two                       & REM Caret escapes the newline\n```\n\nAfter a pipe, triple caret is needed: `echo x ^^^& y | findstr x`\n\n### Wildcards\n\n- `*` matches any sequence of characters\n- `?` matches a single character (or zero at end of period-free segment)\n\n```bat\ndir *.txt           & REM All .txt files\nren *.jpeg *.jpg    & REM Bulk rename\n```\n\n### Redirection Summary\n\n```bat\ncommand > file.txt          & REM Overwrite stdout to file\ncommand >> file.txt         & REM Append stdout to file\ncommand 2> errors.log       & REM Redirect stderr\ncommand > all.log 2>&1      & REM Merge stderr into stdout\ncommand \u003C input.txt         & REM Read stdin from file\ncommand > NUL 2>&1          & REM Discard all output\n```\n\n## Writing Production-Quality Batch Files\n\n### Standard Script Structure\n\n```bat\n@echo off\nsetlocal EnableDelayedExpansion\n\nREM ============================================================\nREM  Script: example.bat\nREM  Purpose: Describe what this script does\nREM ============================================================\n\ncall :main %*\nexit \u002Fb %ERRORLEVEL%\n\n:main\n    call :parse_args %*\n    if not defined _TARGET (\n        echo ERROR: --target is required. 1>&2\n        call :usage\n        exit \u002Fb 1\n    )\n    echo Processing: %_TARGET%\n    exit \u002Fb 0\n\n:parse_args\n    if \"%~1\"==\"\" exit \u002Fb 0\n    if \u002Fi \"%~1\"==\"--target\" set \"_TARGET=%~2\" & shift\n    if \u002Fi \"%~1\"==\"--help\"   call :usage & exit \u002Fb 0\n    shift\n    goto :parse_args\n\n:usage\n    echo Usage: %~nx0 --target ^\u003Cpath^> [--help]\n    echo.\n    echo Options:\n    echo   --target   Path to process (required)\n    echo   --help     Show this help message\n    exit \u002Fb 0\n```\n\n### Best Practices\n\n1. **Always start with `@echo off` and `setlocal`** — Prevents noisy output and variable leakage to the caller.\n2. **Validate inputs before processing** — Check required arguments and file existence early. Use `if not defined` and `if not exist`.\n3. **Quote paths and variables** — Use `\"%~1\"` and `\"%_MY_PATH%\"` to handle spaces and special characters safely.\n4. **Use `exit \u002Fb` instead of `exit`** — Avoids closing the parent console window.\n5. **Return meaningful exit codes** — `exit \u002Fb 0` for success, non-zero for specific failures.\n6. **Use `%~dp0` for script-relative paths** — Ensures the script works regardless of the caller's working directory.\n7. **Prefer `ROBOCOPY` over `XCOPY`** — More reliable, supports retry, mirroring, and logging.\n8. **Use `EnableDelayedExpansion` when modifying variables inside loops or parenthesized blocks.**\n9. **Write errors to stderr** — `echo ERROR: message 1>&2` keeps stdout clean for piping.\n10. **Use `REM` for comments** — `::` can cause issues inside `FOR` loop bodies.\n\n### Security Considerations\n\n- **Never store credentials in batch files** — Use environment variables, credential stores, or prompts.\n- **Validate user input** — Unquoted variables containing `&`, `|`, or `>` can inject commands. Always quote: `\"%_USER_INPUT%\"`.\n- **Use `SETLOCAL`** — Prevents variable values from leaking to parent processes.\n- **Sanitize file paths** — Validate paths before passing to `DEL`, `RD`, or `ROBOCOPY` to prevent unintended deletion.\n- **Avoid `SET \u002FP` for sensitive input** — Input is visible and stored in console history. Use a dedicated credential tool when possible.\n\n## Debugging and Troubleshooting\n\n| Technique | How |\n|-----------|-----|\n| Trace execution | Remove `@echo off` or use `@echo on` temporarily |\n| Step through | Add `PAUSE` between sections |\n| Check error level | `echo Exit code: %ERRORLEVEL%` after each command |\n| Inspect variables | `set _MY_` to list all variables starting with `_MY_` |\n| Delayed expansion issues | Variable inside `( )` block not updating? Enable `!VAR!` syntax |\n| FOR loop `%%` vs `%` | Use `%%i` in batch files, `%i` on the command line |\n| Spaces in SET | `set name=value` not `set name = value` |\n| Caret in pipes | After a pipe, use `^^^` to escape special chars |\n| Parentheses in SET \u002FA | Escape with `^(` and `^)` inside `if` blocks, or use quotes |\n| Double percent for modulo | `set \u002Fa r=14 %% 3` in batch files |\n\n## Cross-Platform and Extended Tools\n\nWhen batch scripting reaches its limits, these tools extend cmd.exe capabilities:\n\n| Tool | Purpose |\n|------|---------|\n| **Cygwin** | Full POSIX environment on Windows (grep, sed, awk, ssh) |\n| **MSYS2** | Lightweight Unix tools and package manager (pacman) |\n| **WSL** | Windows Subsystem for Linux — run native Linux binaries |\n| **GnuWin32** | Individual GNU utilities as native Windows executables |\n| **PowerShell** | Modern Windows scripting with .NET integration |\n\nUse batch when you need: fast startup, simple file operations, PATH-based CLI tools, or Task Scheduler integration. Consider PowerShell or WSL for complex data processing, REST APIs, or object-oriented scripting.\n\n## CMD Keyboard Shortcuts\n\n| Shortcut | Action |\n|----------|--------|\n| `Tab` | Auto-complete file\u002Ffolder names |\n| `Up` \u002F `Down` | Navigate command history |\n| `F7` | Show command history popup |\n| `F3` | Repeat last command |\n| `Esc` | Clear current line |\n| `Ctrl+C` | Cancel running command |\n| `Alt+F7` | Clear command history |\n\n## Reference Files\n\nThe `references\u002F` folder contains detailed documentation:\n\n| File | Contents |\n|------|----------|\n| `tools-and-resources.md` | Windows tools, utilities, package managers, terminals |\n| `batch-files-and-functions.md` | Example scripts, techniques, best practices links |\n| `windows-commands.md` | Comprehensive A-Z Windows command reference |\n| `cygwin.md` | Cygwin user guide and FAQ |\n| `msys2.md` | MSYS2 installation, packages, and environments |\n| `windows-subsystem-on-linux.md` | WSL setup, commands, and documentation |\n\n## Asset Templates\n\nThe `assets\u002F` folder contains starter batch file template data, but as text files:\n\n| Template | Purpose |\n|----------|---------|\n| `executable.txt` | Standalone CLI tool with argument parsing |\n| `library.txt` | Reusable function library with CALL-able labels |\n| `task.txt` | Scheduled task \u002F automation script |\n","# Batch Files\n\nA comprehensive skill for creating, editing, debugging, and maintaining Windows batch files (.bat\u002F.cmd) using cmd.exe. Applies to CLI tool development, system administration automation, scheduled tasks, file operations scripting, and PATH-based executable scripts.\n\n## When to Use This Skill\n\n- Creating or editing `.bat` or `.cmd` files\n- Automating Windows tasks (file operations, deployments, backups)\n- Building CLI tools intended for a `bin\u002F` folder on PATH\n- Writing scheduled task scripts (SCHTASKS, Task Scheduler)\n- Debugging batch script issues (variable expansion, error levels, quoting)\n- Integrating batch scripts with external tools (curl, git, Node.js, Python)\n- Scaffolding new batch-based projects with structured templates\n\n## Prerequisites\n\n- Windows NT-based OS (Windows 7 or later)\n- cmd.exe (built-in)\n- Optional: a `bin\u002F` directory on PATH for distributing scripts as commands\n- Optional: PATHEXT configured to include `.BAT;.CMD` (default on Windows)\n\n## Command Interpretation\n\ncmd.exe processes each line through four stages in order:\n\n1. **Variable substitution** — `%VAR%` tokens are replaced with environment variable values. `%0`–`%9` reference batch arguments. `%*` expands to all arguments.\n2. **Quoting and escaping** — Caret `^` escapes special characters (`& | \u003C > ^`). Quotation marks prevent interpretation of enclosed special characters. In batch files, `%%` yields a literal `%`.\n3. **Syntax parsing** — Lines are split into pipelines (`|`), compound commands (`&`, `&&`, `||`), and parenthesized groups `( )`.\n4. **Redirection** — `>` overwrites, `>>` appends, `\u003C` reads input, `2>` redirects stderr, `2>&1` merges stderr into stdout, `>NUL` discards output.\n\n## Variables\n\n### Environment Variables\n\n```bat\nset _MY_VAR=Hello World\necho %_MY_VAR%\nset _MY_VAR=\n```\n\n- `set` with no arguments lists all variables\n- `set _PREFIX` lists variables starting with `_PREFIX`\n- No spaces around `=` — `set name = val` sets variable `\"name \"` to `\" val\"`\n\n### Special Variables\n\n| Variable | Value |\n|----------|-------|\n| `%CD%` | Current directory |\n| `%DATE%` | System date (locale-dependent) |\n| `%TIME%` | System time HH:MM:SS.mm |\n| `%RANDOM%` | Pseudorandom number 0–32767 |\n| `%ERRORLEVEL%` | Exit code of last command |\n| `%USERNAME%` | Current user name |\n| `%USERPROFILE%` | Current user profile path |\n| `%TEMP%` \u002F `%TMP%` | Temporary file directory |\n| `%PATHEXT%` | Executable extensions list |\n| `%COMSPEC%` | Path to cmd.exe |\n\n### Scoping with SETLOCAL \u002F ENDLOCAL\n\n```bat\nsetlocal\nset _LOCAL_VAR=scoped value\nendlocal\nREM _LOCAL_VAR is no longer defined here\n```\n\nTo return a value from a scoped block:\n\n```bat\nendlocal & set _RESULT=%_LOCAL_VAR%\n```\n\n### Delayed Expansion\n\nVariables inside parenthesized blocks are expanded at parse time. Use delayed expansion for runtime evaluation:\n\n```bat\nsetlocal EnableDelayedExpansion\nset _COUNT=0\nfor \u002Fl %%i in (1,1,5) do (\n    set \u002Fa _COUNT+=1\n    echo !_COUNT!\n)\nendlocal\n```\n\n- `!VAR!` expands at execution time (delayed)\n- `%VAR%` expands at parse time (immediate)\n\n## Control Flow\n\n### Conditional Execution\n\n```bat\nif exist \"output.txt\" echo File found\nif not defined _MY_VAR echo Variable not set\nif \"%_STATUS%\"==\"ready\" (echo Go) else (echo Wait)\nif %ERRORLEVEL% neq 0 echo Command failed\n```\n\nComparison operators: `equ`, `neq`, `lss`, `leq`, `gtr`, `geq`. Use `\u002Fi` for case-insensitive string comparison.\n\n### Compound Commands\n\n```bat\ncommand1 & command2        & REM Always run both\ncommand1 && command2       & REM Run command2 only if command1 succeeds\ncommand1 || command2       & REM Run command2 only if command1 fails\n```\n\n### FOR Loops\n\n```bat\nREM Iterate over a set of values\nfor %%i in (alpha beta gamma) do echo %%i\n\nREM Numeric range: start, step, end\nfor \u002Fl %%i in (1,1,10) do echo %%i\n\nREM Files in a directory\nfor %%f in (*.txt) do echo %%f\n\nREM Recursive file search\nfor \u002Fr %%f in (*.log) do echo %%f\n\nREM Directories only\nfor \u002Fd %%d in (*) do echo %%d\n\nREM Parse command output\nfor \u002Ff \"tokens=1,2 delims=:\" %%a in ('ipconfig ^| findstr \"IPv4\"') do echo %%b\n\nREM Parse file lines\nfor \u002Ff \"usebackq tokens=*\" %%a in (\"data.txt\") do echo %%a\n```\n\n### GOTO and Labels\n\n```bat\ngoto :main_logic\n:usage\necho Usage: %~nx0 [options]\nexit \u002Fb 1\n\n:main_logic\necho Running main logic...\ngoto :eof\n```\n\n`goto :eof` exits the current batch or subroutine. Labels start with `:`.\n\n## Command-Line Arguments\n\n| Syntax | Value |\n|--------|-------|\n| `%0` | Script name as invoked |\n| `%1`–`%9` | Positional arguments |\n| `%*` | All arguments (unaffected by SHIFT) |\n| `%~1` | Argument 1 with enclosing quotes removed |\n| `%~f1` | Full path of argument 1 |\n| `%~d1` | Drive letter of argument 1 |\n| `%~p1` | Path (without drive) of argument 1 |\n| `%~n1` | File name (no extension) of argument 1 |\n| `%~x1` | Extension of argument 1 |\n| `%~dp0` | Drive and path of the batch file itself |\n| `%~nx0` | File name with extension of the batch file |\n| `%~z1` | File size of argument 1 |\n| `%~$PATH:1` | Search PATH for argument 1 |\n\n### Argument Parsing Pattern\n\n```bat\n:parse_args\nif \"%~1\"==\"\" goto :args_done\nif \u002Fi \"%~1\"==\"--help\" goto :usage\nif \u002Fi \"%~1\"==\"--output\" (\n    set \"_OUTPUT_DIR=%~2\"\n    shift\n)\nshift\ngoto :parse_args\n:args_done\n```\n\n## String Processing\n\n### Substrings\n\n```bat\nset _STR=Hello World\necho %_STR:~0,5%       & REM \"Hello\"\necho %_STR:~6%         & REM \"World\"\necho %_STR:~-5%        & REM \"World\"\necho %_STR:~0,-6%      & REM \"Hello\"\n```\n\n### Search and Replace\n\n```bat\nset _STR=Hello World\necho %_STR:World=Earth%       & REM \"Hello Earth\"\necho %_STR:Hello=%            & REM \" World\" (remove \"Hello\")\n```\n\n### Substring Containment Test\n\n```bat\nif not \"%_STR:World=%\"==\"%_STR%\" echo Contains \"World\"\n```\n\n## Functions\n\nFunctions use labels, CALL, and SETLOCAL\u002FENDLOCAL:\n\n```bat\n@echo off\ncall :greet \"Jane Doe\"\necho Result: %_GREETING%\nexit \u002Fb 0\n\n:greet\nsetlocal\nset \"_MSG=Hello, %~1\"\nendlocal & set \"_GREETING=%_MSG%\"\nexit \u002Fb 0\n```\n\n- `call :label args` invokes a function\n- `exit \u002Fb` returns from the function (not the script)\n- Use the `endlocal & set` trick to pass values out of a scoped block\n\n## Arithmetic\n\n`set \u002Fa` performs 32-bit signed integer arithmetic:\n\n```bat\nset \u002Fa _RESULT=10 * 5 + 3\nset \u002Fa _COUNTER+=1\nset \u002Fa _REMAINDER=14 %% 3       & REM Use %% for modulo in batch files\nset \u002Fa _BITS=\"255 & 0x0F\"       & REM Bitwise AND\n```\n\nSupported operators: `+ - * \u002F %% ( )` and bitwise `& | ^ ~ \u003C\u003C >>`.\n\nHexadecimal (`0xFF`) and octal (`077`) literals are supported.\n\n## Error Handling\n\n### Error Level Conventions\n\n- `0` = success\n- Non-zero = failure (typically `1`)\n\n```bat\nmycommand.exe\nif %ERRORLEVEL% neq 0 (\n    echo ERROR: mycommand failed with code %ERRORLEVEL%\n    exit \u002Fb %ERRORLEVEL%\n)\n```\n\n### Fail-Fast Pattern\n\n```bat\ncommand1 || (echo command1 failed & exit \u002Fb 1)\ncommand2 || (echo command2 failed & exit \u002Fb 1)\n```\n\n### Setting Exit Codes\n\n```bat\nexit \u002Fb 0        & REM Return success from a batch\u002Ffunction\nexit \u002Fb 1        & REM Return failure\ncmd \u002Fc \"exit \u002Fb 42\"   & REM Set ERRORLEVEL to 42 inline\n```\n\n## Essential Commands Reference\n\n### File Operations\n\n| Command | Purpose |\n|---------|---------|\n| `DIR` | List directory contents |\n| `COPY` | Copy files |\n| `XCOPY` | Extended copy with subdirectories (legacy) |\n| `ROBOCOPY` | Robust copy with retry, mirror, logging |\n| `MOVE` | Move or rename files |\n| `DEL` | Delete files |\n| `REN` | Rename files |\n| `MD` \u002F `MKDIR` | Create directories |\n| `RD` \u002F `RMDIR` | Remove directories |\n| `MKLINK` | Create symbolic or hard links |\n| `ATTRIB` | View or set file attributes |\n| `TYPE` | Print file contents |\n| `MORE` | Paginated file display |\n| `TREE` | Display directory structure |\n| `REPLACE` | Replace files in destination with source |\n| `COMPACT` | Show or set NTFS compression |\n| `EXPAND` | Extract from .cab files |\n| `MAKECAB` | Create .cab archives |\n| `TAR` | Create or extract tar archives |\n\n### Text Search and Processing\n\n| Command | Purpose |\n|---------|---------|\n| `FIND` | Search for literal strings |\n| `FINDSTR` | Search with limited regular expressions |\n| `SORT` | Sort lines alphabetically |\n| `CLIP` | Copy piped input to clipboard |\n| `FC` | Compare two files |\n| `COMP` | Binary file comparison |\n| `CERTUTIL` | Encode\u002Fdecode Base64, compute hashes |\n\n### System Information\n\n| Command | Purpose |\n|---------|---------|\n| `SYSTEMINFO` | Full system configuration |\n| `HOSTNAME` | Display computer name |\n| `VER` | Windows version |\n| `WHOAMI` | Current user and group info |\n| `TASKLIST` | List running processes |\n| `TASKKILL` | Terminate processes |\n| `WMIC` | WMI queries (drives, OS, memory) |\n| `SC` | Service control (query, start, stop) |\n| `DRIVERQUERY` | List installed drivers |\n| `REG` | Registry operations (query, add, delete) |\n| `SETX` | Set persistent environment variables |\n\n### Network\n\n| Command | Purpose |\n|---------|---------|\n| `PING` | Test network connectivity |\n| `IPCONFIG` | IP configuration |\n| `NSLOOKUP` | DNS lookup |\n| `NETSTAT` | Network connections and ports |\n| `TRACERT` | Trace route to host |\n| `NET USE` | Map\u002Fdisconnect network drives |\n| `NET USER` | Manage user accounts |\n| `NETSH` | Network configuration utility |\n| `ARP` | ARP cache management |\n| `ROUTE` | Routing table management |\n| `CURL` | HTTP requests (Windows 10+) |\n| `SSH` | Secure shell (Windows 10+) |\n\n### Scheduling and Automation\n\n| Command | Purpose |\n|---------|---------|\n| `SCHTASKS` | Create and manage scheduled tasks |\n| `TIMEOUT` | Wait N seconds (Vista+) |\n| `START` | Launch programs asynchronously |\n| `RUNAS` | Run as different user |\n| `SHUTDOWN` | Shutdown or restart |\n| `FORFILES` | Find files by date and execute commands |\n\n### Shell Utilities\n\n| Command | Purpose |\n|---------|---------|\n| `WHERE` | Locate executables in PATH |\n| `DOSKEY` | Create command macros |\n| `CHOICE` | Prompt for single-key input |\n| `MODE` | Configure console size and ports |\n| `SUBST` | Map folder to drive letter |\n| `CHCP` | Get or set console code page |\n| `COLOR` | Set console colors |\n| `TITLE` | Set console window title |\n| `ASSOC` \u002F `FTYPE` | File type associations |\n\n## Shell Syntax and Expressions\n\n### Parentheses for Grouping\n\nParentheses turn compound commands into a single unit for redirection or conditional execution:\n\n```bat\n(echo Line 1 & echo Line 2) > output.txt\nif exist \"data.csv\" (\n    echo Processing...\n    call :process \"data.csv\"\n) else (\n    echo No data found.\n)\n```\n\n### Escape Characters\n\nThe caret `^` escapes the next character:\n\n```bat\necho Total ^& Summary          & REM Outputs: Total & Summary\necho 100%% complete            & REM Outputs: 100% complete (in batch)\necho Line one^\nLine two                       & REM Caret escapes the newline\n```\n\nAfter a pipe, triple caret is needed: `echo x ^^^& y | findstr x`\n\n### Wildcards\n\n- `*` matches any sequence of characters\n- `?` matches a single character (or zero at end of period-free segment)\n\n```bat\ndir *.txt           & REM All .txt files\nren *.jpeg *.jpg    & REM Bulk rename\n```\n\n### Redirection Summary\n\n```bat\ncommand > file.txt          & REM Overwrite stdout to file\ncommand >> file.txt         & REM Append stdout to file\ncommand 2> errors.log       & REM Redirect stderr\ncommand > all.log 2>&1      & REM Merge stderr into stdout\ncommand \u003C input.txt         & REM Read stdin from file\ncommand > NUL 2>&1          & REM Discard all output\n```\n\n## Writing Production-Quality Batch Files\n\n### Standard Script Structure\n\n```bat\n@echo off\nsetlocal EnableDelayedExpansion\n\nREM ============================================================\nREM  Script: example.bat\nREM  Purpose: Describe what this script does\nREM ============================================================\n\ncall :main %*\nexit \u002Fb %ERRORLEVEL%\n\n:main\n    call :parse_args %*\n    if not defined _TARGET (\n        echo ERROR: --target is required. 1>&2\n        call :usage\n        exit \u002Fb 1\n    )\n    echo Processing: %_TARGET%\n    exit \u002Fb 0\n\n:parse_args\n    if \"%~1\"==\"\" exit \u002Fb 0\n    if \u002Fi \"%~1\"==\"--target\" set \"_TARGET=%~2\" & shift\n    if \u002Fi \"%~1\"==\"--help\"   call :usage & exit \u002Fb 0\n    shift\n    goto :parse_args\n\n:usage\n    echo Usage: %~nx0 --target ^\u003Cpath^> [--help]\n    echo.\n    echo Options:\n    echo   --target   Path to process (required)\n    echo   --help     Show this help message\n    exit \u002Fb 0\n```\n\n### Best Practices\n\n1. **Always start with `@echo off` and `setlocal`** — Prevents noisy output and variable leakage to the caller.\n2. **Validate inputs before processing** — Check required arguments and file existence early. Use `if not defined` and `if not exist`.\n3. **Quote paths and variables** — Use `\"%~1\"` and `\"%_MY_PATH%\"` to handle spaces and special characters safely.\n4. **Use `exit \u002Fb` instead of `exit`** — Avoids closing the parent console window.\n5. **Return meaningful exit codes** — `exit \u002Fb 0` for success, non-zero for specific failures.\n6. **Use `%~dp0` for script-relative paths** — Ensures the script works regardless of the caller's working directory.\n7. **Prefer `ROBOCOPY` over `XCOPY`** — More reliable, supports retry, mirroring, and logging.\n8. **Use `EnableDelayedExpansion` when modifying variables inside loops or parenthesized blocks.**\n9. **Write errors to stderr** — `echo ERROR: message 1>&2` keeps stdout clean for piping.\n10. **Use `REM` for comments** — `::` can cause issues inside `FOR` loop bodies.\n\n### Security Considerations\n\n- **Never store credentials in batch files** — Use environment variables, credential stores, or prompts.\n- **Validate user input** — Unquoted variables containing `&`, `|`, or `>` can inject commands. Always quote: `\"%_USER_INPUT%\"`.\n- **Use `SETLOCAL`** — Prevents variable values from leaking to parent processes.\n- **Sanitize file paths** — Validate paths before passing to `DEL`, `RD`, or `ROBOCOPY` to prevent unintended deletion.\n- **Avoid `SET \u002FP` for sensitive input** — Input is visible and stored in console history. Use a dedicated credential tool when possible.\n\n## Debugging and Troubleshooting\n\n| Technique | How |\n|-----------|-----|\n| Trace execution | Remove `@echo off` or use `@echo on` temporarily |\n| Step through | Add `PAUSE` between sections |\n| Check error level | `echo Exit code: %ERRORLEVEL%` after each command |\n| Inspect variables | `set _MY_` to list all variables starting with `_MY_` |\n| Delayed expansion issues | Variable inside `( )` block not updating? Enable `!VAR!` syntax |\n| FOR loop `%%` vs `%` | Use `%%i` in batch files, `%i` on the command line |\n| Spaces in SET | `set name=value` not `set name = value` |\n| Caret in pipes | After a pipe, use `^^^` to escape special chars |\n| Parentheses in SET \u002FA | Escape with `^(` and `^)` inside `if` blocks, or use quotes |\n| Double percent for modulo | `set \u002Fa r=14 %% 3` in batch files |\n\n## Cross-Platform and Extended Tools\n\nWhen batch scripting reaches its limits, these tools extend cmd.exe capabilities:\n\n| Tool | Purpose |\n|------|---------|\n| **Cygwin** | Full POSIX environment on Windows (grep, sed, awk, ssh) |\n| **MSYS2** | Lightweight Unix tools and package manager (pacman) |\n| **WSL** | Windows Subsystem for Linux — run native Linux binaries |\n| **GnuWin32** | Individual GNU utilities as native Windows executables |\n| **PowerShell** | Modern Windows scripting with .NET integration |\n\nUse batch when you need: fast startup, simple file operations, PATH-based CLI tools, or Task Scheduler integration. Consider PowerShell or WSL for complex data processing, REST APIs, or object-oriented scripting.\n\n## CMD Keyboard Shortcuts\n\n| Shortcut | Action |\n|----------|--------|\n| `Tab` | Auto-complete file\u002Ffolder names |\n| `Up` \u002F `Down` | Navigate command history |\n| `F7` | Show command history popup |\n| `F3` | Repeat last command |\n| `Esc` | Clear current line |\n| `Ctrl+C` | Cancel running command |\n| `Alt+F7` | Clear command history |\n\n## Reference Files\n\nThe `references\u002F` folder contains detailed documentation:\n\n| File | Contents |\n|------|----------|\n| `tools-and-resources.md` | Windows tools, utilities, package managers, terminals |\n| `batch-files-and-functions.md` | Example scripts, techniques, best practices links |\n| `windows-commands.md` | Comprehensive A-Z Windows command reference |\n| `cygwin.md` | Cygwin user guide and FAQ |\n| `msys2.md` | MSYS2 installation, packages, and environments |\n| `windows-subsystem-on-linux.md` | WSL setup, commands, and documentation |\n\n## Asset Templates\n\nThe `assets\u002F` folder contains starter batch file template data, but as text files:\n\n| Template | Purpose |\n|----------|---------|\n| `executable.txt` | Standalone CLI tool with argument parsing |\n| `library.txt` | Reusable function library with CALL-able labels |\n| `task.txt` | Scheduled task \u002F automation script |\n",{"name":5,"description":7},"main","5269f7ea2d6c3a9bfda5ed878b6726cf509121fd","skills\u002Fbatch-files",5340,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot","https:\u002F\u002Fawesome-copilot.github.com\u002F","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-11 13:41:32",{"source":8,"skillName":5,"commands":71,"prompt":81,"zipAvailable":82},[72,75,78],{"tool":73,"command":74},"npx","npx skills add github\u002Fawesome-copilot --skill batch-files",{"tool":76,"command":77},"bunx","bunx skills add github\u002Fawesome-copilot --skill batch-files",{"tool":79,"command":80},"pnpm","pnpm dlx skills add github\u002Fawesome-copilot --skill batch-files","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002FSKILL.md",true,[84,90,94,98,104,108,112,116,120],{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"assets\u002Fexecutable.txt","ASSET","资产文件",5534,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Fassets\u002Fexecutable.txt",{"path":91,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":92,"sourceHtmlUrl":93},"assets\u002Flibrary.txt",7392,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Fassets\u002Flibrary.txt",{"path":95,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":96,"sourceHtmlUrl":97},"assets\u002Ftask.txt",5892,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Fassets\u002Ftask.txt",{"path":99,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Fbatch-files-and-functions.md","REFERENCE","参考文档",69454,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Freferences\u002Fbatch-files-and-functions.md",{"path":105,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":106,"sourceHtmlUrl":107},"references\u002Fcygwin.md",4675,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Freferences\u002Fcygwin.md",{"path":109,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":110,"sourceHtmlUrl":111},"references\u002Fmsys2.md",4390,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Freferences\u002Fmsys2.md",{"path":113,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":114,"sourceHtmlUrl":115},"references\u002Ftools-and-resources.md",9240,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Freferences\u002Ftools-and-resources.md",{"path":117,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":118,"sourceHtmlUrl":119},"references\u002Fwindows-commands.md",87766,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Freferences\u002Fwindows-commands.md",{"path":121,"resourceType":100,"resourceTypeDesc":101,"sizeBytes":122,"sourceHtmlUrl":123},"references\u002Fwindows-subsystem-on-linux.md",3212,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Freferences\u002Fwindows-subsystem-on-linux.md",[125,154,181,208,240,257],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":135,"publishedAt":55},"01M70KXZNX9ES38N2A8M58ZZMZ","supabase-rls-policies","Write, review, and test Supabase Row Level Security (RLS) policies so that one user cannot read or change another user's rows. Use when creating or changing tables, policies, views, or security definer functions in a Supabase project, when reviewing a migration that touches RLS, or when asked to prove user isolation with pgTAP tests that sign in as two users.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fsupabase-rls-policies\u002FSKILL.md",[131,134],{"categoryNo":132,"categoryName":133,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[136,137,138,139,140,141,142,143,144,44,145,146,147,148,149,150,43,151,152,153],"supabase","rls","supabase rls","supabase rls policies","project","when","review","change","read","security","isolation","tables","as","tests","prove","users","functions","with",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":161,"publishedAt":55},"01M70KWA5YWXDV6V8DZ19E3T2Y","skill-distribution-audit","Audit a skill collection before release or investigate installer omissions, archived\u002Ftemplate leakage, duplicate identities, and manifest drift. Reconcile the intended public source set, distribution manifest, and actual discovery output for a specified consumer version. Includes a deterministic set-comparison helper.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fskill-distribution-audit\u002FSKILL.md",[160],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[162,163,164,165,166,167,36,168,169,170,171,172,173,174,175,176,177,178,179,180],"distribution","skill distribution audit","audit","SET","deterministic","installer","discovery","comparison","helper","manifest","version","collection","drift","output","investigate","duplicate","template","release","reconcile",{"skillNo":182,"name":183,"nameZh":6,"description":184,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":185,"sourceHtmlUrl":186,"categories":187,"keywords":191,"publishedAt":55},"01M70KCJPFVW7PPQ49CC5R8JGK","logicapps-custom-code-net10-migration","Migrate Azure Logic Apps Standard local-function custom-code projects from .NET 8 to .NET 10. Use for legacy Logic Apps custom-code workspace upgrades, project\u002Fpackage configuration, custom-worker settings, publication, and integrated VS Code debugging. Not for ordinary .NET applications, standalone Azure Functions, Consumption workflows, or cloud deployment.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Flogicapps-custom-code-net10-migration\u002FSKILL.md",[188],{"categoryNo":189,"categoryName":190,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000030","开发工程师",[192,193,194,195,196,197,36,140,198,199,200,201,202,203,204,43,205,206,52,207],"custom","code","logicapps custom code net10 migration","migration","projects","standalone","deployment","applications","local","azure","worker","upgrades","package","apps","Legacy","workflows",{"skillNo":209,"name":210,"nameZh":6,"description":211,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":212,"sourceHtmlUrl":213,"categories":214,"keywords":219,"publishedAt":55},"01M6AEBN37RQMXJ3298PEY7PG1","winmd-api-search","Find and explore Windows desktop APIs. Use when building features that need platform capabilities — camera, file access, notifications, UI controls, AI\u002FML, sensors, networking, etc. Discovers the right API for a task and retrieves full type details (methods, properties, events, enumeration values).","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fwinmd-api-search\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fwinmd-api-search\u002FSKILL.md",[215,218],{"categoryNo":216,"categoryName":217,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":189,"categoryName":190,"taxonomyType":29,"taxonomyTypeDesc":30},[220,221,222,53,223,224,225,226,227,49,228,229,230,231,232,141,233,234,235,236,237,36,238,239],"winmd api search","search","api","desktop","file access","enumeration","ui","ml","networking","capabilities","notifications","explore","access","features","full","camera","events","platform","methods","controls",{"skillNo":241,"name":242,"nameZh":6,"description":243,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":244,"licenseFileUrl":245,"sourceHtmlUrl":246,"categories":247,"keywords":253,"publishedAt":55},"01M6AE571R3SC1ZGE202B3NB5S","resemble-detect","Deepfake detection and media safety — detect AI-generated audio, images, video, and text, trace synthesis sources, apply watermarks, verify speaker identity, and analyze media intelligence using Resemble AI","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fresemble-detect\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fresemble-detect\u002FSKILL.md",[248,249,252],{"categoryNo":216,"categoryName":217,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":250,"categoryName":251,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[254,165,49,255,256],"resemble detect","https","identity",{"skillNo":258,"name":259,"nameZh":6,"description":260,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":244,"licenseFileUrl":261,"sourceHtmlUrl":262,"categories":263,"keywords":268,"publishedAt":55},"01M6AE30BSK2HCY4TQQ22Z8JRD","quality-playbook","Run a complete quality engineering audit on any codebase. Derives behavioral requirements from the code, generates spec-traced functional tests, runs a three-pass code review with regression tests, executes a multi-model spec audit (Council of Three), and produces a consolidated bug report with TDD-verified patches. Finds the 35% of real defects that structural code review alone cannot catch. Works with any language. Trigger on 'quality playbook', 'spec audit', 'Council of Three', 'fitness-to-purpose', or 'coverage theater'.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fquality-playbook\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fquality-playbook\u002FSKILL.md",[264,267],{"categoryNo":265,"categoryName":266,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[269,270,271,272,193,142,9,164,273,274,255,275,276,277,278,279,280,281,282,283,284,285,149,286,287,288,289],"playbook","quality playbook","quality","code review","tdd","run","report","spec","bug report","council","engineering","functional","spec audit","bug","verified","multi-model","three","coverage","model","regression","structural"]