编程

Skill Preflight

试用

Validate a SKILL.md before publishing — checks frontmatter completeness, semver, and that every declared bin actually resolves on PATH. Use before `clawhub publish`, or when a skill fails to load / shows as missing requirements.

它能做什么

Validate a SKILL.md before publishing — checks frontmatter completeness, semver, and that every declared bin actually resolves on PATH. Use before `clawhub publish`, or when a skill fails to load / shows as missing requirements.

技能文档

Skill Preflight

A deterministic, self-validating skill: it runs a real check with python3 and returns an honest machine-readable outcome. ok:true proves the target SKILL.md passed every check below — nothing more, nothing less.

This is the executable-validation pattern: encode the process, run it with a real tool, and gate the result on a postcondition instead of trusting a vibe.

Trigger

  • /skill-preflight
  • Natural language: "check my skill before publishing", "why is my skill missing requirements", "validate this SKILL.md".

Execution

Run the bundled checker against the target skill:

python3 scripts/preflight.py 

It emits JSON { ok, reason, checks[] } and exits 0 on pass, 1 on fail, 2 on usage/IO error.

Checks (the validation gate)

  1. frontmatter-present — a --- … --- YAML block exists.
  2. has-name / has-description / has-version — required keys are present and non-empty.
  3. version-semverversion matches N.N.N.
  4. requires.bins-declaredmetadata.openclaw.requires.bins is declared (an empty list is fine; absent is not).
  5. bin: — every declared binary actually resolves on PATH (shutil.which). This is the real-execution gate: a skill that declares a tool it can't find will show as "missing requirements" at load time.

Honest outcome contract

  • ok:true → the SKILL.md passed all checks above. It does not guarantee the skill's behaviour is correct, only that its manifest is loadable and its declared tools are present.
  • ok:falsereason names the failing checks; checks[] gives per-check detail. Fix those before clawhub publish.

Examples

$ python3 scripts/preflight.py ./my-skill/SKILL.md
{ "ok": true, "reason": "all checks passed", "checks": [ ... ] }

$ python3 scripts/preflight.py ./broken/SKILL.md
{ "ok": false, "reason": "failed: version-semver, bin:jq", "checks": [ ... ] }

Notes

  • Pure Python standard library — no pip install, no network.
  • Parses frontmatter without PyYAML so it runs anywhere python3 exists.

相关技能

Before publishing to ClawHub, validate a skill-shaped folder (required files, frontmatter, size, auth, slug availability, and a dry-run publish) with one script. Use when authoring or packaging a skill and you want to catch structural problems before the real publish.

Use when preparing a Skill folder for public release to SkillHub, ClawHub, or another agent-skill marketplace, especially before publishing third-party insta...

5 次安装

Pre-scan a SKILL.md locally before publishing to ClawHub. Simulates the ClawScan security review using the same prompt and evaluation criteria as the real sc...

18 次安装1 星标