Know what machine you run on, what resources it has and which tools are available before you plan work. Use at session start, before heavy jobs (builds, model runs, large downloads), before suggesting commands, and when a command fails with "not found" or out-of-memory.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Environment Aware?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/silvertree2010-environment-aware)
---
name: environment-aware
description: Know what machine you run on, what resources it has and which tools are available before you plan work. Use at session start, before heavy jobs (builds, model runs, large downloads), before suggesting commands, and when a command fails with "not found" or out-of-memory.
---
# environment-aware
Do not assume a Linux box with everything installed. Look first, then plan.
## Probe
Use the first source that exists:
1. `[aware]` lines from the session-start hook (`machine`, `cpu`, `ram`, `gpu`, `disk`, `tools`).
2. `aware env`.
3. Raw commands, once per session:
- OS and architecture: `uname -a`, `cat /etc/os-release`, `sw_vers`
- CPU and RAM: `nproc`, `free -h` or `sysctl hw.memsize hw.ncpu`
- GPU: `nvidia-smi`, `lspci | grep -i vga`, Apple silicon = unified memory
- Disk: `df -h .`
- Tools: `command -v git docker python3 node ...`
- Container or cloud: `/.dockerenv`, `CLAUDE_CODE_REMOTE`, `CODESPACES`, `/proc/1/cgroup`
4. No shell: you are in a chat-only environment. Say so. Do not write instructions that assume you can run them yourself.
## Classify
From the probe, decide which kind of environment you are in:
- **Local workstation:** the user's real machine. Other apps and sessions share it. Be careful with RAM, disk, GPU and anything visible on screen.
- **Server or homelab:** often headless, often long-running services. Do not restart things you did not start.
- **Ephemeral cloud or container:** state disappears, no GUI, often no GPU, limited network. Push results somewhere persistent or hand them back to the user.
- **Chat only:** no execution. Give commands for the user to run and say exactly where.
## Act on it
- Pick commands that exist here: `brew` vs `apt` vs `pacman` vs `nix`, `python3` vs `python`, GNU vs BSD `sed`/`date`.
- Before a heavy job, compare its need with free RAM, disk and GPU memory. If it does not fit with margin, scale it down, run it elsewhere, or ask the user.
- Disk more than about 90 % full: warn before writing large outputs.
- High load (load average above the core count): expect slow builds. Avoid adding more parallel work.
- Missing tool: say so and offer the install command for this OS. Do not silently switch to a different stack.
- Re-probe after long pauses (see time-aware) or when something fails unexpectedly.
Mention the environment once at the start if it matters for the task. After that, only mention it when it changes a decision.