environment-awareness
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "environment-awareness":https://skillpi.com/zh/skills/deepskill-30fd77a3050096bfef03b07b21e02901ad69faca1a0e63ce3c9e4cd67b4d6307。安装前核对上游来源和版本:https://github.com/NoobyGains/godmode。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
在启动会话、运行 shell 命令、安装软件包或诊断平台特定故障时使用。于执行任何命令前检测操作系统、shell、运行时环境、包管理器和工具链。
介绍来源: third_party · NoobyGains · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 翻译待完成,请参阅来源文档。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: environment-awareness
description: "Use when about to run the first shell command in a session or a new project, when installing dependencies, when a command fails with not found or not recognised, when writing platform-specific code or paths, or when entering a container, virtual machine, remote host or CI runner."Environment Awareness
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.
The Prime Directive
NO SHELL COMMAND UNTIL YOU KNOW THE OS, THE SHELL AND THE PACKAGE MANAGER
No exceptions. No workarounds. No shortcuts.
When to Use
Required:
- The first command of a session, and the first command after switching project, repository, container, VM or remote host.
- Before installing, upgrading or removing any dependency.
- When a command fails with "command not found", "is not recognized", exit code 127, or a path that does not exist.
- When writing code or scripts that touch paths, processes, line endings, permissions or the network.
- When giving the user a command to paste: it must fit the user's terminal, which may differ from yours.
Skip:
- You already probed this environment in this session and nothing has changed since (no new install, no new shell, no new directory tree).
- Pure reading and editing of files with no command execution.
The Protocol
-
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.0fromuname -s(Git Bash on Windows) or aPSVersionof 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, theenginesorpackageManagerfield inpackage.json,requires-pythoninpyproject.toml) and for a present or active virtual environment (a.venv/directory, theVIRTUAL_ENVorCONDA_DEFAULT_ENVvariables). 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.
Lockfiles and Managers
<!-- Verified 2026-10-25: bun.lock is the text default since Bun 1.2 (https://bun.sh/docs/install/lockfile); uv.lock and .venv (https://docs.astral.sh/uv/guides/projects/). -->
| 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.
<!-- Corepack is not distributed with Node.js from v25 (https://nodejs.org/dist/latest/docs/api/corepack.html). -->
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 Specifics
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 inpwshfails in Windows PowerShell 5.1. <!-- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_pipeline_chain_operators --> -
The
bashon PATH may be the WSL launcher. Windows can carry abash.exethat starts WSL (inC:\Windows\System32or underWindowsApps), 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 withwhere.exe bash; call Git Bash by its full path (normallyC:\Program Files\Git\bin\bash.exe); never start WSL unless the user asked for it. <!-- https://claudeissues.com/issue/23556-bug-windows-hook-sh-auto-detection-resolves-to-wsl-bash-exe-instead-of-git-bash ; https://github.com/gitpython-developers/GitPython/pull/2201 --> -
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 withcygpath -w,cygpath -morcygpath -u. Quote every path, becauseProgram Filescontains a space. In files you write for others, use forward slashes or the language's path API instead of hand-built backslashes. <!-- https://www.msys2.org/docs/filesystem-paths/ --> -
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 withMSYS_NO_PATHCONV=1, or double the leading slash, when you need the literal text. <!-- https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md (Known issues) --> -
pythonandpython3may be Store aliases. On Windows these names can be app execution aliases that open the Microsoft Store instead of running Python. Use thepylauncher or the project venv'sScripts\python.exe, and confirm with--versionthat a real interpreter answers. <!-- https://docs.python.org/3/using/windows.html -->
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.
<!-- https://docs.python.org/3/library/venv.html -->
When to Probe and When to Assume
| 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
Cognitive Traps
| 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. |
Guardrails
Never:
- Run an install command before reading the project's lockfiles.
- Call a bare
bashon Windows, or start WSL, without the user asking for it. - Hand the user a command written for your shell when their terminal is a different one.
- Install into the system interpreter when the project has a virtual environment.
- Build Windows paths by string concatenation in code; use the language's path API.
- Assume GNU flags for
sed,grepordateon macOS; check, or use portable forms.
Always:
- Record the one-line environment summary and reuse it.
- Quote paths, and use forward slashes in files meant for several platforms.
- Use the manager the lockfile names and the runtime version the pin names.
- Re-probe after an unexplained "not found" before changing the command again.
- Check exact command forms in references/platform-commands.md when crossing shells.
Connections
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.
版本历史
-
v2.1.2
GitHub ↗
原版更新说明
### Changed - The repository root holds only what a harness looks for there. The version list moved from `.version-bump.json` to `scripts/version-files.json`; the OpenCode entry point is `.opencode/plugins/godmode.js` directly (`package.json` `main` and `exports`), so the root `index.js` shim is gone. ### Removed - Gemini CLI support (`gemini-extension.json`, `GEMINI.md`, the Gemini tool reference). Google retired Gemini CLI for individual users on 18 June 2026 and moved extensions to Antigravity plugins; GodMode's Antigravity plugin is that route. The manifest had never been verified on a live install.
-
v2.1.1
GitHub ↗
原版更新说明
The one-round Codex review of the 2.1.0 diff (`docs/verification/codex-review-2.1.0.md`) found two validator bugs and five wording problems; all are fixed here. ### Fixed - Validator: the 20,000-byte skill cap and the 8,000-byte protocol position are measured in UTF-8 bytes, not UTF-16 characters, and a skill without a `## The Protocol` section now fails instead of slipping past the position check. - `intent-discovery`: the one-question-per-message guardrail names the builder-check round as its single exception, and the flow graph sends a small change straight to approval, as step 9 says. - `tests/acceptance/claude-code-stop-check.sh`: a refusal that quotes the forbidden sentence at the end of the message no longer counts as making the claim. - Changelog and reference wording: an Interfaces block is required only when another task consumes or produces the names; the reviewer agent's tool list is `Read, Grep, Glob, Bash` with writes forbidden by its prose, not "read-only". See the 2.1.0 notes for the features this patch completes.
-
v2.1.0
GitHub ↗
原版更新说明
Seven months of Claude Code changes and a pass over nine peer projects, read from their source (research in `docs/research/2026-10-25-claude-code-and-peers-2-1.md`). The theme: rules that must hold every time move from prose into mechanisms the harness enforces, and plans and designs lean on what superpowers 7.0.1 learned the hard way. ### Added - `completion-gate` arms a one-shot stop check on Claude Code: a prompt-type `Stop` hook declared in the skill's frontmatter (`once: true`) re-reads the final message and sends an unsupported done/fixed/passing claim back for evidence, then removes itself. Verified end to end on Claude Code 2.1.310 (`tests/acceptance/claude-code-stop-check.sh`, `docs/verification/claude-code-stop-check-2026-10-25.md`). Other harnesses ignore the field. - `bin/godmode`: a plan-workspace helper (`workspace`, `brief`, `review-package`, `ledger`, `status`) on the shell PATH where the harness adds a plugin's `bin/` (Claude Code, Antigravity); `delegated-execution` and `inline-execution` prefer it and keep the plain-shell commands as the fallback. Tested by `tests/test-bin.sh`. - `task-planning`: every task carries an Interfaces block (what it consumes from earlier tasks, what later tasks rely on, exact signatures); the plan header gains a Review Focus section (the five input classes the design implies but no task tests); the self-review checks both. - `intent-discovery`: a builder-check prompt as a reference file, dispatched for projects only; the first message echoes a detailed request back with what the project survey found and asks the one open question; the offer to skip the questions appears only when the skill started on its own. - `test-first`: for a bug fix the reproducing test is its own commit before the fix, so the red evidence survives in history. - `fault-diagnosis` hands a verified non-obvious root cause to `knowledge-capture`. - Validator: a 20,000-byte cap per skill and a rule that `## The Protocol` sits within the first 8,000 bytes, because Claude Code re-attaches only the first 5,000 tokens of each invoked skill after compaction; `writing-skills` records both. - Plugin manifest fields `displayName`, `documentationUrl` and `supportUrl`; marketplace `tags`. ### Changed - `task-planning` writes decisions, not transcripts: a test step carries the test as code with the design's values; a code step carries the exact signature, file and pinned values, and the builder writes the body unless the signature and tests do not determine it. A plan several times longer than its design is flagged by the self-review. - `code-review`: a finding that cannot quote the line it is about is at most Minor, and reviewer agreement does not raise a severity. The shipped `code-reviewer` agent is read-only by its tool list. - Codex manifest (`.codex-plugin/plugin.json`) keeps its metadata under `extensions.com.openai` as the Codex plugin docs specify, names `doctor` as the onboarding skill, and drops the empty `hooks` key (plugins with lifecycle hooks are not eligible for the public directory). Reinstall verified on Codex CLI 0.163. - `model-routing`: a scoped re-review runs on a mid-tier model at low effort, not the cheapest tier. - Acceptance scripts pre-allow the Skill tool: a skill that declares hooks asks for permission in the default permission mode, which a headless run auto-denies. Interactive users answer the prompt once. ### Fixed - `tests/test-bin.sh` no longer fails under `pipefail` when `grep -q` closes the pipe early. Install or update: `/plugin install godmode --marketplace NoobyGains/godmode` (Claude Code), `agy plugin install https://github.com/NoobyGains/godmode` (Antigravity), `codex plugin marketplace add NoobyGains/godmode` then `codex plugin add godmode@godmode` (Codex).
-
v2.0.0
GitHub ↗
原版更新说明
Seven months after 1.0, a ground-up rebuild. - The session-start hook that makes skills trigger never actually ran in 1.0 (single-quoted plugin root plus a missing executable bit). It does now, on every OS, with tests on Linux, macOS and Windows. - 33 skills (was 36), rewritten so the bodies describe actions and a per-harness reference maps them to real tools. Three new ones: `grounding` (verify facts that can change against current sources, never memory), `model-routing` (cheapest capable model per seat, named on every dispatch) and `cross-model-review` (a second model family reviews before landing). `delegated-execution` gained a ledger that survives context loss, rulings instead of stalls, and a bounded fix loop. - Native manifests for Claude Code, Antigravity, Codex, Cursor, Gemini CLI and OpenCode from one repository. Verified live on Claude Code 2.1.310, Antigravity CLI 1.4.7 and Codex CLI 0.163. - A validator and CI that fail on the mistakes that broke 1.0, a `doctor` skill, and a `claude plugin eval` suite with published with/without numbers (mean 0.83 vs 0.63). - New brand, README and animated demos. Install ``` # Claude Code /plugin install godmode --marketplace NoobyGains/godmode # Antigravity agy plugin install https://github.com/NoobyGains/godmode # Codex codex plugin marketplace add NoobyGains/godmode codex plugin add godmode@godmode ``` Full notes in CHANGELOG.md. Thanks to @ivnad95, @g7trader and @AdversaLLC for diagnosing the 1.0 hook bug, and to @urbabby for the orchestrator idea.
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供跨平台环境探测协议,有效解决多环境下命令执行失败的核心痛点
- 覆盖 Windows/Linux/macOS、多种 shell、包管理器、虚拟环境等复杂场景
亮点
- 触发条件描述完整且边界清晰,涵盖首次命令、依赖安装、命令失败等多种关键场景
待提升项
-
引用文件缺失 原报告严重程度:重大
SKILL.md 中多次引用 [references/platform-commands.md] 文件,但该文件未传入 ZIP 包
改进建议:请补充 references/platform-commands.md 文件或移除相关引用
亮点
- 文档结构完整,包含 Prime Directive、When to Use、The Protocol 等多个逻辑清晰的章节
- 提供了详细的 lockfiles 与包管理器映射表及 Windows 特定注意事项
待提升项
-
引用文件缺失影响可靠性 原报告严重程度:重大
references/platform-commands.md 缺失导致部分探针命令无法验证,影响跨平台命令的可靠性
改进建议:补充 references/platform-commands.md 文件或内联关键探针命令示例
亮点
- 基于标准系统命令和项目文件进行探测,参数正确且覆盖主要异常场景
- 在不可逆操作(如安装)前设置了明确的环境确认机制
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
安装或获取外部依赖
使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。
主文档提及 · 第 61 行
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- bun.sh
- claudeissues.com
- docs.astral.sh
- docs.python.org
- github.com
- learn.microsoft.com
- nodejs.org
- www.msys2.org
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。