Repository navigation
Protect disk serials and install review skills #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vartaxe
wants to merge
15
commits into
main
Choose a base branch
from
copilot/review-and-skills-2026-10-17
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f5e78ea
Protect disk serials and install review skills
vartaxe 9436a4b
fix: align docs audit checksum with Git blob
vartaxe 53fac6b
docs: fix reviewed skill guidance
vartaxe cfb58c8
docs: complete project release gates
vartaxe 25f00e9
fix: address Copilot review findings
vartaxe c967d57
fix: complete docs audit coverage
vartaxe 3b2d5b1
fix: address Copilot review findings
vartaxe b1c44e4
fix: refresh validation manifest
vartaxe 0fef644
Fix docs-sync audit review findings
vartaxe d4ec022
Fix follow-up Copilot review findings
vartaxe f5837b3
Track pushd and popd for command checks
vartaxe 2633580
Fix fresh Copilot review findings
vartaxe acb1cb7
Address Copilot review round 8 findings
vartaxe b163a69
Address Copilot review round 9 findings
vartaxe 4ab83f1
Fix docs drift audit edge cases (round 10)
vartaxe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,206 @@ | ||
| @echo off | ||
| setlocal DisableDelayedExpansion | ||
| set "_exitCodeMyTool=0" | ||
| REM myTool | ||
| :: A standalone command-line tool template with argument parsing. | ||
| :: | ||
| :: usage: myTool [options] [1] [2] | ||
| :: [1] = input file path or value | ||
| :: [2] = output file path (optional) | ||
| :: | ||
| :: options: | ||
| :: /? Show this help message | ||
| :: -h Show this help message | ||
| :: --help Show this help message | ||
| :: -v Show version information | ||
| :: --verbose Enable verbose output | ||
| :: | ||
| :: examples: | ||
| :: > myTool "C:\data\input.txt" | ||
| :: > myTool "C:\data\input.txt" "C:\data\output.txt" | ||
| :: > myTool --verbose "C:\data\input.txt" | ||
| :: | ||
| set "_helpLinesMyTool=22" | ||
|
|
||
| :: ======================================================================== | ||
| :: TEMPLATE INSTRUCTIONS | ||
| :: 1. Find/Replace "myTool" with your executable name (camelCase). | ||
| :: 2. Find/Replace "MyTool" with your executable name (PascalCase). | ||
| :: 3. Update the help block above (lines 5-22) for your tool. | ||
| :: 4. Implement your logic in :_runMyTool. | ||
| :: 5. Add any new variables to :_removeBatchVariablesMyTool. | ||
| :: ======================================================================== | ||
|
|
||
| :: Config variables. | ||
| set "_versionMyTool=1.0.0" | ||
| set "_verboseMyTool=0" | ||
| set "_tmpDirCreatedMyTool=0" | ||
| set "_tmpDirMyTool=" | ||
|
|
||
| :: Define paths. | ||
| set "_scriptDirMyTool=%~dp0" | ||
| set "_scriptNameMyTool=%~n0" | ||
|
|
||
| :: Parse arguments into variables. | ||
| set "_parOneMyTool=%~1" | ||
| set "_checkParOneMyTool=-%_parOneMyTool%-" | ||
| set "_parTwoMyTool=%~2" | ||
| set "_checkParTwoMyTool=-%_parTwoMyTool%-" | ||
| set "_parThreeMyTool=%~3" | ||
| set "_checkParThreeMyTool=-%_parThreeMyTool%-" | ||
|
|
||
| :: ----------------------------------------------------------------------- | ||
| :: Handle help and version flags. | ||
| :: ----------------------------------------------------------------------- | ||
| if "%_parOneMyTool%"=="/?" ( | ||
| call :_showHelpMyTool | ||
| goto _removeBatchVariablesMyTool | ||
| ) | ||
| if /i "%_parOneMyTool%"=="-h" ( | ||
| call :_showHelpMyTool | ||
| goto _removeBatchVariablesMyTool | ||
| ) | ||
| if /i "%_parOneMyTool%"=="--help" ( | ||
| call :_showHelpMyTool | ||
| goto _removeBatchVariablesMyTool | ||
| ) | ||
| if /i "%_parOneMyTool%"=="-v" ( | ||
| echo %_scriptNameMyTool% version %_versionMyTool% | ||
|
|
||
| goto _removeBatchVariablesMyTool | ||
| ) | ||
|
|
||
| :: ----------------------------------------------------------------------- | ||
| :: Handle --verbose flag (shift arguments if present). | ||
| :: ----------------------------------------------------------------------- | ||
| if /i "%_parOneMyTool%"=="--verbose" ( | ||
| set "_verboseMyTool=1" | ||
| set "_parOneMyTool=%~2" | ||
| set "_checkParOneMyTool=-%~2-" | ||
| set "_parTwoMyTool=%~3" | ||
| set "_checkParTwoMyTool=-%~3-" | ||
| ) | ||
|
|
||
| :: Create temp directory for intermediate files. | ||
| call :_makeTempDirMyTool | ||
| if errorlevel 1 ( | ||
| set "_exitCodeMyTool=1" | ||
| goto _removeBatchVariablesMyTool | ||
| ) | ||
|
|
||
| :: ----------------------------------------------------------------------- | ||
| :: Validate required input and start execution. | ||
| :: ----------------------------------------------------------------------- | ||
| if "%_checkParOneMyTool%"=="--" ( | ||
| echo ERROR: No input specified. Run "%_scriptNameMyTool% /?" for usage. 1>&2 | ||
| set "_exitCodeMyTool=1" | ||
| goto _removeBatchVariablesMyTool | ||
|
cmendesvdl marked this conversation as resolved.
Resolved
|
||
| ) | ||
|
|
||
| call :_startMyTool | ||
| set "_exitCodeMyTool=%errorlevel%" | ||
| goto _removeBatchVariablesMyTool | ||
|
|
||
| :: ======================================================================== | ||
| :: MAIN LOGIC | ||
| :: ======================================================================== | ||
|
|
||
| :_startMyTool | ||
| if "%_verboseMyTool%"=="1" ( | ||
| echo [VERBOSE] Input: "%_parOneMyTool%" | ||
| echo [VERBOSE] Output: "%_parTwoMyTool%" | ||
| ) | ||
|
|
||
| REM Validate input file exists. | ||
| if NOT EXIST "%_parOneMyTool%" ( | ||
| echo ERROR: Input file not found: "%_parOneMyTool%" 1>&2 | ||
| exit /b 1 | ||
| ) | ||
|
|
||
| call :_runMyTool | ||
| exit /b %errorlevel% | ||
|
|
||
| :_runMyTool | ||
| REM =================================================================== | ||
| REM TODO: Replace this section with your tool's logic. | ||
| REM =================================================================== | ||
| echo Processing: "%_parOneMyTool%" | ||
|
|
||
| if NOT "%_checkParTwoMyTool%"=="--" ( | ||
| echo Output to: "%_parTwoMyTool%" | ||
| REM Example: copy input to output. | ||
| REM copy /Y "%_parOneMyTool%" "%_parTwoMyTool%" >nul | ||
| ) | ||
|
|
||
| echo Done. | ||
| goto :eof | ||
|
|
||
| :: ======================================================================== | ||
| :: SUPPORT FUNCTIONS | ||
| :: ======================================================================== | ||
|
|
||
| :_showHelpMyTool | ||
| echo: | ||
| for /f "skip=3 delims=" %%a in ('findstr /n "^" "%~f0"') do ( | ||
| set "_line=%%a" | ||
| setlocal EnableDelayedExpansion | ||
| for /f "delims=:" %%n in ("!_line!") do set "_lineNum=%%n" | ||
| if !_lineNum! GTR %_helpLinesMyTool% ( | ||
| endlocal | ||
| goto :eof | ||
| ) | ||
| set "_text=!_line:*:=!" | ||
| if defined _text ( | ||
| echo !_text:~4! | ||
| ) else ( | ||
| echo: | ||
| ) | ||
| endlocal | ||
| ) | ||
| goto :eof | ||
|
|
||
| :_makeTempDirMyTool | ||
| set "_tmpDirCreatedMyTool=0" | ||
| for /L %%i in (1,1,10) do call :_tryMakeTempDirMyTool | ||
| if "%_tmpDirCreatedMyTool%"=="0" ( | ||
| echo ERROR: Could not create a unique temporary directory. 1>&2 | ||
| exit /b 1 | ||
| ) | ||
| exit /b 0 | ||
|
|
||
| :_tryMakeTempDirMyTool | ||
| if "%_tmpDirCreatedMyTool%"=="1" goto :eof | ||
| set "_tmpDirMyTool=%TEMP%\%~n0_%RANDOM%%RANDOM%" | ||
| 2>nul mkdir "%_tmpDirMyTool%" | ||
| if not errorlevel 1 set "_tmpDirCreatedMyTool=1" | ||
| goto :eof | ||
|
|
||
| :: ======================================================================== | ||
| :: CLEANUP — Remove all batch variables. | ||
| :: ======================================================================== | ||
| :_removeBatchVariablesMyTool | ||
| set _helpLinesMyTool= | ||
| set _versionMyTool= | ||
| set _verboseMyTool= | ||
| set _scriptDirMyTool= | ||
| set _scriptNameMyTool= | ||
| set _parOneMyTool= | ||
| set _checkParOneMyTool= | ||
| set _parTwoMyTool= | ||
| set _checkParTwoMyTool= | ||
| set _parThreeMyTool= | ||
| set _checkParThreeMyTool= | ||
| REM Append new variables above this line. | ||
|
|
||
| if "%_tmpDirCreatedMyTool%"=="1" if EXIST "%_tmpDirMyTool%" ( | ||
| rmdir /S /Q "%_tmpDirMyTool%" >nul 2>nul | ||
| if errorlevel 1 ( | ||
| echo ERROR: Could not remove temporary directory: "%_tmpDirMyTool%" 1>&2 | ||
| if "%_exitCodeMyTool%"=="0" set "_exitCodeMyTool=1" | ||
| ) else if EXIST "%_tmpDirMyTool%" ( | ||
| echo ERROR: Could not remove temporary directory: "%_tmpDirMyTool%" 1>&2 | ||
| if "%_exitCodeMyTool%"=="0" set "_exitCodeMyTool=1" | ||
| ) | ||
| ) | ||
| set _tmpDirMyTool= | ||
| set _tmpDirCreatedMyTool= | ||
| exit /b %_exitCodeMyTool% | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.