add-command
Add a new bash command to the ps-bash transpiler and runtime
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Add a new bash command to the ps-bash transpiler and runtime
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Run the release-blocking Pester gate (tests/PsBash.Tests.ps1) the reliable way — build cmdlets, refresh beside-module DLLs, isolate PSModulePath from a stale installed PsBash, run Invoke-Pester.
Use (or extend) the shared PsBuild PowerShell-text builder and the OS-interface FileSystemHelpers/RunChildProcess helpers instead of hand-rolling PS strings or platform branches
Add new grammar production to the bash parser (new token, AST node, or syntax)
Debug a bash command that produces wrong output or crashes in ps-bash
Rebuild and publish the local ps-bash exe for testing in opencode
Audit one bash feature against the QA rubric and write its section into docs/testing/interactive-parity-audit.md
| name | add-command |
| description | Add a new bash command to the ps-bash transpiler and runtime |
| disable-model-invocation | true |
文言:先查重;PsEmitter加case用EmitPassthrough;psm1實作Invoke-Bash*;加transpile+e2e測試;test.sh;重建exe;清module快取。
Add bash command support for: $ARGUMENTS
TryEmitMappedCommand in src/PsBash.Transpiler/Parser/PsEmitter.cs + Invoke-Bash* in src/PsBash.Module/PsBash.psm1.PsEmitter.cs TryEmitMappedCommand): case "cmd": result = EmitPassthrough("Invoke-BashCmd", args); return true;. NO custom emit method — EmitPassthrough only.PsBash.psm1 Invoke-BashCmd): $Arguments=[string[]]$args; $pipelineInput=@($input); manual flag loop; pipeline mode passes ORIGINAL objects (defensive split for multi-line — see @.claude/rules/runtime.md); file mode; text → Emit-BashLine, typed → New-BashObject.PsEmitterTests.cs): assert PsEmitter.Transpile("… | cmd -flag") contains Invoke-BashCmd.dotnet run --project src/PsBash.Shell -- -c '…'../scripts/test.sh. 7. Rebuild: dotnet publish src/PsBash.Shell -c Release -r win-x64 -p:PublishAot=false --self-contained. 8. Clear cache: rm -rf "$TEMP/ps-bash/module-*".