360 Secure SkillHub
360 安全技能中心

Envcheck

通过本地 FastAPI 服务提供环境预检:传入所需的环境变量名与命令行工具名列表,返回 ready 判定以及 present_env、missing_env、present_bins、missing_bins 四组清单;可配合 ScopeCheck 先探测技能所需项。

分类:开发
mirni
mirni
热度 30.75
最近更新 2026-05-11 17:42:41

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add mirni/gh-envcheck
兼容性
通用兼容
联网要求
需要联网
数据出网
数据不出本机
Metadata
name
gh-envcheck
description
Check if your environment is ready to run a skill — verify that required environment variables are set and required CLI binaries are on PATH. Returns a ready/not-ready verdict with lists of present and missing items.
metadata
{"openclaw":{"emoji":"🔧","requires":{"bins":["python"]},"install":[{"id":"pip","kind":"uv","packages":["fastapi","uvicorn","pydantic"]}]}}

EnvCheck

Pre-flight check: does this environment have what the skill needs?

Start the server

uvicorn envcheck.app:app --port 8007

Check environment

curl -s -X POST http://localhost:8007/v1/check-env \
  -H "Content-Type: application/json" \
  -d '{"required_env": ["HOME", "PATH"], "required_bins": ["python", "git"]}' | jq

Returns ready (true/false), present_env, missing_env, present_bins, missing_bins.

Pair with ScopeCheck

Use ScopeCheck to find out what a skill needs, then EnvCheck to verify your environment has it:

# Step 1: What does the skill need?
SCOPE=$(curl -s -X POST http://localhost:8002/v1/check-scope \
  -H "Content-Type: application/json" \
  -d "{\"skill_content\": $(cat SKILL.md | jq -Rs)}")

# Step 2: Do we have it?
curl -s -X POST http://localhost:8007/v1/check-env \
  -H "Content-Type: application/json" \
  -d "{\"required_env\": $(echo $SCOPE | jq '.detected.env_vars'), \"required_bins\": $(echo $SCOPE | jq '.detected.cli_tools')}" | jq '.ready'