[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BX5FE0MPK7EXN5ZT590428":3,"skill-same:01M6BX5FE0MPK7EXN5ZT590428":110},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":15,"repositoryHtmlUrl":51,"repositoryHomepageUrl":17,"ownerHtmlUrl":52,"ownerBlogUrl":53,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M6BX5FE0MPK7EXN5ZT590428","wait-what","沟通重新表述","Stop. That last message did not land: re-pitch it.","停。上一条消息没有被理解（没有传达到位）：重新表述它。","yrahul3910\u002Fdotfiles","yrahul3910","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8930954?v=4","01M6BX4Q28SQREB3XFY3BAQ6YC","Rahul Yedida","01M6BX4Q737JXBCN69KPPT5TG9",0,"Apache-2.0",null,"https:\u002F\u002Fgithub.com\u002Fyrahul3910\u002Fdotfiles\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fwait-what\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BS5011KJDVSRXG1DC4P666","普通用户","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C1YEW2680C003GGBD6QCKB","回复风格与输出控制","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40],"wait what","wait","land","stop","message","pitch","it","re","last","true","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":46,"description":47},"batch-files","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.","main","5269f7ea2d6c3a9bfda5ed878b6726cf509121fd",".agents\u002Fskills\u002Fwait-what","https:\u002F\u002Fgithub.com\u002Fyrahul3910\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fyrahul3910","https:\u002F\u002Fryedida.me","CS PhD @ NC State; Sr. Data Scientist @ LexisNexis","2026-11-13 01:37:12",{"source":9,"skillName":46,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add yrahul3910\u002Fdotfiles --skill batch-files",{"tool":62,"command":63},"bunx","bunx skills add yrahul3910\u002Fdotfiles --skill batch-files",{"tool":65,"command":66},"pnpm","pnpm dlx skills add yrahul3910\u002Fdotfiles --skill batch-files","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fyrahul3910\u002Fdotfiles\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fwait-what\u002FSKILL.md",true,[70,76,80,84,90,94,98,102,106],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"assets\u002Fexecutable.txt","ASSET","资产文件",5534,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Fassets\u002Fexecutable.txt",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"assets\u002Flibrary.txt",7392,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Fassets\u002Flibrary.txt",{"path":81,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":82,"sourceHtmlUrl":83},"assets\u002Ftask.txt",5892,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Fassets\u002Ftask.txt",{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"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":91,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Fcygwin.md",4675,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Freferences\u002Fcygwin.md",{"path":95,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fmsys2.md",4390,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Freferences\u002Fmsys2.md",{"path":99,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Ftools-and-resources.md",9240,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Freferences\u002Ftools-and-resources.md",{"path":103,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":104,"sourceHtmlUrl":105},"references\u002Fwindows-commands.md",87766,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fawesome-copilot\u002Fblob\u002Fmain\u002Fskills\u002Fbatch-files\u002Freferences\u002Fwindows-commands.md",{"path":107,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":108,"sourceHtmlUrl":109},"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",[111,151,191,224,251,279],{"skillNo":112,"name":113,"nameZh":114,"description":115,"descriptionZh":116,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":117,"categories":118,"keywords":125,"publishedAt":41},"01M6BX5T7VBBNA50W28PGXFVBK","pr-babysit","GitHub PR 全程跟进与修复","Watch a GitHub pull request through CI and bot reviews (Copilot, Codex, Claude, Greptile), fix feedback locally as it arrives, and push only once everything has settled. Use when asked to babysit, shepherd, or watch a PR until it is green and reviewed. Not for a one-off look at PR comments or CI status.","全程跟进 GitHub Pull Request（PR）的 CI 与机器人评审（Copilot、Codex、Claude、Greptile），在反馈到达时于本地修复，并仅在一切稳定后再推送。适用于需要照看、引导或跟进 PR 直至 CI 全绿且完成评审的请求。不适用于一次性查看 PR 评论或 CI 状态。","https:\u002F\u002Fgithub.com\u002Fyrahul3910\u002Fdotfiles\u002Fblob\u002Fmaster\u002F.pi\u002Fagent\u002Fskills\u002Fpr-babysit\u002FSKILL.md",[119,122],{"categoryNo":120,"categoryName":121,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":123,"categoryName":124,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理",[126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150],"pr","pr babysit","babysit","bot","github","codex","status","copilot","pull request","pull","push","ci","pr comments","feedback","ci status","fix","use","only","green","shepherd","as","comments","reviews","for","when",{"skillNo":152,"name":153,"nameZh":154,"description":155,"descriptionZh":156,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":157,"categories":158,"keywords":165,"publishedAt":41},"01M6BX5PZTGZCZMWB46DEZY1RB","okf","OKF 知识包创建与维护","Read, create, and update Open Knowledge Format (OKF) knowledge bundles — wikis of markdown concept files with YAML frontmatter, per Google's OKF v0.1 spec. Use when browsing or consuming an OKF bundle, when asked to create a knowledge wiki for a codebase or data system, or when editing a directory of .md files that carry `type:` frontmatter alongside index.md\u002Flog.md files. Covers the frontmatter schema, bundle-root-relative linking, index.md maintenance, and log.md changelog conventions.","读取、创建和更新开放知识格式（Open Knowledge Format，OKF）知识包——即遵循 Google OKF v0.1 规范、由带有 YAML frontmatter 的 Markdown 概念文件组成的 Wiki。适用于浏览或使用 OKF 知识包、被要求为代码库或数据系统创建知识 Wiki，或编辑包含 `type:` frontmatter 以及 index.md\u002Flog.md 文件的 .md 文件目录。涵盖 frontmatter 架构、相对于知识包根目录的链接、index.md 维护以及 log.md 变更日志约定。","https:\u002F\u002Fgithub.com\u002Fyrahul3910\u002Fdotfiles\u002Fblob\u002Fmaster\u002F.pi\u002Fagent\u002Fskills\u002Fokf\u002FSKILL.md",[159,162],{"categoryNo":160,"categoryName":161,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TRAEZFJ43R95HPEBJYG","知识工作者",{"categoryNo":163,"categoryName":164,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRFRAYBCBW9WKDY9TCSHY3","知识管理与沉淀",[153,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,142,182,183,184,185,186,187,188,189,149,190,150],"directory","google","spec","create","update","changelog","index","yaml","data","open","markdown","wiki","knowledge","system","format","editing","schema","maintenance","log","files","type","wikis","with","concept","browsing",{"skillNo":192,"name":193,"nameZh":194,"description":195,"descriptionZh":196,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":197,"categories":198,"keywords":205,"publishedAt":41},"01M6BX5MWN3YRXQ447DBGGTHM5","design-doc","设计文档与架构提案撰写","Write an explicit design document, RFC, or consequential architecture proposal with adversarial review. Use for decisions with material ownership, compatibility, migration, or operational consequences. Do not activate for ordinary comparisons, syntax questions, or small implementation choices.","撰写明确的设计文档、RFC 或具有重大影响的架构提案，并进行对抗性评审。适用于涉及重要职责归属、兼容性、迁移或运维后果的决策。不适用于普通比较、语法问题或小型实现选择。","https:\u002F\u002Fgithub.com\u002Fyrahul3910\u002Fdotfiles\u002Fblob\u002Fmaster\u002F.pi\u002Fagent\u002Fskills\u002Fdesign-doc\u002FSKILL.md",[199,202],{"categoryNo":200,"categoryName":201,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BT7QTSZKB08EAW9P9ZCDNQ","设计评审与架构优化",{"categoryNo":203,"categoryName":204,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C4ZVS0ZJKF2T2G58PW5VR2","系统架构师",[206,207,208,209,210,211,212,213,214,215,142,216,217,218,219,220,221,188,222,149,223],"design","doc","design doc","review","architecture","adversarial review","RFC","syntax","decisions","write","migration","document","activate","do","material","proposal","questions","adversarial",{"skillNo":225,"name":226,"nameZh":227,"description":228,"descriptionZh":229,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":230,"categories":231,"keywords":236,"publishedAt":41},"01M6BX5K2H9A93MD355DKQ21MV","background-terminals","后台终端命令管理","Run and manage long-lived shell commands in background terminals. Use for dev servers, watchers, streaming builds, and other commands that should keep running while the agent continues working.","在后台终端中运行和管理长期运行的 shell 命令。用于开发服务器、监视器（watchers）、流式构建，以及其他需要在智能体继续工作期间保持运行的命令。","https:\u002F\u002Fgithub.com\u002Fyrahul3910\u002Fdotfiles\u002Fblob\u002Fmaster\u002F.pi\u002Fagent\u002Fskills\u002Fbackground-terminals\u002FSKILL.md",[232,233],{"categoryNo":120,"categoryName":121,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":234,"categoryName":235,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理",[237,238,239,240,241,242,142,243,244,245,246,247,248,149,249,250],"background terminals","background","run","dev","streaming","shell","manage","commands","watchers","long","keep","dev servers","servers","running",{"skillNo":252,"name":253,"nameZh":254,"description":255,"descriptionZh":256,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":257,"categories":258,"keywords":265,"publishedAt":41},"01M6BX5H39CTKJKDXRA35MNGRW","writing-for-agents","智能体指令与提示词编写","Write or revise skills, AGENTS.md, CLAUDE.md, prompts, and other instructions consumed by coding agents. Use when agent behavior, skill routing, instruction structure, or prompt maintenance is part of the task.","编写或修订供编码智能体使用的 skills、AGENTS.md、CLAUDE.md、prompts 及其他指令。当任务涉及智能体行为、技能路由、指令结构或提示词维护时使用。","https:\u002F\u002Fgithub.com\u002Fyrahul3910\u002Fdotfiles\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[259,262],{"categoryNo":260,"categoryName":261,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",{"categoryNo":263,"categoryName":264,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发",[266,267,149,268,269,270,271,215,272,273,142,274,183,275,276,277,278,150],"writing","writing for agents","coding agents","routing","coding","prompt","instructions","behavior","prompts","task","structure","revise","skill routing",{"skillNo":280,"name":281,"nameZh":282,"description":283,"descriptionZh":284,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":285,"categories":286,"keywords":293,"publishedAt":41},"01M6BX5DHQCQZY819F0RQE1E6B","verify-real-surface","真实UI\u002FCLI\u002FAPI行为验证","Verify a requested behavior through its real UI, CLI, or API surface when tests alone are insufficient. Use after user-facing behavior changes or when asked to prove behavior; do not use for structural-only edits or broad exploratory audits.","当仅靠测试不足以验证时，通过真实的 UI、CLI 或 API 界面验证所请求的行为。用于面向用户的行为变更之后，或被要求证明某项行为时；不要用于仅结构性的修改或大范围的探索性审计。","https:\u002F\u002Fgithub.com\u002Fyrahul3910\u002Fdotfiles\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fverify-real-surface\u002FSKILL.md",[287,290],{"categoryNo":288,"categoryName":289,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":291,"categoryName":292,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[294,295,296,297,298,273,299,142,143,219,300,301,149,302,303,150],"verify","verify real surface","cli","ui","api","user","structural","tests","changes","prove"]