env-check
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEnv check — Cloud agent vs local workspace
环境检查——Cloud Agent 与本地工作区
When to use
使用时机
Run early in a session (or when continuity / credentials / browser tests / local CLIs matter) to classify the host. Use the result as supporting context. The Hub continuity fallback is triggered when ADHD Hub MCP is missing, errored, unauthorized, or otherwise unavailable — not merely because the runtime looks like a cloud sandbox.
在会话早期(或者当连续性、凭据、浏览器测试、本地 CLI 很重要时)运行,以对宿主环境进行分类。将结果作为辅助上下文。只有当 ADHD Hub MCP 缺失、报错、未授权或以其他方式不可用时,才会触发 Hub 连续性回退——不能仅因为运行环境看起来像 cloud sandbox 就触发。
Quick detect
快速检测
From a checkout that includes this skill:
bash
bash skills/env-check/scripts/check_runtime.shOr after / , run the installed copy of .
npx skills add ./skills -guniskela/adhd-hubscripts/check_runtime.shOutput lines:
- or
RUNTIME_ENV: CLOUD_AGENTRUNTIME_ENV: LOCAL_WORKSPACE - (container / Cursor markers; informational)
RUNTIME_SIGNALS: … HUB_CONTINUITY_TRIGGER: MCP unavailable …- (CLOUD_AGENT: do not assume; LOCAL_WORKSPACE: may be available)
LOCAL_SKILL_CLIS: …
在包含此 skill 的 checkout 中运行:
bash
bash skills/env-check/scripts/check_runtime.sh或者在执行 / 后,运行已安装的 副本。
npx skills add ./skills -guniskela/adhd-hubscripts/check_runtime.sh输出行:
- 或
RUNTIME_ENV: CLOUD_AGENTRUNTIME_ENV: LOCAL_WORKSPACE - (container / Cursor 标记;仅供参考)
RUNTIME_SIGNALS: … HUB_CONTINUITY_TRIGGER: MCP unavailable …- (CLOUD_AGENT:不要假定存在;LOCAL_WORKSPACE:可能可用)
LOCAL_SKILL_CLIS: …
Detection quality
检测准确性
The script does not treat as cloud by itself (false positives on local root shells). It combines:
$USER=root- Cursor Cloud markers: ,
CURSOR_AGENT,__CURSOR_SANDBOX_ENV_RESTORE,/tmp/cursor/cloud-agent-transcripts, plus agent sockets when paired with container cues/exec-daemon - Container cues (, cgroup) as supporting signals only — local Docker alone stays
/.dockerenvLOCAL_WORKSPACE
Do not invent “I'm in cloud” from a single weak hint. Prefer the script output when unsure.
脚本不会仅将 视为 cloud(这会在本地 root shell 中造成误报)。它会综合以下因素:
$USER=root- Cursor Cloud 标记:、
CURSOR_AGENT、__CURSOR_SANDBOX_ENV_RESTORE、/tmp/cursor/cloud-agent-transcripts,以及与 container 线索搭配出现的 Agent socket/exec-daemon - Container 线索(、cgroup)仅作为辅助信号——单独出现本地 Docker 时仍判定为
/.dockerenvLOCAL_WORKSPACE
不要根据单一微弱线索就断定“我在 cloud 中”。不确定时优先采用脚本输出。
CLOUD_AGENT guidelines
CLOUD_AGENT 指南
When (Cursor Cloud / remote sandbox):
RUNTIME_ENV: CLOUD_AGENT- Do not assume machine-installed local skill binaries or CLIs exist (examples: , other opt-in companions installed on a developer laptop). Cloud/remote sandboxes often cannot see those tools even when project rules mention them.
graphify - If a required local CLI is missing: one-line notice, then continue via repo tools (Read/Grep/Glob/tests) and any committed artifacts such as when present. Never fabricate graphify graph output or Hub continuity/progress/thread state.
graphify-out/ - No native browser GUI or macOS/Windows desktop binaries; prefer headless tests and CLI verification
- Prefer injected environment / OIDC / platform secrets over committing or relying on
.env.local - Local-only assumptions (opening GUIs, host Docker socket from the agent VM, Tailscale to a private Hub) may fail — plan accordingly
localhost - If Hub MCP tools are missing/errored/unauthorized: on the first substantial Hub-worthy turn, the first line of the reply MUST say Hub MCP is not available, plus a short fix hint (MCP URL → this Hub's ,
/mcp, restart the agent; skip/cancel Auth if it hangs until Hub OAuth is enabled). Never invent Hub state or claim a Hub write succeededADHD_HUB_AUTH_TOKEN - Fallback still applies when Hub MCP is down: when issue-write access exists and the identity is on Hub Inbox authors, open/update a forge/GitHub issue titled with Goal / Focus / Next / Resume (or Now / Done / Next / Return). Optional labels
[ADHD] …,adhd-hub,project:<slug>— skip labels if the token cannot set them. Recommended: appendsource:cursorunder a non-imported heading (e.g.Made with [ADHD Progress Hub](https://github.com/uniskela/adhd-hub)). No secrets, private Hub URLs, internal hosts/IPs, absolute local paths, or transcripts## Attribution
当 (Cursor Cloud / remote sandbox)时:
RUNTIME_ENV: CLOUD_AGENT- 不要假定机器上安装的本地 skill binary 或 CLI 存在(例如 ,以及安装在开发者笔记本电脑上的其他 opt-in companion 工具)。即使项目规则提到这些工具,Cloud/remote sandbox 通常也无法访问它们。
graphify - 如果缺少必需的本地 CLI:先用一行说明,然后通过 repo 工具(Read/Grep/Glob/tests)以及存在时的任何已提交产物(如 )继续执行。绝不虚构 graphify 图输出,也绝不虚构 Hub 的连续性、进度或 thread 状态。
graphify-out/ - 没有原生 browser GUI 或 macOS/Windows desktop binary;优先使用 headless 测试和 CLI 验证
- 优先使用注入的环境配置、OIDC 和 platform secrets,而不是将 提交到仓库或依赖它
.env.local - 仅适用于本地的假设(打开 localhost GUI、从 Agent VM 访问 host Docker socket、通过 Tailscale 连接私有 Hub)可能会失败——应提前规划
- 如果 Hub MCP 工具缺失、报错或未授权:在第一个适合使用 Hub 的实质性回合中,回复的第一行必须说明 Hub MCP 不可用,并附上简短的修复提示(MCP URL → 此 Hub 的 、
/mcp、重启 Agent;如果 Auth 在 Hub OAuth 启用前卡住,则跳过或取消 Auth)。绝不虚构 Hub 状态,也不得声称 Hub 写入成功ADHD_HUB_AUTH_TOKEN - Hub MCP 宕机时,回退机制仍然适用:如果具备 issue 写入权限,且身份位于 Hub Inbox authors 中,则创建或更新一个标题为 的 forge/GitHub issue,其中包含 Goal / Focus / Next / Resume(也可使用 Now / Done / Next / Return)。可选 labels 为
[ADHD] …、adhd-hub、project:<slug>——如果 token 无法设置这些 labels,则跳过。建议在不会被导入的标题下(例如source:cursor)追加## Attribution。不得包含任何 secrets、私有 Hub URL、内部 host/IP、绝对本地路径或 transcriptMade with [ADHD Progress Hub](https://github.com/uniskela/adhd-hub)
LOCAL_WORKSPACE guidelines
LOCAL_WORKSPACE 指南
When (including local Docker / localhost):
RUNTIME_ENV: LOCAL_WORKSPACE- Machine-installed local skill CLIs (e.g. ) may be available — use them when present; still do not invent output if a binary is missing
graphify - Local Docker, localhost services, and host browsers are OK when the operator's machine provides them
- Prefer Hub MCP (,
resolve_project,session_digest, …) when it is reachableupsert_progress - Same no-hallucination rule if MCP is down: acknowledge + fix hint; never invent Hub state; use the forge mailbox only when write access + Inbox authors allow it
[ADHD]
当 (包括本地 Docker / localhost)时:
RUNTIME_ENV: LOCAL_WORKSPACE- 机器上安装的本地 skill CLI(如 )可能可用——存在时请使用;但 binary 缺失时仍不得虚构输出
graphify - 如果操作员机器提供相应环境,可以使用本地 Docker、localhost 服务和宿主机 browser
- 如果 Hub MCP 可以访问,优先使用 Hub MCP(、
resolve_project、session_digest等)upsert_progress - MCP 宕机时同样遵守禁止幻觉的规则:明确说明问题并提供修复提示;绝不虚构 Hub 状态;仅当写入权限和 Inbox authors 身份均允许时,才使用 forge 邮箱
[ADHD]
Continuity priority
连续性优先级
- MCP unavailable? → loud first-line warning + forge fallback (if allowed) — this is the Hub continuity trigger (still true on CLOUD_AGENT)
[ADHD] - Runtime env → choose tests, credentials, tooling constraints, and whether local skill CLIs are expected
- Prefer Hub MCP whenever it is available, on either runtime
See also: (full Hub protocol), docs/forge-issue-inbox.md.
adhd-hub-session- MCP 不可用? → 醒目的首行警告 + forge 回退(如果允许)——这才是 Hub 连续性的触发条件(在
[ADHD]上仍然如此)CLOUD_AGENT - 运行环境 → 选择测试、凭据、工具约束,以及是否应存在本地 skill CLI
- 无论采用哪种运行环境,只要 Hub MCP 可用,就优先使用它
另请参阅:(完整的 Hub 协议)、docs/forge-issue-inbox.md。
adhd-hub-session