From godmode
Use when starting a session, running shell commands, installing packages, or diagnosing platform-specific failures - detects OS, shell, runtime, package manager, and toolchain before any command execution
npx claudepluginhub noobygains/godmode --plugin godmodeThis skill uses the workspace's default tool permissions.
The most common AI agent failure mode: running Linux commands on Windows, using npm when the project uses pnpm, ignoring active virtual environments. Every wrong command wastes time and can cause real damage.
Validates dev environment by checking OS, runtime versions (Node, Python, Rust, Go, Ruby), installed tools, port availability, env vars, and disk space. Use for new projects, machine switches, or 'works on my machine' bugs.
Guides setup of dev environments: identifies tools like Node/Python/Go/Docker/Git, provides platform-specific installs for macOS/Linux/Windows, configures env vars/deps, verifies functionality.
Manages Python development environments (venv, conda) by checking status with bash commands, confirming with user before installations, and providing best practices for safe package setup.
Share bugs, ideas, or general feedback.
The most common AI agent failure mode: running Linux commands on Windows, using npm when the project uses pnpm, ignoring active virtual environments. Every wrong command wastes time and can cause real damage.
Core principle: DETECT the environment before issuing ANY shell command. One probe now prevents ten failed commands later.
No exceptions. No workarounds. No shortcuts.
NO SHELL COMMANDS WITHOUT KNOWING THE TARGET ENVIRONMENT
If you have not confirmed OS, shell, and package manager, you are not authorized to run commands.
Mandatory at session start:
Also required when:
Do not skip when:
BEFORE running any shell command:
1. PLATFORM: Have you confirmed OS and architecture?
2. SHELL: Do you know which shell is interpreting your commands?
3. PACKAGE MANAGER: Have you checked for lockfiles?
4. RUNTIMES: Do you know which language runtimes are available?
5. VIRTUAL ENV: Are there active virtual environments or version managers?
If any answer is NO: probe first, command second.
digraph env_detect {
rankdir=TB;
node [shape=box, style=filled, fillcolor="#e8e8e8"];
start [label="Session Start", shape=oval, fillcolor="#ccffcc"];
os [label="1. Detect OS\nprocess.platform\nor uname", shape=diamond, fillcolor="#ffffcc"];
shell [label="2. Detect Shell\n$SHELL / $PSVersionTable\n/ COMSPEC", shape=diamond, fillcolor="#ffffcc"];
pkg [label="3. Detect Package Manager\nCheck lockfiles\nin project root", shape=diamond, fillcolor="#ffffcc"];
runtime [label="4. Detect Runtimes\nnode/python/go\n--version", shape=diamond, fillcolor="#ffffcc"];
venv [label="5. Check Virtual Envs\nVIRTUAL_ENV / CONDA\nnvm / rbenv", shape=diamond, fillcolor="#ffffcc"];
container [label="6. Container Check\n/.dockerenv\nor cgroup", shape=diamond, fillcolor="#ffffcc"];
ready [label="Environment Known\nProceed with\ncorrect commands", shape=oval, fillcolor="#ccffcc"];
start -> os -> shell -> pkg -> runtime -> venv -> container -> ready;
}
Run this sequence once per session. Results inform every subsequent command.
| Method | Works On | Command |
|---|---|---|
| Environment variable | Claude Code / Node | Check process.platform in tool context |
| uname | Linux, macOS, Git Bash | uname -s |
| System info | Windows (any shell) | systeminfo or ver |
Key distinctions:
win32 = Windows (regardless of 32/64-bit)darwin = macOSlinux = Linux or WSL (check further with grep -i microsoft /proc/version for WSL)NEVER assume bash. Windows alone has CMD, PowerShell, Git Bash, and WSL.
| Check | Command | Reveals |
|---|---|---|
| Shell variable | echo $SHELL | Default shell (Unix) |
| PowerShell test | $PSVersionTable | PowerShell version |
| Process name | echo $0 | Current shell (Unix) |
| COMSPEC | echo %COMSPEC% | CMD path (Windows) |
Critical: On Windows, the Claude Code / AI agent shell context is often Git Bash, but the user's terminal may be PowerShell. Commands you generate for the user to copy must match THEIR shell.
Detection priority -- check lockfiles first:
| Lockfile | Package Manager |
|---|---|
bun.lockb or bun.lock | bun |
pnpm-lock.yaml | pnpm |
yarn.lock | yarn |
package-lock.json | npm |
If no lockfile found:
packageManager field in package.jsonwhich pnpm || which yarn || which bunFor non-JS projects:
| File | Manager |
|---|---|
Pipfile.lock | pipenv |
poetry.lock | poetry |
uv.lock | uv |
requirements.txt | pip |
go.sum | go modules |
Cargo.lock | cargo |
Gemfile.lock | bundler |
Probe on first use, not eagerly. Only check what the project actually needs.
node --version # Node.js
python3 --version # Python (use python3, not python, on macOS/Linux)
go version # Go
rustc --version # Rust
java --version # Java
ruby --version # Ruby
| Signal | Indicates |
|---|---|
$VIRTUAL_ENV is set | Python venv/virtualenv active |
$CONDA_DEFAULT_ENV is set | Conda environment active |
.python-version file | pyenv version pinned |
.nvmrc or .node-version file | Node version pinned |
.ruby-version file | rbenv/rvm version pinned |
.tool-versions file | asdf version manager |
When a version manager is detected: Use its commands (nvm use, pyenv shell) instead of assuming the global runtime is correct.
| Check | Inside Container? |
|---|---|
/.dockerenv exists | Docker |
grep -q container /proc/1/cgroup 2>/dev/null | Docker/Podman |
$container env var is set | Podman |
printenv KUBERNETES_SERVICE_HOST | Kubernetes pod |
After confirming the platform and shell, discover what tools, databases, cloud CLIs, and services the user has installed. This inventory feeds directly into planning -- if the user has SQLite but not PostgreSQL, or Docker but not Podman, downstream skills like deployment-advisor and task-planning can make smarter recommendations instead of guessing.
Run each relevant check silently, redirecting stderr so missing tools do not produce noise:
Databases:
| Tool | Check | Notes |
|---|---|---|
| PostgreSQL | psql --version 2>/dev/null | Check for pg_dump too if backups matter |
| MySQL / MariaDB | mysql --version 2>/dev/null | MariaDB identifies itself in the version string |
| SQLite | sqlite3 --version 2>/dev/null | Often pre-installed on macOS and Linux |
| MongoDB | mongod --version 2>/dev/null | Also check mongosh for the modern shell |
| Redis | redis-server --version 2>/dev/null | Also check redis-cli |
Cloud & Hosting CLIs:
| Tool | Check |
|---|---|
| AWS CLI | aws --version 2>/dev/null |
| Google Cloud | gcloud --version 2>/dev/null |
| Azure CLI | az --version 2>/dev/null |
| Vercel | vercel --version 2>/dev/null |
| Supabase | supabase --version 2>/dev/null |
| Fly.io | fly version 2>/dev/null |
| Netlify | netlify --version 2>/dev/null |
| Railway | railway --version 2>/dev/null |
Container Tools:
| Tool | Check |
|---|---|
| Docker | docker --version 2>/dev/null |
| Docker Compose | docker compose version 2>/dev/null |
| Podman | podman --version 2>/dev/null |
Developer Tools:
| Tool | Check |
|---|---|
| Git | git --version 2>/dev/null |
| GitHub CLI | gh --version 2>/dev/null |
| curl | curl --version 2>/dev/null |
| jq | jq --version 2>/dev/null |
| ffmpeg | ffmpeg -version 2>/dev/null |
Report findings concisely. Do not dump raw version output -- extract the version number and summarize:
Available: PostgreSQL 16.2, Docker 27.1, gh 2.45, SQLite 3.43
Not found: Redis, AWS CLI, Podman
/dev/null AND append ; true at the end of chained version checks. Missing tools produce non-zero exit codes that surface as red errors in Claude Code. A missing tool is information, not a failure — the output must never show red.
# WRONG: last missing tool causes exit 127 (red error in Claude Code)
psql --version 2>/dev/null; redis-server --version 2>/dev/null; mongod --version 2>/dev/null
# RIGHT: force clean exit regardless of which tools are missing
psql --version 2>/dev/null; redis-server --version 2>/dev/null; mongod --version 2>/dev/null; true
deployment-advisor (what can we deploy to?), task-planning (what constraints exist?), and project-bootstrap (what do we need to install?).Use the correct command for the detected environment:
| Operation | Linux/macOS | Windows CMD | Windows PowerShell | Git Bash on Windows |
|---|---|---|---|---|
| List files | ls -la | dir | Get-ChildItem | ls -la |
| Find process | ps aux | grep | tasklist | Get-Process | ps aux | grep |
| Set env var | export VAR=val | set VAR=val | $env:VAR = "val" | export VAR=val |
| Null device | /dev/null | NUL | $null | /dev/null |
| Path separator | : | ; | ; | : |
| Delete file | rm file | del file | Remove-Item file | rm file |
| Find files | find . -name | dir /s /b | Get-ChildItem -Recurse | find . -name |
| Check port | lsof -i :PORT | netstat -an | Get-NetTCPConnection | netstat -an |
| Category | Action | Reason |
|---|---|---|
| OS | ALWAYS probe | Affects every command's syntax |
| Shell | ALWAYS probe | Determines quoting, piping, redirection |
| Package manager | ALWAYS probe | Wrong manager corrupts lockfile |
| Runtime versions | Probe on first use | Only matters when running that runtime |
| Virtual environments | Probe when relevant | Wrong env installs to wrong location |
| Container | Probe when behavior is unexpected | Containers lack many host tools |
| Rationalization | What Is Actually True |
|---|---|
| "It's probably Linux" | 30% of developers use Windows. macOS is another 25%. Probe first. |
| "bash is universal" | Windows CMD and PowerShell have fundamentally different syntax. Git Bash exists but is not guaranteed. |
| "npm is the default" | Using npm in a pnpm project corrupts the lockfile and breaks CI. |
| "I'll fix it if the command fails" | A failed rm -rf with wrong path syntax can still delete data. Failed installs leave broken state. |
| "The user said Windows, so PowerShell" | Could be CMD, Git Bash, WSL, or Cygwin. Confirm the shell, not just the OS. |
| "CI and local are the same" | CI runners use different OS, different shell, different tool versions. Probe there too. |
Stop and run detection if you catch yourself:
ls without knowing if the shell supports it/dev/null without confirming Unix-like shellnpm install without checking for other lockfilespython instead of python3 without version checking~ expands correctly (it does not in CMD)/ without confirming OSgrep flags without confirming GNU vs BSD|Every item on this list means: halt command execution. Probe first.
Complementary skills:
One detection probe now > ten failed commands later
Know the OS. Know the shell. Know the package manager. Before the first command. Every single session.