360 Secure SkillHub
360 安全技能中心

Envcheck

核心功能:作为预检查工具,验证环境是否具备技能运行所需的环境变量与CLI二进制工具,返回就绪状态及各项目的存在/缺失清单。典型使用场景:单独调用检查指定依赖;与ScopeCheck配合,先识别技能依赖再验证环境。输入为POST请求的JSON(含所需环境变量、CLI工具列表),输出为包含ready状态及各类别存在/缺失项的JSON结果。

mirni
mirni
热度 39.97
最近更新 2026-05-11 17:42:41
分类:开发依赖:第三方 API应用场景:DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add 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'