Token导航 LogoToken导航

Agent Skill · 研究检索

environment-awareness(环境意识)

environment-awareness 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

environment-awareness 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 66,577。

总安装 261周安装 11GitHub Stars 24下载 92核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:environment-awareness(环境意识)
来源仓库:https://github.com/noobygains/godmode
仓库路径:skills/environment-awareness
安装命令:
npx skills add https://github.com/noobygains/godmode --skill environment-awareness
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/noobygains/godmode --skill environment-awareness

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

environment-awareness 防止 AI Agent 在不了解系统环境的情况下盲目执行命令,提升操作安全性。适用于 Codex、Claude、Cursor、Gemini CLI 中需跨 OS、包管理器或虚拟环境协作的任务场景。

强制在运行任何 shell 命令前先检测操作系统、shell 类型和 Python/Node 版本等关键信息。遵循‘一次探测,十次避免’原则,禁止无环境确认的自动化脚本执行,尤其涉及生产系统时需双重校验。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/environment-awareness

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/noobygains/godmode --skill environment-awarene…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

environment-awareness 怎么安装?

在终端执行 npx skills add https://github.com/noobygains/godmode --skill environment-awareness。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

environment-awareness 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

environment-awareness 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

environment-awareness 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

environment-awareness 用的人多吗?

公开数据是累计安装 261 次,近一周安装 11 次,下载 92 次,GitHub 24 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

environment-awareness 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
environment-awareness

环境意识 · 本页

26124接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

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

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

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. # 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 process`ps aux \grep`tasklistGet-Process`ps 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.

平台分布

Codex

35.11%
按下载量换算32

Claude

27.31%
按下载量换算25

Cursor

18.35%
按下载量换算17

Gemini CLI

9.83%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills