360 Secure SkillHub
360 安全技能中心

Envcheck

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

mirni
mirni
热度 40.00
最近更新 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'