fabioc-aloha/alex-cognitive-architecture/terminal-command-safety

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Safe terminal command patterns — backtick escaping, output capture, and hang prevention

Install

npx vskill@latest install fabioc-aloha/alex-cognitive-architecture/terminal-command-safety

SKILL.md

Terminal Command Safety

Detailed patterns and examples for safe terminal command execution in AI agent contexts.

Backtick Hazard — Details

Backticks in terminal command arguments break across all shells:

  • bash/zsh: backtick = command substitution (echo "use ls here" executes ls)
  • PowerShell: backtick = escape character (echo "use n here"` inserts newline)

Ref: vscode#295620

Safe Pattern (bash)
bash
# Write content to temp file (single-quoted delimiter prevents interpolation)
cat > /tmp/body.md << 'EOF'
## Changes
- Added `MyClass` to the module
- Updated `config.py`
EOF
# Pass file to command
gh pr create --title "My PR" --body-file /tmp/body.md
rm /tmp/body.md
Safe Pattern (PowerShell)
powershell
$body = @'
## Changes
- Added `MyClass` to the module
'@
$body | Out-File -Encoding utf8 "$env:TEMP\body.md"
gh pr create --title "My PR" --body-file "$env:TEMP\body.md"
Remove-Item "$env:TEMP\body.md"

Output Capture — Examples

Refs: vscode#308610, vscode#308048, vscode#307173

Redirect to file
powershell
npm run build 2>&1 | Out-File -Encoding utf8 "$env:TEMP\build-output.txt"
Get-Content "$env:TEMP\build-output.txt" -Tail 50
Pipe through Out-String
powershell
git log --oneline -20 | Out-String
Sentinel pattern
powershell
npm test 2>&1; echo "EXIT_CODE:$LASTEXITCODE"
Alt-buffer avoidance
  • git log not git log | less (set $env:GIT_PAGER="cat")
  • Get-Help not man
  • gh issue view --json not gh issue view (which opens a pager)

Terminal Hanging — Examples

Refs: vscode#308610, vscode#306490

Async mode selection
text
mode=async for: npm start, dotnet run, docker compose up, long test suites
mode=sync with timeout=30000 for: npm install, git operations, single test files
Pre-answer interactive prompts
text
npm install --yes
rm -rf (not rm -ri)
az login --use-device-code
git commit --no-edit (merge commits)
Network timeouts
powershell
npm install --prefer-offline --no-audit
curl --max-time 30 --connect-timeout 10 $url

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/fabioc-aloha/alex-cognitive-architecture/terminal-command-safety/badge)](https://verified-skill.com/skills/fabioc-aloha/alex-cognitive-architecture/terminal-command-safety)

Something wrong with this skill or its page? Tell us.