Save, search, and manage personal notes and knowledge bases in Get笔记 on explicit request.
Documents
hello-env
Try itZero-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
- Version: 1.0.2
- License: MIT
- Author: Evan Song · github.com/Songhonglei
- Repository: https://github.com/Songhonglei/better-agent-skills
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
| Platform | Status |
|---|---|
| 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 Platform | Status |
|---|---|
| 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
| # | Module | Output |
|---|---|---|
| 1 | OS | macOS / Linux distro + version |
| 2 | Current User | whoami + UID/GID |
| 3 | Node.js | Path (which node) + version |
| 4 | Python3 | Path + version |
| 5 | Basic Tools | git, curl, jq, docker, make — present / missing |
| 6 | Network | Hostname + IP + inferred private subnet (10.x / 172.16-31.x / 192.168.x) |
| 7 | Container / K8s | Probes configurable env vars; defaults to KUBERNETES_SERVICE_HOST + K8S_NAMESPACE; falls back to /.dockerenv / cgroup heuristics |
| 8 | Workdir | Path exists + git initialized check |
| 9 | Config file | Only checked if --config provided |
| 10 | PVC persistence | Mount device-number + watch-dir count snapshot diff (auto when K8s probe hits, or --force-pvc) |
Output legend: ✅ ok · ℹ️ info · ⚠️ warning · ❌ failure
CLI flags
| Flag | Default | Description |
|---|---|---|
--workdir | pwd | Working 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_NAMESPACE | Comma-separated env vars to probe for container/K8s context |
--force-pvc | off | Force PVC monitoring even when no K8s indicator is found |
--snapshot-dir | /.hello-env | Where to store device/count snapshots |
-h, --help | — | Show inline help |
Environment variables (lower priority than CLI flags)
| Variable | Equivalent 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-count—find -maxdepth 1 -mindepth 1 -type d | wc -l
Next run decides:
| Device | Watch-dir count | Verdict |
|---|---|---|
| changed | any | ⚠️ Likely PVC remount |
| unchanged | decreased | ℹ️ Probably manual removal |
| unchanged | not decreased | ✅ Healthy |
When PVC monitoring activates:
- Any of the env vars listed in
--probe-envis set, OR --force-pvc/HELLO_ENV_FORCE_PVC=1is on
If neither, you get a hint:
ℹ️ Not detected as containerized environment. Use
--force-pvcto 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.
Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.
Write, debug, and tune Playwright specs with locator strategy, trace diagnosis, and CI-aware timeouts.
Run Git operations — commits, branches, merges, rebases, conflict resolution, and recovery — with safety rules enforced.
Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.
More from songhonglei
Browse all skillsRecover 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 丢了, 找回某个文件, 重放编辑.
小红书图文笔记自动发布技能。通过 ego-browser 自动化完成图片上传、标题填写、正文编辑、 话题标签、发布等全流程。附带 28 种多样式风格卡片生成器(含 3 种照片背景氛围主题), 卡片主题、布局、背景图、遮罩强度、模糊、颗粒等参数均可自由配置。 当用户要求发小红书、发布图文笔记、上传到小红书、小红书发帖或涉及小红书内容发布时触发此技能。 前置依赖:ego-browser (ego-lite) 已安装且正在运行,小红书账号已登录。
Guided token optimization for AI agent workspaces. Triggers on phrases like "save tokens", "optimize tokens", "context window too large", "memory files too b...
将 Markdown/纯文本内容智能分析、排版并导出为高分辨率精美长图或分享海报(内置 18 种视觉风格)。 当用户说「生成长图」「做海报」「文字转图片」「高颜值排版」「做大图」「make a poster」 「export as image」「generate image from text/markdown」等意图时触发本技能。
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"。
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".