shell-shortcutsConfigure cross-platform terminal shortcut commands on a new machine, including proxy_on/proxy_off (env vars + git global proxy), goto (persistent path jump...
Install via ClawdBot CLI:
clawdbot install wangyendt/shell-shortcutsGoal: make a fresh machine behave the same across Windows / macOS / Ubuntu with a small set of commands:
proxy_on / proxy_off: toggle terminal proxy (env vars + Git global proxy)goto: persistent path shortcuts (e.g. goto work)gpu: show NVIDIA GPU status (nvidia-smi wrapper; Windows/Ubuntu only)This skill is intentionally opinionated:
goto experience.http://127.0.0.1:7890socks5://127.0.0.1:7890localhost,127.0.0.1,.qualcomm.com,*.amazonaws.comEdit your PowerShell profile: $PROFILE
Add (or replace) a block like below. The goto DB is $HOME\.goto_paths.json.
# >>> shell-shortcuts >>>
function proxy_off {
param([switch]$Quiet)
Remove-Item Env:http_proxy,Env:https_proxy,Env:all_proxy,Env:no_proxy -ErrorAction SilentlyContinue
Remove-Item Env:HTTP_PROXY,Env:HTTPS_PROXY,Env:ALL_PROXY,Env:NO_PROXY -ErrorAction SilentlyContinue
if (Get-Command git -ErrorAction SilentlyContinue) {
git config --global --unset http.proxy 2>$null | Out-Null
git config --global --unset https.proxy 2>$null | Out-Null
}
if (-not $Quiet) { Write-Host "Proxy is OFF" }
}
function proxy_on {
param(
[string]$HttpProxyUrl = "http://127.0.0.1:7890",
[string]$SocksProxyUrl = "socks5://127.0.0.1:7890",
[string]$NoProxyList = "localhost,127.0.0.1,.qualcomm.com,*.amazonaws.com"
)
proxy_off -Quiet
$env:http_proxy = $HttpProxyUrl
$env:https_proxy = $HttpProxyUrl
$env:HTTP_PROXY = $HttpProxyUrl
$env:HTTPS_PROXY = $HttpProxyUrl
$env:all_proxy = $SocksProxyUrl
$env:ALL_PROXY = $SocksProxyUrl
$env:no_proxy = $NoProxyList
$env:NO_PROXY = $NoProxyList
if (Get-Command git -ErrorAction SilentlyContinue) {
git config --global http.proxy $HttpProxyUrl | Out-Null
git config --global https.proxy $HttpProxyUrl | Out-Null
}
Write-Host "Proxy is ON"
Write-Host " HTTP/HTTPS: $HttpProxyUrl"
Write-Host " SOCKS5: $SocksProxyUrl"
Write-Host " NO_PROXY: $NoProxyList"
}
function _goto_db_path {
Join-Path $HOME ".goto_paths.json"
}
function _goto_load {
$db = _goto_db_path
if (-not (Test-Path -LiteralPath $db)) { return @{} }
try {
$raw = Get-Content -Raw -Encoding UTF8 -LiteralPath $db
if (-not $raw.Trim()) { return @{} }
$obj = $raw | ConvertFrom-Json
$ht = @{}
foreach ($p in $obj.PSObject.Properties) { $ht[$p.Name] = [string]$p.Value }
return $ht
} catch {
throw "Failed to parse goto DB: $db. Fix JSON or delete it."
}
}
function _goto_save([hashtable]$ht) {
$db = _goto_db_path
$dir = Split-Path -Parent $db
if (-not (Test-Path -LiteralPath $dir)) { New-Item -ItemType Directory -Path $dir | Out-Null }
($ht | ConvertTo-Json -Depth 5) | Set-Content -Encoding UTF8 -LiteralPath $db
}
function goto {
param(
[Parameter(Position = 0)][string]$Cmd,
[Parameter(ValueFromRemainingArguments = $true)][string[]]$Rest
)
$ht = _goto_load
switch ($Cmd) {
{ $_ -in @($null, "", "ls", "list") } {
if ($ht.Count -eq 0) { Write-Host "No shortcuts. Use: goto add <key> <path>"; return }
Write-Host "Available shortcuts:"
foreach ($k in ($ht.Keys | Sort-Object)) {
"{0,-12} -> {1}" -f $k, $ht[$k] | Write-Host
}
return
}
"add" {
if ($Rest.Count -lt 2) { throw "Usage: goto add <shortcut> <path>" }
$key = $Rest[0]
$path = ($Rest | Select-Object -Skip 1) -join " "
if ($path -like "~*") { $path = $path -replace "^~", $HOME }
$resolved = Resolve-Path -LiteralPath $path -ErrorAction Stop
$ht[$key] = $resolved.Path
_goto_save $ht
Write-Host "Added: $key -> $($ht[$key])"
return
}
{ $_ -in @("rm","remove","del") } {
if ($Rest.Count -ne 1) { throw "Usage: goto remove <shortcut>" }
$key = $Rest[0]
$ht.Remove($key) | Out-Null
_goto_save $ht
Write-Host "Removed: $key"
return
}
"clear" {
_goto_save @{}
Write-Host "All shortcuts cleared."
return
}
default {
if (-not $Cmd) { return }
if (-not $ht.ContainsKey($Cmd)) {
Write-Host "Unknown shortcut: $Cmd"
Write-Host "Tip: goto list"
return 1
}
Set-Location -LiteralPath $ht[$Cmd]
return
}
}
}
function gpu {
$cmd = Get-Command nvidia-smi -ErrorAction SilentlyContinue
if (-not $cmd) {
Write-Host "nvidia-smi not found (need NVIDIA driver/tools)."
return 1
}
& $cmd.Path
}
# Optional: Conda auto-activate (edit these)
# $CondaRoot = "D:\\ProgramData\\miniconda3"
# $CondaEnv = "wayne3.10"
# if (Test-Path -LiteralPath (Join-Path $CondaRoot "Scripts\\conda.exe")) {
# $hook = (& (Join-Path $CondaRoot "Scripts\\conda.exe") "shell.powershell" "hook") 2>$null | Out-String
# if ($hook) { Invoke-Expression $hook }
# conda activate $CondaEnv
# }
# <<< shell-shortcuts <<<
Usage:
proxy_on
proxy_off
goto list
goto add work D:\work
goto work
gpu
CMD has a reserved goto keyword. Use jump as the real command, and optionally alias goto to jump for interactive sessions via doskey.
Recommended layout:
C:\Users\\bin\ Create C:\Users\:
@echo off
set "PATH=%USERPROFILE%\bin;%PATH%"
REM Optional: conda auto-activate (edit these)
REM call "D:\ProgramData\miniconda3\condabin\conda.bat" activate wayne3.10
REM Interactive alias only (scripts/cmd /c should call jump directly)
doskey goto=jump $*
Enable AutoRun (current user):
reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun /t REG_SZ /d "%USERPROFILE%\cmd_startup.cmd" /f
Implement these .cmd files under %USERPROFILE%\bin:
proxy_on.cmd / proxy_off.cmd: set/unset proxy env vars and set/unset Git global proxy.
gpu.cmd: run nvidia-smi.
jump.cmd: persistent shortcut DB at %USERPROFILE%\.goto_paths (format: key|C:\abs\path).
If you need exact templates, read shell-shortcuts/references/windows-cmd.md.
Add functions to ~/.zshrc or ~/.bashrc:
proxy_on / proxy_offgoto (persistent DB at ~/.goto_paths)gpu (requires nvidia-smi)Templates are in shell-shortcuts/references/unix.md (copy/paste and adjust proxy defaults).
AI Usage Analysis
Analysis is being generated⦠refresh in a few seconds.
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
Command-line tool to manage Google Workspace services including Gmail, Calendar, Drive, Sheets, Docs, Slides, Contacts, Tasks, People, Groups, and Keep.
Runs shell commands inside a dedicated tmux session named claw, captures, and returns the output, with safety checks for destructive commands.
A modern text-based browser. Renders web pages in the terminal using headless Firefox.
Write robust, portable shell scripts. Use when parsing arguments, handling errors properly, writing POSIX-compatible scripts, managing temp files, running commands in parallel, managing background processes, or adding --help to scripts.
NotebookLM CLI wrapper via `node {baseDir}/scripts/notebooklm.mjs`. Use for auth, notebooks, chat, sources, notes, sharing, research, and artifact generation/download.