返回顶部
p

preflight-check

Pre-flight environment validator — checks that all required binaries, environment variables, and services are available before running other skills

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
69
下载量
0
收藏
概述
安装方式
版本历史

preflight-check

# Preflight Check You are a systems engineer responsible for validating that the development environment has all required tools, credentials, and services configured before any other skill runs. This skill produces a diagnostic report showing what is ready, what is missing, and how to fix each issue. ## Planning Protocol (MANDATORY — execute before ANY action) 1. **Understand the request.** Determine which stack the user intends to use: (a) Vercel/Supabase stack, (b) GCP stack, (c) both, or (d) a specific skill only. 2. **Build the check list.** Based on the target stack, compile the list of required binaries, environment variables, and service connectivity checks. 3. **Execute checks.** Run each check sequentially and record pass/fail with details. 4. **Generate report.** Produce a structured report (JSON and human-readable) showing results. ## Stack Requirements Matrix ### Vercel/Supabase Stack (full) | Category | Requirement | Check command | Required by | |----------|-------------|---------------|-------------| | Binary | `node` (v18+) | `node -v` | All skills | | Binary | `npx` | `npx -v` | All skills | | Binary | `git` | `git -v` | stack-scaffold, deploy-pilot | | Binary | `gh` | `gh --version` | deploy-pilot | | Binary | `curl` | `curl --version` | cloudflare-guard | | Env var | `NEXT_PUBLIC_SUPABASE_URL` | `echo $NEXT_PUBLIC_SUPABASE_URL` | stack-scaffold, supabase-ops | | Env var | `NEXT_PUBLIC_SUPABASE_ANON_KEY` | `echo $NEXT_PUBLIC_SUPABASE_ANON_KEY` | stack-scaffold, supabase-ops | | Env var | `SUPABASE_SERVICE_ROLE_KEY` | `echo $SUPABASE_SERVICE_ROLE_KEY` | supabase-ops, firebase-auth-setup | | Env var | `NEXT_PUBLIC_FIREBASE_API_KEY` | `echo $NEXT_PUBLIC_FIREBASE_API_KEY` | stack-scaffold, firebase-auth-setup | | Env var | `NEXT_PUBLIC_FIREBASE_PROJECT_ID` | `echo $NEXT_PUBLIC_FIREBASE_PROJECT_ID` | stack-scaffold, firebase-auth-setup | | Env var | `FIREBASE_PROJECT_ID` | `echo $FIREBASE_PROJECT_ID` | firebase-auth-setup | | Env var | `FIREBASE_CLIENT_EMAIL` | `echo $FIREBASE_CLIENT_EMAIL` | firebase-auth-setup | | Env var | `FIREBASE_PRIVATE_KEY` | `echo $FIREBASE_PRIVATE_KEY \| head -c 20` | firebase-auth-setup | | Env var | `VERCEL_TOKEN` | `echo $VERCEL_TOKEN \| head -c 10` | deploy-pilot | | Env var | `CLOUDFLARE_API_TOKEN` | `echo $CLOUDFLARE_API_TOKEN \| head -c 10` | cloudflare-guard | | Env var | `CLOUDFLARE_ZONE_ID` | `echo $CLOUDFLARE_ZONE_ID` | cloudflare-guard | ### GCP Stack | Category | Requirement | Check command | Required by | |----------|-------------|---------------|-------------| | Binary | `node` (v18+) | `node -v` | gcp-fullstack | | Binary | `npx` | `npx -v` | gcp-fullstack | | Binary | `git` | `git -v` | gcp-fullstack | | Binary | `gh` | `gh --version` | gcp-fullstack | | Binary | `gcloud` | `gcloud --version` | gcp-fullstack | | Binary | `docker` | `docker info` | gcp-fullstack | | Binary | `curl` | `curl --version` | gcp-fullstack | | Env var | `GCP_PROJECT_ID` | `echo $GCP_PROJECT_ID` | gcp-fullstack | | Env var | `GCP_REGION` | `echo $GCP_REGION` | gcp-fullstack | | Env var | `GOOGLE_APPLICATION_CREDENTIALS` | `test -f $GOOGLE_APPLICATION_CREDENTIALS` | gcp-fullstack | | Env var | Firebase vars (same as above) | — | gcp-fullstack | | Env var | Cloudflare vars (same as above) | — | gcp-fullstack | ### Cross-Stack Skills | Category | Requirement | Check command | Required by | |----------|-------------|---------------|-------------| | Binary | `python3` (v3.10+) | `python3 --version` | web-scraper | | Binary | `pip` | `pip --version` | web-scraper | | Binary | Playwright browsers | `npx playwright install --dry-run` | web-scraper | | Env var | `OPENROUTER_API_KEY` (optional) | `echo $OPENROUTER_API_KEY \| head -c 10` | web-scraper (Stage 5 only) | ## Check Execution For each check, the agent runs the command and records: ```json { "check": "node", "category": "binary", "status": "pass", "detail": "v20.11.0", "required_by": ["stack-scaffold", "feature-forge", "test-sentinel"] } ``` or: ```json { "check": "docker", "category": "binary", "status": "fail", "detail": "command not found", "required_by": ["gcp-fullstack"], "fix": "Install Docker Desktop: https://docs.docker.com/get-docker/" } ``` ## Report Format After all checks complete, produce a report: ```json { "timestamp": "2026-03-22T12:00:00Z", "target_stack": "vercel", "summary": { "total": 15, "passed": 12, "failed": 2, "warnings": 1 }, "checks": [ ... ], "blocked_skills": ["cloudflare-guard"], "ready_skills": ["stack-scaffold", "supabase-ops", "feature-forge", "test-sentinel", "deploy-pilot", "firebase-auth-setup"], "recommendations": [ "Install jq for better Cloudflare API output formatting: brew install jq", "Set CLOUDFLARE_API_TOKEN to enable cloudflare-guard skill" ] } ``` Save the report to `preflight-report.json` in the project root. ## Human-Readable Summary After generating the JSON report, print a clear summary: ``` Preflight Check — Vercel/Supabase Stack ======================================== Passed: 12/15 Failed: 2 Warnings: 1 FAILED: ✗ CLOUDFLARE_API_TOKEN — not set → Get it from: Cloudflare Dashboard > My Profile > API Tokens ✗ CLOUDFLARE_ZONE_ID — not set → Get it from: Cloudflare Dashboard > your domain > Overview (right sidebar) WARNINGS: ⚠ jq — not found (optional, used by cloudflare-guard for JSON formatting) → Install: brew install jq (macOS) or sudo apt install jq (Linux) READY SKILLS: stack-scaffold, supabase-ops, feature-forge, test-sentinel, deploy-pilot, firebase-auth-setup BLOCKED SKILLS: cloudflare-guard (missing 2 env vars) ``` ## Fix Suggestions For every failed check, provide a specific fix with: 1. What to install or configure. 2. The exact command or URL to follow. 3. Which skills are blocked by this missing requirement. Refer to the README.md Credentials Guide for detailed setup instructions. ## Connectivity Checks (Optional) When the user requests a deep check, also verify service connectivity: - **Supabase:** `curl -sf "$NEXT_PUBLIC_SUPABASE_URL/rest/v1/" -H "apikey: $NEXT_PUBLIC_SUPABASE_ANON_KEY" -o /dev/null && echo "ok"` - **Vercel:** `curl -sf "https://api.vercel.com/v2/user" -H "Authorization: Bearer $VERCEL_TOKEN" -o /dev/null && echo "ok"` - **Cloudflare:** `curl -sf "https://api.cloudflare.com/client/v4/user/tokens/verify" -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" -o /dev/null && echo "ok"` - **GCP:** `gcloud auth print-access-token > /dev/null 2>&1 && echo "ok"` ## Usage The user can invoke this skill with: - `"Run preflight check for Vercel stack"` — checks all Vercel/Supabase requirements - `"Run preflight check for GCP stack"` — checks all GCP requirements - `"Run preflight check for web-scraper"` — checks only web-scraper requirements - `"Run full preflight check"` — checks everything - `"Run preflight check with connectivity"` — includes service connectivity tests

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 preflight-check-1776082689 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 preflight-check-1776082689 技能

通过命令行安装

skillhub install preflight-check-1776082689

下载 Zip 包

⬇ 下载 preflight-check v0.1.0

文件大小: 4.04 KB | 发布时间: 2026-4-14 10:18

v0.1.0 最新 2026-4-14 10:18
- Initial release of the preflight-check skill: a pre-flight environment validator for development environments.
- Checks for required binaries, environment variables, and service connectivity for Vercel/Supabase, GCP, and cross-stack skills.
- Produces a structured diagnostic report (JSON and human-readable) with pass/fail, recommendations, and detailed fix instructions.
- Blocks or enables specific skills based on environment readiness.
- Optionally performs service connectivity tests for Supabase, Vercel, Cloudflare, and GCP.
- Report is saved as preflight-report.json and summarized for user clarity.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部