Documents

hello-env

Try it

Zero-dependency Bash environment health check for Linux, macOS, containers, and K8s pods. Reports OS, current user, Node.js, Python3, basic tools (git/curl/j...

What it does

**Version**: 1.0.2 **License**: MIT **Author**: Evan Song · github.com/Songhonglei **Repository**: https://github.com/Songhonglei/better-agent-skills

The skill document

hello-env

A zero-dependency Bash health check for any dev environment — host, container, or K8s pod.

一个零依赖的开源环境自检脚本,适用于本地、容器、K8s Pod 环境。

Pure bash. No Python, no npm, no third-party packages. Works on macOS, Linux, and inside containers.

Compatibility

PlatformStatus
Linux (any distro)✅ Full
macOS (bash 3.2.57+ default)✅ Full — uses eval-based indirect var expansion for bash 3.x
Windows (WSL / WSL2)✅ Full (effectively Linux)
Windows (Git Bash / MSYS / Cygwin)⚠️ Partial — OS/user/tools/network checks work; cgroup container detection and PVC monitoring are skipped (Linux-only kernel features)
Windows (PowerShell / cmd)❌ Not supported by design (bash script)
Agent PlatformStatus
Claude Code✅ Standard SKILL.md, drops in
Codex✅ Same
OpenClaw✅ Native format
Cursor / Cline / others✅ Generic Markdown + bash, no platform hooks

Quick start

# Run with defaults (current directory as workdir, default K8s probe vars)
bash scripts/check-env.sh

# Custom workdir
bash scripts/check-env.sh --workdir /opt/myapp

# Probe extra environment variables (comma-separated)
bash scripts/check-env.sh --probe-env "MY_REGION,MY_TIER,DEPLOY_ENV"

# Force PVC monitoring (when K8s probe vars are absent but you still want it)
bash scripts/check-env.sh --force-pvc

# Combine
bash scripts/check-env.sh \
  --workdir /opt/myapp \
  --watch-dir /opt/myapp/plugins \
  --config /etc/myapp/config.json \
  --probe-env "MY_REGION,MY_TIER" \
  --force-pvc

What it checks

#ModuleOutput
1OSmacOS / Linux distro + version
2Current Userwhoami + UID/GID
3Node.jsPath (which node) + version
4Python3Path + version
5Basic Toolsgit, curl, jq, docker, make — present / missing
6NetworkHostname + IP + inferred private subnet (10.x / 172.16-31.x / 192.168.x)
7Container / K8sProbes configurable env vars; defaults to KUBERNETES_SERVICE_HOST + K8S_NAMESPACE; falls back to /.dockerenv / cgroup heuristics
8WorkdirPath exists + git initialized check
9Config fileOnly checked if --config provided
10PVC persistenceMount device-number + watch-dir count snapshot diff (auto when K8s probe hits, or --force-pvc)

Output legend: ✅ ok · ℹ️ info · ⚠️ warning · ❌ failure


CLI flags

FlagDefaultDescription
--workdir pwdWorking directory to check (existence + git init)
--watch-dir ``Directory whose subfolder count is snapshotted for PVC monitoring
--config (unset)Optional config file to check existence
--probe-env "A,B,C"KUBERNETES_SERVICE_HOST,K8S_NAMESPACEComma-separated env vars to probe for container/K8s context
--force-pvcoffForce PVC monitoring even when no K8s indicator is found
--snapshot-dir /.hello-envWhere to store device/count snapshots
-h, --helpShow inline help

Environment variables (lower priority than CLI flags)

VariableEquivalent flag
HELLO_ENV_WORKDIR--workdir
HELLO_ENV_WATCH_DIR--watch-dir
HELLO_ENV_CONFIG--config
HELLO_ENV_PROBE_ENV--probe-env
HELLO_ENV_FORCE_PVC=1--force-pvc
HELLO_ENV_SNAPSHOT_DIR--snapshot-dir

PVC remount detection (why this matters)

K8s PersistentVolumes can silently get reattached to a fresh disk during pod restarts or node failover. Symptoms users typically see:

"All the files I created yesterday are gone after the pod restarted."

This script catches it early by snapshotting on each run:

  • /last-device — the mount device for ``
  • /last-watch-countfind -maxdepth 1 -mindepth 1 -type d | wc -l

Next run decides:

DeviceWatch-dir countVerdict
changedany⚠️ Likely PVC remount
unchangeddecreasedℹ️ Probably manual removal
unchangednot decreased✅ Healthy

When PVC monitoring activates:

  • Any of the env vars listed in --probe-env is set, OR
  • --force-pvc / HELLO_ENV_FORCE_PVC=1 is on

If neither, you get a hint:

ℹ️ Not detected as containerized environment. Use --force-pvc to enable PVC monitoring anyway.


Examples

CI runner sanity check

bash scripts/check-env.sh --workdir "$CI_PROJECT_DIR" --probe-env "CI,GITLAB_CI,GITHUB_ACTIONS"

K8s pod with custom labels

bash scripts/check-env.sh \
  --probe-env "KUBERNETES_SERVICE_HOST,K8S_NAMESPACE,MY_REGION,MY_TIER" \
  --watch-dir /workspace/plugins

Local Docker container without K8s

bash scripts/check-env.sh --force-pvc --workdir /app

Exit codes

  • 0 — All checks ran (warnings allowed)
  • Non-zero only on argument parsing errors

This is a diagnostic tool, not a gate. It reports — it doesn't block.

Related skills

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai21 installs8 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván1 installs

Run Git operations — commits, branches, merges, rebases, conflict resolution, and recovery — with safety rules enforced.

by Iván532 installs31 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván1 installs

More from songhonglei

Browse all skills

Recover lost agent session content and file changes from on-disk conversation logs. Streaming and OOM-safe on 700MB+ daily JSONL. Two commands: search.py for keyword search across recent sessions (with hit snippets, file-op listing, JSON for agent consumption); extract.py for pulling full write/edit content from a single session by ID prefix, with optional replay-rebuild for pure-edit sequences and safe restore-to-disk (refuses silent overwrites without --yes). Multi-agent aware via --agent main|all|a,b. Configurable data root via --root flag or SESSION_RECOVERY_ROOT env var (default ~/.openclaw/agents/). Trigger when user wants to find lost session content, recover files written by an agent, locate which session modified a file, search session history by keyword, or rebuild a file from an edit replay. Also triggers on 找回会话, 会话被覆盖, 历史会话搜索, 文件被删了, session 丢了, 找回某个文件, 重放编辑.

by blqbzf

小红书图文笔记自动发布技能。通过 ego-browser 自动化完成图片上传、标题填写、正文编辑、 话题标签、发布等全流程。附带 28 种多样式风格卡片生成器(含 3 种照片背景氛围主题), 卡片主题、布局、背景图、遮罩强度、模糊、颗粒等参数均可自由配置。 当用户要求发小红书、发布图文笔记、上传到小红书、小红书发帖或涉及小红书内容发布时触发此技能。 前置依赖:ego-browser (ego-lite) 已安装且正在运行,小红书账号已登录。

by songhonglei2 installs1 stars

Guided token optimization for AI agent workspaces. Triggers on phrases like "save tokens", "optimize tokens", "context window too large", "memory files too b...

by songhonglei2 installs1 stars

将 Markdown/纯文本内容智能分析、排版并导出为高分辨率精美长图或分享海报(内置 18 种视觉风格)。 当用户说「生成长图」「做海报」「文字转图片」「高颜值排版」「做大图」「make a poster」 「export as image」「generate image from text/markdown」等意图时触发本技能。

by songhonglei2 installs

Generic skill-quality auditor for any agent skill (Claude, OpenClaw, Cursor, etc.). Runs a 7-dimension static analysis (D1 process closure & idempotency, D2 tool/command conventions, D3 portability & defense, D4 skill usability, D5 security & op risk, D6 code & doc quality, D7 dependency & footprint) with explicit ERR / WARN severity, 120-point scoring (pass line 90 + zero ERR), and an opt-in `--fix` workflow that always backs up first. Two depths: L1 static (~2 min) and L2 dryRun (~5 min, read-only hub + reachability checks). Strict red lines — read-only by default, never executes the audited skill's writes. Use when the user asks to "audit a skill", "check skill quality", "is this skill ready to ship", "lint my skill", or runs this tool by name. Triggers also: "审计这个 Skill"、"检查 Skill 质量"、"Skill 能上线吗"、 "skill-deep-audit"、"审一下 xxx skill"。

by songhonglei1 installs1 stars

Turn any content — Markdown, plain text, images, tables, Excel (.xlsx), Word (.docx) — into a polished single-page HTML, pick one of 19 built-in themes, set the page Title and FavIcon, then publish it as a live page. When the input is already a well-designed HTML page (or an image with a clear layout), it switches to "layout inheritance" mode: the original layout is kept intact and only the colour theme is swapped, instead of tearing it apart and rebuilding. Use when the user says "turn this into a web page", "make this an HTML page", "convert this doc/table/Excel to HTML", "make it pretty", "把这个转成网页", "做成 HTML 页面", "内容转 HTML".

by songhonglei3 installs