/godmode:environment-awarenessfrom GodMode
Probes the OS, shell, and package manager before running commands to avoid syntax mismatches and dependency errors. Use when starting a session, switching projects, or after command failures.
Ships in GodMode. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Most wasted commands in an agent session come from a wrong guess about where the command runs: Unix syntax in PowerShell, npm in a pnpm project, a global Python instead of the project's virtual environment. You find out where you are with a few cheap probes and then write every command for that place. Probe once, then act on what you saw, not on what is typical.
NO SHELL COMMAND UNTIL YOU KNOW THE OS, THE SHELL AND THE PACKAGE MANAGER
No exceptions. No workarounds. No shortcuts.
Required:
Skip:
Read what the harness already tells you. Many harnesses state the platform, shell and working directory in the session context. Treat that as the first probe result, not as a guess, and note it. If it names two shells (for example a primary PowerShell and a POSIX shell for scripts), record which one each command will run in.
Confirm the OS and shell with one probe in the shell you will actually use. Pick the probe for that shell from references/platform-commands.md. The evidence is the probe output, for example MINGW64_NT-10.0 from uname -s (Git Bash on Windows) or a PSVersion of 7.x.
Detect the package manager from the lockfile, never from habit. List the project root and match lockfiles to managers with the table below. If two lockfiles disagree, stop and ask the user which one is authoritative; do not pick one.
Detect pinned runtimes and active environments. Look for version pins (.nvmrc, .node-version, .python-version, .tool-versions, rust-toolchain.toml, the engines or packageManager field in package.json, requires-python in pyproject.toml) and for a present or active virtual environment (a .venv/ directory, the VIRTUAL_ENV or CONDA_DEFAULT_ENV variables). Probe a runtime's version only when you are about to use it.
Check for a container or remote context only when the project hints at one (a Dockerfile, a .devcontainer/, CI configuration) or when behaviour is unexpected. Probes are in the reference file.
Write down the result in one line and use it for every later command in the session:
Env: Windows 11, Git Bash (MINGW64) for commands, user terminal PowerShell 7, pnpm (pnpm-lock.yaml), Node 24 (.nvmrc), Python via .venv
Re-probe on change. A new install, a new shell, moving into a different repository, or an unexplained failure invalidates the line. Probe again rather than patching commands by trial and error.
| File in project root | Use | Never |
|---|---|---|
bun.lock (or legacy bun.lockb) | bun | npm, which ignores the lockfile and writes its own |
pnpm-lock.yaml | pnpm | npm or yarn |
yarn.lock | yarn | npm |
package-lock.json | npm | another manager |
uv.lock | uv (uv sync, uv run) | bare pip install into the venv |
poetry.lock | poetry | pip |
Pipfile.lock | pipenv | pip |
requirements*.txt only | pip inside the project venv | the system interpreter |
go.sum | go modules | |
Cargo.lock | cargo | |
Gemfile.lock | bundle | gem install for project dependencies |
composer.lock | composer |
No lockfile: read the packageManager field of package.json, then the README and CI configuration, then ask. Default to npm only for a brand-new project where the user has stated no preference.
The packageManager field pins a manager version through Corepack. Corepack is no longer bundled with Node.js 25 and later, so on those versions run corepack --version before relying on it; the user may need to install it or the manager directly.
Windows is where guessing fails most often. Check these five facts every time.
Three shells, three syntaxes. cmd, PowerShell (Windows PowerShell 5.1 and PowerShell 7) and Git Bash (an MSYS2 bash) can all exist on one machine. Quoting, variables, redirection and chaining differ; the mapping table in the reference file shows how. PowerShell gained && and || only in version 7, so a chained command that works in pwsh fails in Windows PowerShell 5.1.
The bash on PATH may be the WSL launcher. Windows can carry a bash.exe that starts WSL (in C:\Windows\System32 or under WindowsApps), and it can resolve before Git Bash. Calling it enters a different Linux environment without the user's tools, keys or files, or fails silently. Check which binary resolves with where.exe bash; call Git Bash by its full path (normally C:\Program Files\Git\bin\bash.exe); never start WSL unless the user asked for it.
Paths have three forms. C:\Users\me (Windows), C:/Users/me (mixed, accepted by most Windows programs and by Node, Python and Git) and /c/Users/me (Git Bash). Convert inside Git Bash with cygpath -w, cygpath -m or cygpath -u. Quote every path, because Program Files contains a space. In files you write for others, use forward slashes or the language's path API instead of hand-built backslashes.
Git Bash rewrites arguments that start with /. Passing /opt/x, or a flag such as -L/regex/, to a native Windows program turns it into a Windows path. Prefix the command with MSYS_NO_PATHCONV=1, or double the leading slash, when you need the literal text.
python and python3 may be Store aliases. On Windows these names can be app execution aliases that open the Microsoft Store instead of running Python. Use the py launcher or the project venv's Scripts\python.exe, and confirm with --version that a real interpreter answers.
Also: virtual environments keep executables in Scripts\ on Windows and bin/ elsewhere; PowerShell may refuse to run Activate.ps1 until the user allows local scripts; and activation is rarely needed, because calling the venv's interpreter by path is enough. VIRTUAL_ENV is set only by activation, so its absence does not prove there is no venv.
| Fact | Action | Why |
|---|---|---|
| OS | Probe once per environment | Changes every command's syntax |
| Shell | Probe once per shell you use | Quoting, chaining and redirection differ |
| Package manager | Read the lockfile in every new project | The wrong manager rewrites or corrupts the lockfile |
| Runtime version | Probe on first use | Only matters when that runtime runs |
| Virtual environment | Check before any install or run | Installs land in the wrong interpreter otherwise |
| Container or remote | Probe when hinted or when behaviour is odd | Containers lack host tools and paths |
| Installed tools (databases, cloud CLIs, container tools) | Probe only the tools the task needs | A static site needs no database probe |
Inventory probes print versions and must not turn missing tools into red failures: send errors to the null device and end the chain with a command that succeeds (examples in the reference file). A missing tool is information, not an error. Report the inventory compactly:
Available: PostgreSQL 17, Docker 28, gh 2.80
Not found: Redis, AWS CLI
| Rationalisation | Truth |
|---|---|
| "It's probably Linux." | You have no evidence. The session context or one uname -s settles it in a second. |
| "The user said Windows, so PowerShell." | Windows has cmd, two PowerShells, Git Bash and WSL. Confirm the shell, not just the OS. |
| "npm is the default." | npm in a pnpm, yarn or bun project writes a second lockfile and breaks CI installs. |
| "I'll fix it if the command fails." | A destructive command with the wrong path syntax can succeed on the wrong target. Failed installs leave half-written state. |
"bash is bash." | On Windows a bare bash can start WSL, in effect a different machine. Check which binary resolves. |
| "The venv is probably active." | Activation is optional and invisible to a fresh shell. Call the venv's interpreter by path, or check first. |
| "CI runs the same as my machine." | Runners differ in OS, shell, tool versions and file-system case sensitivity. Read the CI configuration. |
| "I probed an hour ago." | A new install, shell or directory makes the old result stale. Re-probe after any change. |
Never:
bash on Windows, or start WSL, without the user asking for it.sed, grep or date on macOS; check, or use portable forms.Always:
godmode:project-bootstrap: a new project needs this probe first, so the scaffold uses tools that exist here.godmode:fault-diagnosis: an environment mismatch is a common root cause; hand off when the probe does not explain a failure.godmode:workspace-isolation: worktrees and containers are new environments; probe inside them.godmode:system-design: the inventory of installed databases, container tools and cloud CLIs feeds hosting decisions.godmode:grounding: tool flags and versions that the probe does not show are verified against current documentation, not memory.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Bash, Powershell, Linux, macOS
33 skills in this plugin
/agent-briefingUse when writing a prompt for a subagent or teammate, deciding how much context another agent needs, writing or reading a handoff report between agents, or sending a message to another agent mid-task./codebase-conventionsUse when about to add or change code in an existing codebase: a new file, module, route, component, service, test, migration, error path or dependency, especially in a project the agent did not write or has not yet surveyed in this session./code-reviewUse when a task, feature or bug fix is implemented and before it is committed, merged or handed back to the user, and when the user asks for a review of a change, a branch or a pull request.npx claudepluginhub noobygains/godmode --plugin godmodeOther plugins' skills for the same job