Agent skill

Environment Awareness

by NoobyGains in NoobyGains/godmode

A skill your agent uses when starting a session, running shell commands, installing packages, or diagnosing platform-specific failures - detects OS, shell, runtime, package manager, and toolchain…

MITAuto-check passed

Install Environment Awareness

skills CLI
$ npx skills add NoobyGains/godmode --skill environment-awareness -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NoobyGains/godmode environment-awareness --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NoobyGains/godmode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/environment-awareness .claude/skills/environment-awareness && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
environment-awareness
GitHub stars
107
Token cost
~3.3k tokens
SKILL.md length
1,321 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when starting a session, running shell commands, installing packages, or diagnosing platform-specific failures - detects OS, shell, runtime, package manager, and toolchain…

  • Works in 6 steps: Operating System → Shell → Package Manager → …
  • Starting a session
  • SKILL.md covers Overview, The Prime Directive, When to Use and The Entry Protocol, plus 9 more sections
  • Calls psql, docker and node

What it does

Environment Awareness is an agent skill from NoobyGains/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

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Linux, Bash and PowerShell. The repository describes itself as: The AI development framework that thinks before it builds. 36 composable skills for Claude Code, Cursor, Codex, and OpenCode. The licence is MIT.

When your agent uses it

  • Starting a session
  • Running shell commands
  • Installing packages
  • Diagnosing platform-specific failures - detects OS

Example prompts

  • “/environment-awareness”

Requirements

  • Python 3
  • Node.js
  • Docker

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Operating System
  2. Shell
  3. Package Manager
  4. Runtime Versions
  5. Virtual Environments
  6. Container Detection

What it can do on your machine

Read from SKILL.md and the folder at commit 441103a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • psql
    • docker
    • node
    • python3
    • go
    • rustc
    • java
    • ruby
    • nvm
    • pyenv
    • mysql
    • sqlite3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Environment Awareness loads about 3.3k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 1,321 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from NoobyGains/godmode at commit 441103a, republished under its MIT licence (© NoobyGains). 1,321 words, ~3,281 tokens.

Download SKILL.mdSave it as .claude/skills/environment-awareness/SKILL.md (or your agent's skills folder).
name
environment-awareness
description
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

Environment Awareness

Overview

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.

The Prime Directive

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.

When to Use

Mandatory at session start:

  • First interaction in any new conversation
  • Switching to a different project or repository
  • After entering a container, VM, or remote machine

Also required when:

  • A command fails with "not found" or "not recognized"
  • Installing dependencies or running build scripts
  • Writing platform-specific code (file paths, process management, networking)
  • Diagnosing "works on my machine" problems

Do not skip when:

  • You think you already know the environment (verify, do not assume)
  • The user mentions their OS casually (confirm shell and toolchain too)
  • Working in CI/CD (runners have different environments than local machines)

The Entry Protocol

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.

Detection Flowchart

dot
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;
}

Detection Checklist

Run this sequence once per session. Results inform every subsequent command.

1. Operating System
MethodWorks OnCommand
Environment variableClaude Code / NodeCheck process.platform in tool context
unameLinux, macOS, Git Bashuname -s
System infoWindows (any shell)systeminfo or ver

Key distinctions:

  • win32 = Windows (regardless of 32/64-bit)
  • darwin = macOS
  • linux = Linux or WSL (check further with grep -i microsoft /proc/version for WSL)
2. Shell

NEVER assume bash. Windows alone has CMD, PowerShell, Git Bash, and WSL.

CheckCommandReveals
Shell variableecho $SHELLDefault shell (Unix)
PowerShell test$PSVersionTablePowerShell version
Process nameecho $0Current shell (Unix)
COMSPECecho %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.

3. Package Manager

Detection priority -- check lockfiles first:

LockfilePackage Manager
bun.lockb or bun.lockbun
pnpm-lock.yamlpnpm
yarn.lockyarn
package-lock.jsonnpm

If no lockfile found:

  1. Check packageManager field in package.json
  2. Check for global install: which pnpm || which yarn || which bun
  3. Default to npm only as last resort

For non-JS projects:

FileManager
Pipfile.lockpipenv
poetry.lockpoetry
uv.lockuv
requirements.txtpip
go.sumgo modules
Cargo.lockcargo
Gemfile.lockbundler
4. Runtime Versions

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
5. Virtual Environments
SignalIndicates
$VIRTUAL_ENV is setPython venv/virtualenv active
$CONDA_DEFAULT_ENV is setConda environment active
.python-version filepyenv version pinned
.nvmrc or .node-version fileNode version pinned
.ruby-version filerbenv/rvm version pinned
.tool-versions fileasdf version manager

When a version manager is detected: Use its commands (nvm use, pyenv shell) instead of assuming the global runtime is correct.

6. Container Detection
CheckInside Container?
/.dockerenv existsDocker
grep -q container /proc/1/cgroup 2>/dev/nullDocker/Podman
$container env var is setPodman
printenv KUBERNETES_SERVICE_HOSTKubernetes pod

System Inventory

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.

When to Run
  • Always: Git, GitHub CLI (needed by many GodMode skills)
  • If the project touches data: Database CLIs
  • If the project will be deployed: Cloud and container tools
  • If the project processes media or structured data: ffmpeg, jq, curl
  • Never run the full list blindly. Match checks to project type. A static site does not need a MongoDB probe.
Inventory Checks

Run each relevant check silently, redirecting stderr so missing tools do not produce noise:

Databases:

ToolCheckNotes
PostgreSQLpsql --version 2>/dev/nullCheck for pg_dump too if backups matter
MySQL / MariaDBmysql --version 2>/dev/nullMariaDB identifies itself in the version string
SQLitesqlite3 --version 2>/dev/nullOften pre-installed on macOS and Linux
MongoDBmongod --version 2>/dev/nullAlso check mongosh for the modern shell
Redisredis-server --version 2>/dev/nullAlso check redis-cli

Cloud & Hosting CLIs:

ToolCheck
AWS CLIaws --version 2>/dev/null
Google Cloudgcloud --version 2>/dev/null
Azure CLIaz --version 2>/dev/null
Vercelvercel --version 2>/dev/null
Supabasesupabase --version 2>/dev/null
Fly.iofly version 2>/dev/null
Netlifynetlify --version 2>/dev/null
Railwayrailway --version 2>/dev/null

Container Tools:

ToolCheck
Dockerdocker --version 2>/dev/null
Docker Composedocker compose version 2>/dev/null
Podmanpodman --version 2>/dev/null

Developer Tools:

ToolCheck
Gitgit --version 2>/dev/null
GitHub CLIgh --version 2>/dev/null
curlcurl --version 2>/dev/null
jqjq --version 2>/dev/null
ffmpegffmpeg -version 2>/dev/null
Reporting Format

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
Show full SKILL.md (586 more words)Show less
Principles
  1. Silence errors and force exit code 0. Always redirect stderr to /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.
    bash
    # 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
  2. Scope to project. Only check categories relevant to the codebase. Read the project's config files, Dockerfile, CI config, or deployment manifests to decide what matters.
  3. Check once, reference often. Store results in your working context. Do not re-probe mid-session unless the user installs something new.
  4. Feed downstream skills. The inventory directly informs deployment-advisor (what can we deploy to?), task-planning (what constraints exist?), and project-bootstrap (what do we need to install?).

Platform-Specific Command Mappings

Use the correct command for the detected environment:

OperationLinux/macOSWindows CMDWindows PowerShellGit Bash on Windows
List filesls -ladirGet-ChildItemls -la
Find processps aux | greptasklistGet-Processps aux | grep
Set env varexport VAR=valset VAR=val$env:VAR = "val"export VAR=val
Null device/dev/nullNUL$null/dev/null
Path separator:;;:
Delete filerm filedel fileRemove-Item filerm file
Find filesfind . -namedir /s /bGet-ChildItem -Recursefind . -name
Check portlsof -i :PORTnetstat -anGet-NetTCPConnectionnetstat -an

When to Probe vs Assume

CategoryActionReason
OSALWAYS probeAffects every command's syntax
ShellALWAYS probeDetermines quoting, piping, redirection
Package managerALWAYS probeWrong manager corrupts lockfile
Runtime versionsProbe on first useOnly matters when running that runtime
Virtual environmentsProbe when relevantWrong env installs to wrong location
ContainerProbe when behavior is unexpectedContainers lack many host tools

Cognitive Traps

RationalizationWhat 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.

Guardrails -- HALT and Detect

Stop and run detection if you catch yourself:

  • Running ls without knowing if the shell supports it
  • Using /dev/null without confirming Unix-like shell
  • Running npm install without checking for other lockfiles
  • Using python instead of python3 without version checking
  • Assuming ~ expands correctly (it does not in CMD)
  • Writing path strings with / without confirming OS
  • Using grep flags without confirming GNU vs BSD
  • Piping commands without knowing if the shell supports |

Every item on this list means: halt command execution. Probe first.

Integration

Complementary skills:

  • godmode:project-bootstrap -- Environment detection runs during project setup
  • godmode:fault-diagnosis -- Environment mismatch is a common root cause of mysterious failures
  • godmode:workspace-isolation -- Worktree and container setup needs correct platform commands
  • godmode:deployment-advisor -- System inventory results feed directly into deployment recommendations and platform selection

The Bottom Line

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.

© NoobyGains, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/environment-awareness of NoobyGains/godmode.

Open the folder on GitHubat commit 441103a

Compare with similar skills

Environment Awareness next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Environment Awareness compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Environment Awareness this skillNoobyGains/godmode107—~3.3kAutomated safety check: PassMIT
Tbtoolsxuzhougeng/wispterm443—~2.3kAutomated safety check: PassMIT
Docker Via WslJMBeresford/retrom2.1k—~832Automated safety check: PassMIT
UvBiFangKNT/mtga1.2k—~541Automated safety check: PassAGPL-3.0
Oh My PoshJanDeDobbeleer/oh-my-posh24k—~319Automated safety check: PassMIT
Image Manipulation Image Magickgithub/awesome-copilot40k1 repos~1.7kAutomated safety check: NotesMIT

Similar skills

  • Tbtools

    xuzhougeng/wispterm

    A skill your agent uses when the user asks about TBtools, TBtools-II, TBtools RPC API, TBtools CLI, or bioinformatics operations available through TBtools such as sequence manipulation, BLAST…

    443 GitHub stars~2.3k tokensUpdated 4 days ago
    Research & ScienceAuto-check passed
  • Docker Via Wsl

    JMBeresford/retrom

    A skill your agent uses when YOU (the AI agent) are running on Windows OUTSIDE WSL (Git Bash/MSYS/PowerShell shell) and need to run ANY docker / docker compose command.

    2.1k GitHub stars~832 tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Uv

    BiFangKNT/mtga

    在 Windows/macOS/Linux 上使用 uv 执行 Python 运行、依赖同步、锁文件管理、Python 版本管理与工具命令(uv run、uv sync、uv lock、uv python、uv tool)。当任务涉及“用 uv 运行脚本/命令”“临时依赖(--with)”“锁文件一致性(--locked/--frozen)”“跨平台…

    1.2k GitHub stars~541 tokensUpdated 3 mo ago
    Auto-check passed
  • Oh My Posh

    JanDeDobbeleer/oh-my-posh

    Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on PowerShell, zsh, bash, or fish.

    24k GitHub stars~319 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Image Manipulation Image Magick

    github/awesome-copilot

    Official

    Process and manipulate images using ImageMagick. An agent skill from github/awesome-copilot.

    40k GitHub starsUsed in 1 repo~1.7k tokens
    Data & AnalyticsAuto-check: notes
  • Tapd Iteration Init

    TencentBlueKing/bk-bcs

    迭代执行流水线启动器。分三个阶段执行:信息检查(验证 git 环境、获取迭代信息、 解析迭代分支)→ 恢复检测(已有状态文件时判定恢复策略)→ 新流程初始化(创建分支、 迭代目录和 iteration-state.json)。

    841 GitHub stars~1.3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from NoobyGains/godmode

All 34 skills in this repo
  • Activation

    NoobyGains/godmode

    A skill your agent uses when starting any conversation - establishes how to locate and invoke skills, mandating Skill tool usage before ANY response including clarifying questions

    107 GitHub stars~2.4k tokensUpdated 7 mo ago
    Auto-check passed
  • Agent Messaging

    NoobyGains/godmode

    A skill your agent uses when dispatching subagents, composing prompts for teammates, structuring handoff reports, or managing context boundaries between agents.

    107 GitHub stars~3k tokensUpdated 7 mo ago
    Auto-check passed
  • Codebase Research

    NoobyGains/godmode

    A skill your agent uses when building ANY feature within an existing project - search the current codebase for existing patterns, conventions, similar implementations, and established approaches…

    107 GitHub stars~3.2k tokensUpdated 7 mo ago
    Auto-check: notes
  • Completion Gate

    NoobyGains/godmode

    A skill your agent uses when about to declare work done, fixed, or passing, before committing or opening PRs - demands executing verification commands and reading their output before making any…

    107 GitHub stars~1.6k tokensUpdated 7 mo ago
    Auto-check passed
  • Comprehension Check

    NoobyGains/godmode

    A skill your agent uses when implementing any substantial feature, multi-file modification, or architectural change - produces a plain-language walkthrough of every alteration so the developer can…

    107 GitHub stars~1.5k tokensUpdated 7 mo ago
    Auto-check passed
  • Delegated Execution

    NoobyGains/godmode

    A skill your agent uses when executing implementation plans with independent tasks in the current session

    107 GitHub stars~2.4k tokensUpdated 7 mo ago
    Auto-check passed

Questions about Environment Awareness

What does Environment Awareness do?

A skill your agent uses when starting a session, running shell commands, installing packages, or diagnosing platform-specific failures - detects OS, shell, runtime, package manager, and toolchain…. Environment Awareness is an agent skill from NoobyGains/godmode.

When should I use Environment Awareness?

Environment Awareness fits situations like: starting a session; running shell commands; installing packages; diagnosing platform-specific failures - detects OS.

How do I install Environment Awareness in Claude Code?

Run `npx skills add NoobyGains/godmode --skill environment-awareness -a claude-code`. Or copy the skill folder (skills/environment-awareness in NoobyGains/godmode) into .claude/skills/environment-awareness in your project. Claude Code loads it when a task matches its description.

How do I install Environment Awareness in Codex?

Run `npx skills add NoobyGains/godmode --skill environment-awareness -a codex`. Or copy the skill folder (skills/environment-awareness in NoobyGains/godmode) into .agents/skills/environment-awareness in your project. Codex loads it when a task matches its description.

Can I use Environment Awareness in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NoobyGains/godmode --skill environment-awareness -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/environment-awareness, .gemini/skills/environment-awareness, .github/skills/environment-awareness and .opencode/skills/environment-awareness in your project.

What does Environment Awareness need to run?

Going by SKILL.md and its folder, Environment Awareness needs the command-line tools its instructions call (psql, docker, node, python3, go and rustc). Our summary lists: Python 3; Node.js; Docker.

Does Environment Awareness access the network?

SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Environment Awareness safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Environment Awareness use?

Environment Awareness is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Environment Awareness use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Environment Awareness?

Skills that share tags, products or a category with Environment Awareness: Tbtools (xuzhougeng/wispterm, 443 stars), Docker Via Wsl (JMBeresford/retrom, 2.1k stars), Uv (BiFangKNT/mtga, 1.2k stars) and Oh My Posh (JanDeDobbeleer/oh-my-posh, 24k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Environment Awareness?

NoobyGains (a GitHub user) maintains it in NoobyGains/godmode, which has 107 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on March 9, 2026.

Source: NoobyGains/godmode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.